Conditions | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """ |
||
12 | def place_order_with_items( |
||
13 | storefront_id, user, created_at=None, items_with_quantity=None |
||
14 | ): |
||
15 | orderer = create_orderer(user) |
||
16 | |||
17 | cart = Cart() |
||
18 | |||
19 | if items_with_quantity is not None: |
||
20 | for article, quantity in items_with_quantity: |
||
21 | cart.add_item(article, quantity) |
||
22 | |||
23 | order, _ = order_service.place_order( |
||
24 | storefront_id, orderer, cart, created_at=created_at |
||
25 | ) |
||
26 | |||
27 | return order |
||
28 |