With latest version of jms/serializer 3.3.0 the code
use BillbeeDe\BillbeeAPI\Client;
use BillbeeDe\BillbeeAPI\Model\Order;
$user = 'Your Billbee username';
$apiPassword = 'Your Billbee API Password';
$apiKey = 'Your Billbee API Key';
$client = new Client($user, $apiPassword, $apiKey);
$orderObject = new Order();
$orderObject->setCreatedAt(new \DateTime());
$billbeeOrder = $client->orders()->createOrder($orderObject, 123456789);
will result in error:
"Client error: `POST https://api.billbee.io/api/v1/orders?shopId=123456789` resulted in a `400 Bad Request` response:
{"Message":"The request is invalid.","ModelState":{"orderData":["Required property 'CreatedAt' not found in JSON. Path ' (truncated...)
"
Because latest version of jms/serializer sends json data as 'create_at' instead of 'CreatedAt'.
Temporary fix: downgrading to previous version of jms/serializer 3.29.1 seams to fix this particular case.
With latest version of jms/serializer 3.3.0 the code
will result in error:
Because latest version of jms/serializer sends json data as 'create_at' instead of 'CreatedAt'.
Temporary fix: downgrading to previous version of jms/serializer 3.29.1 seams to fix this particular case.