Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latestDeliveryDate is required but not always present in the API response #41

Closed
loekvangool opened this issue Feb 18, 2021 · 2 comments

Comments

@loekvangool
Copy link

loekvangool commented Feb 18, 2021

Got fatal error PHP Fatal error: Uncaught InvalidArgumentException: Key 'latestDeliveryDate' is missing in data array or is not a string in vendor/bol-com/retailer-api/src/Model/Order/OrderItem.php:229

However, latestDeliveryDate is not always present:

Array
(
    [orderItemId] => 
    [offerReference] => 
    [ean] => 
    [title] => 
    [quantity] => 
    [offerPrice] => 
    [offerId] =>
    [transactionFee] => 
    [expiryDate] => 2021-02-22
    [exactDeliveryDate] => 2021-02-19
    [offerCondition] => NEW
    [cancelRequest] =>
    [fulfilmentMethod] => FBR
)

In addition, the fields exactDeliveryDate, expiryDate are not supported at this time.

{
   "orderItemId":"2012345678",
   "offerReference":"BOLCOM00123",
   "ean":"0000007740404",
   "title":"Product Title",
   "quantity":10,
   "offerPrice":27.95,
   "offerId":"xxxx",
   "transactionFee":5.18,
   "latestDeliveryDate":"2017-02-10",
   "expiryDate":"2017-02-13",
   "exactDeliveryDate":"2017-02-13",
   "offerCondition":"NEW",
   "cancelRequest":false,
   "fulfilmentMethod":"FBR",
   "additionalServices":[
      {
         "serviceType":"PLACEMENT_AND_INSTALLATION"
      }
   ]
}
@nocturnalfrog
Copy link

We're running into the same problem.
Is there a temporary workaround?

@loekvangool
Copy link
Author

You can just patch the check of course to fill in something else, as a quick fix.

https://github.com/picqer/bol-retailer-php-client is similar and does not seem to have this check at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants