Working on orders and order carts

This commit is contained in:
Scott Idem
2021-08-06 18:53:24 -04:00
parent 5746d8d34b
commit 17cb6786f8
3 changed files with 23 additions and 22 deletions

View File

@@ -53,7 +53,7 @@ async def patch_order_cart_obj(
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,
inc_order_cart_line_list: Optional[bool] = True,
inc_order_cart_cfg: Optional[bool] = True,
inc_order_cfg: Optional[bool] = True,
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
):
@@ -80,7 +80,7 @@ async def patch_order_cart_obj(
if order_cart_obj := load_order_cart_obj(
order_cart_id = order_cart_id,
inc_order_cart_line_list = inc_order_cart_line_list,
inc_order_cart_cfg = inc_order_cart_cfg
inc_order_cfg = inc_order_cfg
):
data = order_cart_obj.dict(by_alias=True, exclude_unset=False)
return mk_resp(data=data)
@@ -119,7 +119,7 @@ async def lookup_order_cart_obj(
for_obj_type: Optional[str] = Query(None, min_length=2, max_length=50),
for_obj_id: Optional[Union[int,str]] = None,
inc_order_cart_line_list: Optional[bool] = True,
inc_order_cart_cfg: Optional[bool] = True,
inc_order_cfg: Optional[bool] = True,
x_account_id: str = Header(...),
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
@@ -173,7 +173,7 @@ async def lookup_order_cart_obj(
if order_cart_obj := load_order_cart_obj(
order_cart_id = order_cart_id,
inc_order_cart_line_list = inc_order_cart_line_list,
inc_order_cart_cfg = inc_order_cart_cfg,
inc_order_cfg = inc_order_cfg,
):
data = order_cart_obj.dict(by_alias=True, exclude_unset=False)
return mk_resp(data=data)
@@ -187,7 +187,7 @@ async def lookup_order_cart_obj(
load_order_cart_obj(
order_cart_id = order_cart_id,
inc_order_cart_line_list = inc_order_cart_line_list,
inc_order_cart_cfg = inc_order_cart_cfg,
inc_order_cfg = inc_order_cfg,
)
)
data = order_cart_obj_li
@@ -202,7 +202,7 @@ async def lookup_order_cart_obj(
async def get_order_cart_obj(
order_cart_id: str = Query(..., min_length=1, max_length=22),
inc_order_cart_line_list: bool = False,
inc_order_cart_cfg: bool = False,
inc_order_cfg: bool = False,
x_account_id: str = Header(...),
by_alias: bool = True,
exclude_unset: bool = True,
@@ -213,7 +213,7 @@ async def get_order_cart_obj(
if order_cart_obj := load_order_cart_obj(
order_cart_id = order_cart_id,
inc_order_cart_line_list = inc_order_cart_line_list,
inc_order_cart_cfg = inc_order_cart_cfg,
inc_order_cfg = inc_order_cfg,
):
data = order_cart_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset)
return mk_resp(data=data)