-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
ItemSearchResults __construct fails, if the response misses the pagination information #740
Comments
This is the purpose of the |
Thanks, didn't noticed that, sorry. Created a pull request. Note: The generation method touched multiple dozens of files, while one one did in fact change. All of that changes were changes in formatting. Spaces to intend were changed, the placement of the curly brackets was changed a bit, spaces within the Docblock were changed a bit. Example constructor before the generation:
After generation:
Also, the changes we had done to the Deserialies.php Trait were reverted back to the faulty state. The file doesn't state that it is auto generated, but it changes with the I'm a bit in a hurry right now, so I can't dig deeper into this, but I wanted to let you know about that. Maybe there's something missing to unify the generation. |
I think we resolved in this in the PR, but those changes were because the current flow assumes |
Example response:
This triggers the following error:
request.CRITICAL: Uncaught PHP Exception ArgumentCountError: "SellingPartnerApi\Seller\CatalogItemsV20220401\Responses\ItemSearchResults::__construct(): Argument #2 ($pagination) not passed" at ItemSearchResults.php line 29
Same issue is true for the refinements. By the documentation both are required in the response, but truth is that both might be missing. Just do a search with a single ASIN to force a response with a single item found.
Since this is a generated class, how would be go about solving this issue? Manually changing the JSON used for generation doesn't seem future proof to me.
The text was updated successfully, but these errors were encountered: