Working on all the routes, methods, and models.
This commit is contained in:
@@ -161,6 +161,8 @@ def save_order_obj(order_obj_new:Order_Base, repl_order_line_li:bool=False):
|
||||
def load_order_obj(
|
||||
order_id: int|str,
|
||||
limit: int = 1000,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
inc_order_line_list: bool = False,
|
||||
@@ -210,7 +212,10 @@ def load_order_obj(
|
||||
except ValidationError as e:
|
||||
log.error(e.json())
|
||||
|
||||
return order_obj
|
||||
if model_as_dict:
|
||||
return order_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset) # pylint: disable=no-member
|
||||
else:
|
||||
return order_obj
|
||||
# ### END ### API Order Methods ### load_order_obj() ###
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user