| Line 13... |
Line 13... |
| 13 |
mark_orders_as_manifested, close_session, accept_order, bill_order, mark_orders_as_picked_up,\
|
13 |
mark_orders_as_manifested, close_session, accept_order, bill_order, mark_orders_as_picked_up,\
|
| 14 |
mark_orders_as_delivered, mark_orders_as_failed, add_jacket_number,\
|
14 |
mark_orders_as_delivered, mark_orders_as_failed, add_jacket_number,\
|
| 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 |
accept_doa, validate_doa
|
| 19 |
|
20 |
|
| 20 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
21 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 21 |
to_t_alert, to_t_order, to_t_lineitem
|
22 |
to_t_alert, to_t_order, to_t_lineitem
|
| 22 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
23 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 23 |
LineItem, Order
|
24 |
LineItem, Order
|
| Line 536... |
Line 537... |
| 536 |
"""
|
537 |
"""
|
| 537 |
try:
|
538 |
try:
|
| 538 |
return authorize_pickup(orderId, pickupNumber)
|
539 |
return authorize_pickup(orderId, pickupNumber)
|
| 539 |
finally:
|
540 |
finally:
|
| 540 |
close_session()
|
541 |
close_session()
|
| - |
|
542 |
|
| - |
|
543 |
def acceptDoa(self, orderId):
|
| - |
|
544 |
"""
|
| - |
|
545 |
If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RETURNED and returns true.
|
| - |
|
546 |
If the order is in any other state, it returns false.
|
| - |
|
547 |
Throws an exception if the order with the given id couldn't be found.
|
| - |
|
548 |
|
| - |
|
549 |
Parameters:
|
| - |
|
550 |
- orderId
|
| - |
|
551 |
"""
|
| 541 |
|
552 |
try:
|
| - |
|
553 |
return accept_doa(orderId)
|
| - |
|
554 |
finally:
|
| - |
|
555 |
close_session()
|
| - |
|
556 |
|
| - |
|
557 |
def validateDoa(self, orderId, isValid):
|
| - |
|
558 |
"""
|
| - |
|
559 |
Used to validate the DOA certificate for an order in the DOA_RETURNED state. If the certificate is valid,
|
| - |
|
560 |
the order state is changed to DOA_PENDING.
|
| - |
|
561 |
If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
|
| - |
|
562 |
If the order is in any other state, it returns false.
|
| - |
|
563 |
Throws an exception if the order with the given id couldn't be found.
|
| - |
|
564 |
|
| - |
|
565 |
Parameters:
|
| - |
|
566 |
- orderId
|
| - |
|
567 |
- isValid
|
| - |
|
568 |
"""
|
| - |
|
569 |
try:
|
| - |
|
570 |
return validate_doa(orderId, isValid)
|
| - |
|
571 |
finally:
|
| - |
|
572 |
close_session()
|
| - |
|
573 |
|
| 542 |
def closeSession(self, ):
|
574 |
def closeSession(self, ):
|
| 543 |
close_session()
|
575 |
close_session()
|