This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user