Closed TonyMarston closed 1 week ago
Class "PostContentDocumentRequest" not found
Fatal Error: Uncaught exception from Error, message = Class "PostContentDocumentRequest" not found
require_once('vendor/autoload.php'); use SellingPartnerApi\SellingPartnerApi; use SellingPartnerApi\Enums\Endpoint; $connector = SellingPartnerApi::seller( clientId: $client_id, clientSecret: $client_secret, refreshToken: $refresh_token, endpoint: Endpoint::{$endpoint} ); $api = $connector->aPlusContentV20201101(); try { $result = $api->validateContentDocumentAsinRelations( marketplaceId: $marketplace_id, postContentDocumentRequest: new Dto\PostContentDocumentRequest(new Dto\ContentDocument($name, $contentType, $locale, $contentModuleList, $contentSubType))); } catch (Exception $e) { echo 'Exception when calling aPlusContentV20201101->validateContentDocumentAsinRelations: ', $e->getMessage(), PHP_EOL; };
The class exists is the Seller\APlusContentV20201101\Dto directory, so why is not found by the autoloader?
You need to add a use statement:
use
use SellingPartnerApi\Seller\APlusContentV20201101\Dto;
Problem description:
Error:
Class "PostContentDocumentRequest" not found
Code
The class exists is the Seller\APlusContentV20201101\Dto directory, so why is not found by the autoloader?