| Line 119... |
Line 119... |
| 119 |
update_master_order_awb, add_or_update_shipment_logistics_cost_details, get_return_order_info, get_return_orders_info_map, \
|
119 |
update_master_order_awb, add_or_update_shipment_logistics_cost_details, get_return_order_info, get_return_orders_info_map, \
|
| 120 |
update_return_order_info, bulk_update_return_order_info, get_return_orders_as_per_warehouse, create_return_transaction, \
|
120 |
update_return_order_info, bulk_update_return_order_info, get_return_orders_as_per_warehouse, create_return_transaction, \
|
| 121 |
get_return_transactions_for_customer, get_return_transaction, change_return_transaction_status, \
|
121 |
get_return_transactions_for_customer, get_return_transaction, change_return_transaction_status, \
|
| 122 |
create_return_pickup_request, update_return_pickup_request, get_return_orders_for_return_transaction, \
|
122 |
create_return_pickup_request, update_return_pickup_request, get_return_orders_for_return_transaction, \
|
| 123 |
receive_return_pickup, validate_return_pickup, process_return_pickup, mark_return_transaction_complete, \
|
123 |
receive_return_pickup, validate_return_pickup, process_return_pickup, mark_return_transaction_complete, \
|
| 124 |
refund_return_transaction_payment
|
124 |
refund_return_transaction_payment, get_eligible_orders_for_return, get_eligible_return_orders_for_pickup
|
| 125 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
125 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
| 126 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
126 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
| 127 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
127 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
| 128 |
DigitalTransaction
|
128 |
DigitalTransaction
|
| 129 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
129 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
| Line 3031... |
Line 3031... |
| 3031 |
try:
|
3031 |
try:
|
| 3032 |
return refund_return_transaction_payment(returnOrdersMap, returnTransactionId)
|
3032 |
return refund_return_transaction_payment(returnOrdersMap, returnTransactionId)
|
| 3033 |
finally:
|
3033 |
finally:
|
| 3034 |
close_session()
|
3034 |
close_session()
|
| 3035 |
|
3035 |
|
| - |
|
3036 |
def getEligibleOrdersForReturn(self, customerId, itemCondition, overrideWarranty):
|
| - |
|
3037 |
"""
|
| - |
|
3038 |
Return Eligible Orders for Return Process
|
| - |
|
3039 |
|
| - |
|
3040 |
Parameters
|
| - |
|
3041 |
- customerId
|
| - |
|
3042 |
- itemCondition - (Damaged for return and Defective for DOA)
|
| - |
|
3043 |
- overrideWarranty for Admin so that he can return any order without any warranty.
|
| - |
|
3044 |
|
| - |
|
3045 |
"""
|
| - |
|
3046 |
try:
|
| - |
|
3047 |
orders = []
|
| - |
|
3048 |
eligibleOrders = get_eligible_orders_for_return(customerId, itemCondition, overrideWarranty)
|
| - |
|
3049 |
for order in eligibleOrders:
|
| - |
|
3050 |
orders.append(to_t_order(order))
|
| - |
|
3051 |
return orders
|
| - |
|
3052 |
finally:
|
| - |
|
3053 |
close_session()
|
| - |
|
3054 |
|
| - |
|
3055 |
def getEligibleReturnOrdersForPickup(self, customerId):
|
| - |
|
3056 |
"""
|
| - |
|
3057 |
Return All Eligible Return Orders awaiting pickup
|
| - |
|
3058 |
|
| - |
|
3059 |
Parameters
|
| - |
|
3060 |
- customerId
|
| - |
|
3061 |
|
| - |
|
3062 |
"""
|
| - |
|
3063 |
try:
|
| - |
|
3064 |
returnOrders = []
|
| - |
|
3065 |
eligibleReturnOrders = get_eligible_return_orders_for_pickup(customerId)
|
| - |
|
3066 |
for returnOrder in eligibleReturnOrders:
|
| - |
|
3067 |
returnOrders.append(to_t_returnOrderInfo(returnOrder))
|
| - |
|
3068 |
return returnOrders
|
| - |
|
3069 |
finally:
|
| - |
|
3070 |
close_session()
|
| - |
|
3071 |
|
| 3036 |
def main():
|
3072 |
def main():
|
| 3037 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
3073 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
| 3038 |
|
3074 |
|
| 3039 |
if __name__ == '__main__':
|
3075 |
if __name__ == '__main__':
|
| 3040 |
main()
|
3076 |
main()
|
| 3041 |
|
3077 |
|