Closed JensMe closed 2 years ago
Thanks for the information. You're right. The field should be initialized with <NULL>
.
I witnessed another initialization issue. The product's field "condition" is initialized as "brand new" in the SDK, even though the Swagger UI returns "null" as default. Hence both systems differ on their output. (@devtronic)
Fixed in v2.2.0-RC1
Hi @devtronic, I noticed an issue with the SDK's code when creating a new product in Billbee with the API endpoint "POST /api/v1/products". First, I did not initiate the Product's field shippingProductId. Therefore, the PHP SDK used the integer "0" as default. However, the Billbee API responded an server error:
When explicitly initiating the field shippingProductId as "null", the Billbee endpoint accepts my request. Ironically, the request's response specifies the shippingProductId to be the integer "0" instead of "null" but when requesting the newly created product with the API endpoint "GET /api/v1/products/{id}", it shows "null" instead of the integer "0".
Hence, I propose to initiate that field with "null" instead of an integer "0" by default. I hope this eases the use of this SDK for others.