BolShop._orders() throws a KeyError 'orders'
Hey Stein
I tried your package, seems to be the only up-to-date wrapper with v8 of the retailer API. So thanks for building/maintaining it!
At first I thought the example wasn't working correctly but it turned out that I didn't have any open orders currently(so it threw a KeyError on line 92 in client.py).
Perhaps some logic could be added to see if they orders key is present in the response? e.g.:
def _orders(self):
"""Fetch the open orders."""
response = self._get(self.BASE_URL + "/orders?status=OPEN")
if "orders" in response:
return response["orders"]
return response
Still trying to get up to speed with your library and how to do some things like get the name/address of an (unhandled) open order and mark it as handled or download the invoice of a specific order. If you have some examples for that it would be a huge timesaver!
I wouldn't mind helping out to maintain it either once I understand a bit more of the implementations.
Greets,
Frank.
edit: already figured out how to collect the name & address of an already handled order, assume it's the same for unhandled ones.