filters in orders by product
This commit is contained in:
		@@ -19,10 +19,10 @@ class SiproClient:
 | 
			
		||||
            self.initialized = True
 | 
			
		||||
            logger_instance.info('SiproClient successfully initialized')
 | 
			
		||||
 | 
			
		||||
    def method(self, http_method: str, method: str, data: dict = None, raw=False):
 | 
			
		||||
    def method(self, http_method: str, method: str, data: dict = None, raw=False, params: dict = None):
 | 
			
		||||
        url = self.api_url + '/assemblr' + method
 | 
			
		||||
        headers = {'Authorization': self.token}
 | 
			
		||||
        response = requests.request(http_method, url, headers=headers, json=data)
 | 
			
		||||
        response = requests.request(http_method, url, headers=headers, json=data, params=params)
 | 
			
		||||
        if raw:
 | 
			
		||||
            return response
 | 
			
		||||
        return response.json()
 | 
			
		||||
 
 | 
			
		||||
@@ -34,3 +34,9 @@ def get_orders(order_by: str, desc: int, page: int, shipment_date: str, status:
 | 
			
		||||
    method = f'{router}/getOrders?orderBy={order_by}&desc={desc}&page={page}&shipmentDate={shipment_date}&status={status}&shipmentWarehouseId={shipment_warehouse_id}'
 | 
			
		||||
    response = client.method('GET', method)
 | 
			
		||||
    return response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def get_orders_from_barcode(params: dict):
 | 
			
		||||
    method = f'{router}/getByProductId'
 | 
			
		||||
    response = client.method('GET', method, params=params)
 | 
			
		||||
    return response
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user