ebanutsya

This commit is contained in:
2023-11-06 07:22:50 +03:00
parent b7a4df1e30
commit 9fe15529a8
8 changed files with 239 additions and 26 deletions

View File

@@ -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