diff --git a/walmart/walmart.py b/walmart/walmart.py index 28f2167..82cec26 100644 --- a/walmart/walmart.py +++ b/walmart/walmart.py @@ -10,8 +10,6 @@ from lxml import etree from lxml.builder import E, ElementMaker -from .exceptions import WalmartAuthenticationError - def epoch_milliseconds(dt): "Walmart accepts timestamps as epoch time in milliseconds" @@ -114,12 +112,6 @@ def send_request( response.raise_for_status() except requests.exceptions.HTTPError: if response.status_code == 401: - raise WalmartAuthenticationError(( - "Invalid client_id or client_secret. Please verify " - "your credentials from https://developer.walmart." - "com/#/generateKey" - )) - elif response.status_code == 400: data = response.json() if data["error"][0]["code"] == \ "INVALID_TOKEN.GMP_GATEWAY_API": @@ -358,11 +350,11 @@ def all(self, **kwargs): def acknowledge(self, id): url = self.url + '/%s/acknowledge' % id - return self.send_request(method='POST', url=url) + return self.connection.send_request(method='POST', url=url) def cancel(self, id, lines): url = self.url + '/%s/cancel' % id - return self.send_request( + return self.connection.send_request( method='POST', url=url, data=self.get_cancel_payload(lines)) def get_cancel_payload(self, lines):