Skip to content

GetItemByLegacyId Fatal error #3

@sunil11475-dev

Description

@sunil11475-dev

I am trying to call for GetItemByLegacyId but getting below error, I tried with David's SDK as well and same error -

Fatal error: Uncaught TypeError: Argument 2 passed to DTS\eBaySDK\Parser\JsonParser::assignProperties() must be of the type array, string given, called in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php on line 99 and defined in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php:16 Stack trace: #0 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(99): DTS\eBaySDK\Parser\JsonParser::assignProperties(Object(DTS\eBaySDK\Browse\Types\TaxType), 'VAT') #1 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(65): DTS\eBaySDK\Parser\JsonParser::actualValue(Object(stdClass), 'VAT') #2 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(26): DTS\eBaySDK\Parser\JsonParser::determineActual in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php on line 16

This is my code -

	$service = new Services\BrowseService([
	    'authorization' => $accesstoken,
	    'marketplaceId' => 'EBAY-US'
	]);
	$request = new Types\GetItemByLegacyIdRestRequest();
	$request->legacy_item_id = '2834XXX97525';
	//$request->legacy_variation_id = '584XXX4289';
	$request->legacy_variation_sku = 'BXXC6_Le_1';
	$response = $service->GetItemByLegacyId($request);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions