mollie-api-php
mollie-api-php copied to clipboard
fix: make TransferParty data accessible for debugging
When executing the following code
$request = new CreateConnectBalanceTransferRequest(
amount: new Money("EUR", 100),
category: "test",
description: "test",
destination: new TransferParty("test", "test"),
source: new TransferParty("test", "bla")
);
$client->debugRequest(die: true)->send($request);
prior to this change we would get a dump of the following (notice destination and source are empty).
[
"request" => "Mollie\Api\Http\Requests\CreateConnectBalanceTransferRequest"
"method" => "POST"
"uri" => "https://api.mollie.com/v2/connect/balance-transfers"
"headers" => array:7 [...]
"body" => "{"amount":{"currency":"EUR","value":"100"},"description":"test","source":{},"destination":{},"category":"test"}"
]
With this change TransferParty props are set to public as all the other props of all other Mollie\Api\Http\Data classes and therefore get included in the debug var_dump.