Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with updateStock or updateStockMultiple -> "ErrorMessage":"Parameter SKU is empty" but given #78

Open
kruegge82 opened this issue Mar 8, 2024 · 5 comments

Comments

@kruegge82
Copy link

Hello,
i have a problem for update stock.... and with newest serializer also paging orders error

using:
php 8.2
billbee/billbee-api 2.2.1
jms/serializer 3.30
guzzlehttp/guzzle 7.8.1

also if i used newest version of jms/serializer i get the error for orders:
PHP Fatal error: Uncaught TypeError: BillbeeDe\BillbeeAPI\Response\BaseResponse::getPaging(): Return value must be of type array, null returned

Here how i fixed the issues and also warnings:

  1. donwgrade jms/serializer to 3.28

  2. /customClient.php on line 41
    replace: $body = $options['body'] ?? null;
    with $body = $options['body'] ?? '';

  3. in file /Model/stock.php
    replace all protected with public
    example: protected $sku; to: public $sku;

  4. in File /Response/UpdateStockResponse.php
    i removed line 21
    * @var array<array{SKU: ?string, OldStock: ?float, CurrentStock: ?float, UnfulfilledAmount: ?float, Message: string}>
    so the response will display corrctly

maybe anyone can check this and update the SDK

@cschwerdt
Copy link

+1

1 similar comment
@reiseregen
Copy link

+1

@StanProg
Copy link

StanProg commented Jul 19, 2024

I confirm, that there is a problem with jms/serializer 3.30 & getPaging().

Here's how I downgraded to 3.29.1:

  1. composer require jms/serializer 3.29.1
  2. remove from composer.json manually the row: "jms/serializer": "3.29.1",
  3. composer update nothing

@espressobytes
Copy link

@StanProg Thank you very much for your solution!

@kruegge82
Copy link
Author

because of no answer of the support i have generate a new sdk without dependencies
billbee-php-sdk-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants