ho-nl / BolCom_RetailerApi

Package that talks to the bol.com v8 API
10 stars 10 forks source link

Data validation not depending on fulfilment method #1

Closed petervanackooij closed 5 years ago

petervanackooij commented 5 years ago

First of all: Very nice package! Thanks for that :)

I'm running into this issue where I'm trying to send a FBB offer and the validator says that the 'deliveryCode' key is mandatory:

Key 'deliveryCode' is missing in data array or is not a string

After adding the key the validator is OK and I get a response from Bol saying that the deliveryCode key is not allowed when fulfilment type is FBB. Makes sense because all delivery codes are the same for FBB!

Request contains invalid value(s): 'Fulfilment(type=FBB, deliveryCode=1-2d)', DeliveryCode is not allowed for fulfilment type FBB.

I'm feeling this is a bug in the validator, but correct me if I'm wrong.

JeroenVanLeusden commented 5 years ago

Thank you for your report. This is fixed in commit 2959b30c55faad9c241746e9e8ddb08606e83d10

petervanackooij commented 5 years ago

Awesome, thanks 👍