Closed sandervanhooft closed 1 year ago
$mollie = new Mollie\Api\MollieApiClient; $mollie->setApiKey('...'); $operations = [ [ "operation" => "update", "data" => [ "id" => "odl_1.1l9vx0", "name" => "New order line name", ], ], [ "operation" => "cancel", "data" => [ "id" => "odl_1.4hqjw6", ], ], [ "operation" => "add", "data" => [ "name" => "Adding new orderline", "quantity" => 2, "sku" => "12345679", "totalAmount" => [ "currency" => "EUR", "value" => "30.00", ], "type" => "digital", "unitPrice" => [ "currency" => "EUR", "value" => "15.00", ], "vatAmount" => [ "currency" => "EUR", "value" => "0.00", ], "vatRate" => "0.00", ], ], ]; $order = $mollie->orderLines->updateMultiple($orderId, $operations);
@fjbender what do you think?
Note the updateMultiple signature and that the operations array is accepted directly instead of the full payload.
updateMultiple