diff --git a/retailcrm/versions/v3.py b/retailcrm/versions/v3.py index 8e26418..cc9409d 100644 --- a/retailcrm/versions/v3.py +++ b/retailcrm/versions/v3.py @@ -461,11 +461,15 @@ class Client(Base): return self.get('/store/inventories') - def inventories_upload(self, offers): + def inventories_upload(self, offers, site=None): """ :param offers: + :param site: :return: Response """ + if site is not None: + self.parameters['site'] = site + self.parameters['offers'] = json.dumps(offers) return self.post('/store/inventories/upload') diff --git a/retailcrm/versions/v4.py b/retailcrm/versions/v4.py index f247b4f..91b028d 100644 --- a/retailcrm/versions/v4.py +++ b/retailcrm/versions/v4.py @@ -522,11 +522,15 @@ class Client(Base): return self.get('/store/inventories') - def inventories_upload(self, offers): + def inventories_upload(self, offers, site=None): """ :param offers: + :param site: :return: Response """ + if site is not None: + self.parameters['site'] = site + self.parameters['offers'] = json.dumps(offers) return self.post('/store/inventories/upload') diff --git a/retailcrm/versions/v5.py b/retailcrm/versions/v5.py index d5452db..1749436 100644 --- a/retailcrm/versions/v5.py +++ b/retailcrm/versions/v5.py @@ -899,13 +899,18 @@ class Client(Base): return self.get('/store/inventories') - def inventories_upload(self, offers): + def inventories_upload(self, offers, site=None): """ :param offers: + :param site: :return: Response """ + if site is not None: + self.parameters['site'] = site + self.parameters['offers'] = json.dumps(offers) + return self.post('/store/inventories/upload') def prices_upload(self, prices):