clean
This commit is contained in:
@ -20,7 +20,7 @@ class OrderManagementService(BaseTCGPlayerService):
|
||||
self.shipping_endpoint = f"/shipping/export{self.API_VERSION}"
|
||||
|
||||
|
||||
async def get_orders(self):
|
||||
async def get_orders(self, open_only: bool = False):
|
||||
search_from = 0
|
||||
orders = []
|
||||
while True:
|
||||
@ -36,6 +36,9 @@ class OrderManagementService(BaseTCGPlayerService):
|
||||
"from": search_from,
|
||||
"size": 25
|
||||
}
|
||||
if open_only:
|
||||
payload["filters"]["orderStatus"] = ["Processing","ReadyToShip","Received","Pulling","ReadyForPickup"]
|
||||
payload["filters"]["fulfillmentTypes"] = ["Normal"]
|
||||
response = await self._make_request("POST", self.order_search_endpoint, data=payload, headers=self._get_headers("POST", "application/json"), auth_required=True)
|
||||
if len(response.get("orders")) == 0:
|
||||
break
|
||||
|
Reference in New Issue
Block a user