ft
All checks were successful
Deploy App to Docker / deploy (push) Successful in 23s

This commit is contained in:
2025-04-07 16:49:18 -04:00
parent 846a44e5fc
commit fff6007a10
2 changed files with 9 additions and 6 deletions

View File

@@ -302,7 +302,7 @@ class TCGPlayerAPIService:
print("No orders found or no valid labels generated.")
return None
def process_open_orders(self):
def process_open_orders(self, order_ids: list[str]=None):
# get all open orders
url = f"{self.config.ORDER_BASE_URL}/search{self.config.API_VERSION}"
"""{"searchRange":"LastThreeMonths","filters":{"sellerKey":"e576ed4c","orderStatuses":["Processing","ReadyToShip","Received","Pulling","ReadyForPickup"],"fulfillmentTypes":["Normal"]},"sortBy":[{"sortingType":"orderStatus","direction":"ascending"},{"sortingType":"orderDate","direction":"ascending"}],"from":0,"size":25}"""
@@ -324,7 +324,8 @@ class TCGPlayerAPIService:
if response:
orders = response.json()
if orders and 'orders' in orders:
order_ids = [order['orderNumber'] for order in orders['orders']]
if order_ids is None:
order_ids = [order['orderNumber'] for order in orders['orders']]
# get packing slip pdf
packing_slip_filename = self.get_packing_slip_pdf_for_orders(order_ids)
# get pull sheet pdf
@@ -346,7 +347,7 @@ class TCGPlayerAPIService:
method='POST',
files=file
)