PHP Fatal error: Uncaught TypeError: AmazonPHP\SellingPartner\Model\ProductFees\FeesEstimateByIdRequest::getIdType(): Return value must be of type AmazonPHP\SellingPartner\Model\ProductFees\IdType, string returned in \vendor\amazon-php\sp-api-sdk\src\AmazonPHP\SellingPartner\Model\ProductFees\FeesEstimateByIdRequest.php:222
The issue is that IdType has no constructor nor getter/setter functions so the only way to use it correctly is to statically refer to the the ASIN enum via IdType::ASIN. This will always return a string however, thus meaning it's impossible to correctly call this function.
I corrected it by editing the getIdType and setIdType functions in FeeEstimateByIdRequest.php to:
public function getIdType() : string
{
return $this->container['id_type'];
}
public function setIdType(string $id_type) : self
{
$this->container['id_type'] = $id_type;
return $this;
}
I've been working with the getMyFeesEstimate function and have been receiving a type error for the id_type parameter. My request looks like:
When run, I receive the error:
PHP Fatal error: Uncaught TypeError: AmazonPHP\SellingPartner\Model\ProductFees\FeesEstimateByIdRequest::getIdType(): Return value must be of type AmazonPHP\SellingPartner\Model\ProductFees\IdType, string returned in \vendor\amazon-php\sp-api-sdk\src\AmazonPHP\SellingPartner\Model\ProductFees\FeesEstimateByIdRequest.php:222
The issue is that IdType has no constructor nor getter/setter functions so the only way to use it correctly is to statically refer to the the ASIN enum via IdType::ASIN. This will always return a string however, thus meaning it's impossible to correctly call this function.
I corrected it by editing the getIdType and setIdType functions in FeeEstimateByIdRequest.php to: