In the above code internal $_embedded property will be properly filled with refunds list. However, when refunds() is called an extra http request is invoked. The point of using embed parameter is to not have to create redundant requests.
The same applies to chargebacks. And the same applies to use of embed parameter in other places, e.g. orders.
Looking at refunds() or chargebacks() code it's clear why that happens. Looks to me that all methods that use $_embedded property have to be reviewed and fixed.
In the above code internal
$_embedded
property will be properly filled with refunds list. However, whenrefunds()
is called an extra http request is invoked. The point of usingembed
parameter is to not have to create redundant requests.The same applies to chargebacks. And the same applies to use of
embed
parameter in other places, e.g. orders.Looking at refunds() or chargebacks() code it's clear why that happens. Looks to me that all methods that use
$_embedded
property have to be reviewed and fixed.ps. The documentation is not clear at https://docs.mollie.com/reference/v2/payments-api/get-payment (Embedding of related resources). What if I wanted to embed both refunds and chargebacks? Is this supported?