| Line 15... |
Line 15... |
| 15 |
order_outofstock, batch_orders, update_non_delivery_reason, enqueue_transaction_info_email,\
|
15 |
order_outofstock, batch_orders, update_non_delivery_reason, enqueue_transaction_info_email,\
|
| 16 |
get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
|
16 |
get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
|
| 17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
| 18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
| 19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
| 20 |
process_return, get_return_order
|
20 |
process_return, get_return_order, mark_doas_as_picked_up
|
| 21 |
|
21 |
|
| 22 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
22 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 23 |
to_t_alert, to_t_order, to_t_lineitem
|
23 |
to_t_alert, to_t_order, to_t_lineitem
|
| 24 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
24 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 25 |
LineItem, Order
|
25 |
LineItem, Order
|
| Line 538... |
Line 538... |
| 538 |
"""
|
538 |
"""
|
| 539 |
try:
|
539 |
try:
|
| 540 |
return authorize_pickup(orderId, pickupNumber)
|
540 |
return authorize_pickup(orderId, pickupNumber)
|
| 541 |
finally:
|
541 |
finally:
|
| 542 |
close_session()
|
542 |
close_session()
|
| - |
|
543 |
|
| - |
|
544 |
def markDoasAsPickedUp(self, providerId, pickupDetails):
|
| - |
|
545 |
"""
|
| - |
|
546 |
Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
|
| - |
|
547 |
Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
|
| - |
|
548 |
|
| - |
|
549 |
Parameters:
|
| - |
|
550 |
- providerId
|
| - |
|
551 |
- pickupDetails
|
| - |
|
552 |
"""
|
| - |
|
553 |
try:
|
| - |
|
554 |
orders_not_picked_up = mark_doas_as_picked_up(providerId, pickupDetails)
|
| - |
|
555 |
return [to_t_order(order) for order in orders_not_picked_up]
|
| - |
|
556 |
finally:
|
| - |
|
557 |
close_session()
|
| 543 |
|
558 |
|
| 544 |
def receiveReturn(self, orderId):
|
559 |
def receiveReturn(self, orderId):
|
| 545 |
"""
|
560 |
"""
|
| 546 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
561 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
|
| 547 |
If the order is in any other state, it returns false.
|
562 |
If the order is in any other state, it returns false.
|