Closed TonyMarston closed 2 months ago
After trawling through the source code and trying various combinations I found that the method call needed to be changed to the following:
$result = $api->validateContentDocumentAsinRelations(
marketplaceId: $marketplace_id,
postContentDocumentRequest: new Dto\PostContentDocumentRequest(new Dto\ContentDocument($name,
$contentType,
$locale,
$contentModuleList,
$contentSubType)));
If this had been properly documented I would not have had to waste so much time.
Problem description:
Error:
Fatal Error: Uncaught exception from TypeError, message = SellingPartnerApi\Seller\APlusContentV20201101\Api::validateContentDocumentAsinRelations(): Argument #1 ($postContentDocumentRequest) must be of type SellingPartnerApi\Seller\APlusContentV20201101\Dto\PostContentDocumentRequest, string given
How do I turn the JSON string into an object of the required type?
Code