ebanutsya
This commit is contained in:
@@ -8,3 +8,29 @@ def get_orders_by_supplier_product_id(supplier_product_id: str) -> list[dict]:
|
||||
method = f'{router}/getBySupplierProductId?supplierProductId={supplier_product_id}'
|
||||
response = client.method('GET', method)
|
||||
return response
|
||||
|
||||
|
||||
def get_order_by_id(order_id) -> dict:
|
||||
method = f'{router}/getOrderById?orderId={order_id}'
|
||||
response = client.method('GET', method)
|
||||
return response
|
||||
|
||||
|
||||
def ship_order(order_id: int) -> dict:
|
||||
method = f'{router}/shipOrder'
|
||||
data = {'orderId': order_id}
|
||||
response = client.method('POST', method, data=data)
|
||||
return response
|
||||
|
||||
|
||||
def close_order(order_id: int) -> dict:
|
||||
method = f'{router}/closeOrder'
|
||||
data = {'orderId': order_id}
|
||||
response = client.method('POST', method, data=data)
|
||||
return response
|
||||
|
||||
|
||||
def get_orders(order_by: str, desc: int, page: int, shipment_date: str, status: str):
|
||||
method = f'{router}/getOrders?orderBy={order_by}&desc={desc}&page={page}&shipmentDate={shipment_date}&status={status}'
|
||||
response = client.method('GET', method)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user