feat: add support for multiple label formats in get_label function
This commit is contained in:
@@ -9,8 +9,8 @@ client = get_client()
|
||||
router = '/printing'
|
||||
|
||||
|
||||
def get_label(order_product_id: str) -> BytesIO:
|
||||
method = f'{router}/getLabel?orderId={order_product_id}'
|
||||
def get_label(order_product_id: str, label_format:str='pdf') -> BytesIO:
|
||||
method = f'{router}/getLabel?orderId={order_product_id}&format={label_format}'
|
||||
response: Response = client.method('GET', method, raw=True)
|
||||
data = BytesIO(response.content)
|
||||
return data
|
||||
Reference in New Issue
Block a user