| Line 26... |
Line 26... |
| 26 |
mark_order_cancellation_request_received,\
|
26 |
mark_order_cancellation_request_received,\
|
| 27 |
mark_order_cancellation_request_denied, refund_transaction,\
|
27 |
mark_order_cancellation_request_denied, refund_transaction,\
|
| 28 |
mark_order_cancellation_request_confirmed,\
|
28 |
mark_order_cancellation_request_confirmed,\
|
| 29 |
mark_transaction_as_payment_flag_removed, accept_orders_for_item_id,\
|
29 |
mark_transaction_as_payment_flag_removed, accept_orders_for_item_id,\
|
| 30 |
mark_orders_as_po_raised, mark_orders_as_reversal_initiated,\
|
30 |
mark_orders_as_po_raised, mark_orders_as_reversal_initiated,\
|
| 31 |
mark_orders_as_not_available
|
31 |
mark_orders_as_not_available, update_shipment_address
|
| 32 |
|
32 |
|
| 33 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
33 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 34 |
to_t_alert, to_t_order, to_t_lineitem
|
34 |
to_t_alert, to_t_order, to_t_lineitem
|
| 35 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
35 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 36 |
LineItem, Order, TransactionServiceException
|
36 |
LineItem, Order, TransactionServiceException
|
| Line 942... |
Line 942... |
| 942 |
try:
|
942 |
try:
|
| 943 |
return mark_order_cancellation_request_confirmed(orderId)
|
943 |
return mark_order_cancellation_request_confirmed(orderId)
|
| 944 |
finally:
|
944 |
finally:
|
| 945 |
close_session()
|
945 |
close_session()
|
| 946 |
|
946 |
|
| - |
|
947 |
def updateShipmentAddress(self, orderId, addressId):
|
| - |
|
948 |
"""
|
| - |
|
949 |
Updates shipment address of an order. Delivery and shipping date estimates
|
| - |
|
950 |
etc. are also updated here.
|
| - |
|
951 |
|
| - |
|
952 |
Throws TransactionServiceException in case address change is not
|
| - |
|
953 |
possible due to certain reasons such as new pincode in address is
|
| - |
|
954 |
not serviceable etc.
|
| - |
|
955 |
|
| - |
|
956 |
Parameters:
|
| - |
|
957 |
- orderId
|
| - |
|
958 |
- addressId
|
| - |
|
959 |
"""
|
| - |
|
960 |
try:
|
| - |
|
961 |
update_shipment_address(orderId, addressId)
|
| - |
|
962 |
finally:
|
| - |
|
963 |
close_session()
|
| - |
|
964 |
|
| 947 |
def acceptOrdersForItemId(self, itemId, inventory):
|
965 |
def acceptOrdersForItemId(self, itemId, inventory):
|
| 948 |
"""
|
966 |
"""
|
| 949 |
Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
|
967 |
Marks the orders as ACCEPTED for the given itemId and inventory. It also updates the accepted timestamp. If the
|
| 950 |
given order is not a COD order, it also captures the payment if the same has not been captured.
|
968 |
given order is not a COD order, it also captures the payment if the same has not been captured.
|
| 951 |
|
969 |
|