selling-partner-api
selling-partner-api copied to clipboard
Problem with Result ProductFeeV0 - Unknown DateTime format
Problem description:
When requesting ProductFeesV0 API the result body returns without problem. But when using the dto() function to return the response object, the call fails with
The value 2024-06-25T12:48:31.000Z uses an unknown DateTime format.
Error:
The value `2024-06-25T12:48:31.000Z` uses a unknown DateTime format.
{
"payload": {
"FeesEstimateResult": {
"Status": "Success"
,"FeesEstimateIdentifier": {
"MarketplaceId": "A1PA6795UKMFR9"
,"IdType": "SellerSKU"
,"SellerId": "ANxxxxxx"
,"SellerInputIdentifier": "A1PA6795UKMFR9"
,"IsAmazonFulfilled": true
,"IdValue": "xxxxx"
,"PriceToEstimateFees": {
"ListingPrice": {
"CurrencyCode": "EUR",
"Amount": 30
}
,"Shipping": {
"CurrencyCode": "EUR",
"Amount": 0
}
}
}
,"FeesEstimate": {
"TimeOfFeesEstimation": "2024-06-25T12:47:42.000Z"
,"TotalFeesEstimate": {
"CurrencyCode": "EUR",
"Amount": 7.88
}
SellingPartnerApi\Exceptions\
UnknownDatetimeFormatException
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php (line 139)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: convertValueToDateTime (line 97)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserializeValue (line 69)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserialize (line 100)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserializeValue (line 69)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserialize (line 100)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserializeValue (line 69)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserialize (line 100)
in vendor/jlevers/selling-partner-api/src/Traits/Deserializes.php :: deserializeValue (line 69)
in vendor/jlevers/selling-partner-api/src/Seller/ProductFeesV0/Requests/GetMyFeesEstimateForSku.php :: deserialize (line 53)
in vendor/saloonphp/saloon/src/Http/Response.php -> createDtoFromResponse (line 310)
Potential fix with https://github.com/jlevers/selling-partner-api/pull/744
Fixed in v7.0.4.