From 3097dc15c8aa05cbb96baeb94b5528eb58807e1d Mon Sep 17 00:00:00 2001 From: Galen Rice Date: Mon, 20 Sep 2021 10:40:12 -0400 Subject: [PATCH 1/2] fix: add missing marketplace_id param to list_inventory_supply --- mws/mws.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mws/mws.py b/mws/mws.py index a67907a6..6637a9f4 100644 --- a/mws/mws.py +++ b/mws/mws.py @@ -1524,7 +1524,12 @@ class Inventory(MWS): @utils.next_token_action("ListInventorySupply") def list_inventory_supply( - self, skus=(), datetime_=None, response_group="Basic", next_token=None + self, + skus=(), + datetime_=None, + response_group="Basic", + marketplace_id=None, + next_token=None, ): """ Returns information on available inventory @@ -1534,6 +1539,7 @@ def list_inventory_supply( Action="ListInventorySupply", QueryStartDateTime=datetime_, ResponseGroup=response_group, + MarketplaceId=marketplace_id, ) data.update(utils.enumerate_param("SellerSkus.member.", skus)) return self.make_request(data, "POST") From a404addc2d36ff12fd0d352283b730e1ddc691d8 Mon Sep 17 00:00:00 2001 From: Galen Rice Date: Mon, 20 Sep 2021 10:40:39 -0400 Subject: [PATCH 2/2] docs: bring docstrings for Inventory API in line with develop version --- mws/mws.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/mws/mws.py b/mws/mws.py index 6637a9f4..2ef74efc 100644 --- a/mws/mws.py +++ b/mws/mws.py @@ -1511,8 +1511,10 @@ def list_inbound_shipment_items( class Inventory(MWS): - """ - Amazon MWS Inventory Fulfillment API + """Amazon MWS Inventory Fulfillment API + + `MWS Docs: Inventory API + `_ """ URI = "/FulfillmentInventory/2010-10-01" @@ -1531,8 +1533,12 @@ def list_inventory_supply( marketplace_id=None, next_token=None, ): - """ - Returns information on available inventory + """Returns information on available inventory + + Pass ``next_token`` to call "ListInventorySupplyByNextToken" instead. + + `MWS Docs: ListInventorySupply + `_ """ data = dict( @@ -1545,9 +1551,10 @@ def list_inventory_supply( return self.make_request(data, "POST") def list_inventory_supply_by_next_token(self, token): - """ - Deprecated. - Use `list_inventory_supply(next_token=token)` instead. + """Alias for ``list_inventory_supply(next_token=token)`` + + `MWS Docs: ListInventorySupplyByNextToken + `_ """ # data = dict(Action='ListInventorySupplyByNextToken', NextToken=token) # return self.make_request(data, "POST")