| 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, get_eligible_orders_for_return, get_eligible_return_orders_for_pickup
|
124 |
refund_return_transaction_payment, get_eligible_orders_for_return, get_eligible_return_orders_for_pickup, \
|
| - |
|
125 |
validate_return_transaction
|
| 125 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
126 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
| 126 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
127 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
| 127 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
128 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
| 128 |
DigitalTransaction
|
129 |
DigitalTransaction
|
| 129 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
130 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
| Line 2870... |
Line 2871... |
| 2870 |
all_returns_orders = get_return_orders_as_per_warehouse(warehouseId)
|
2871 |
all_returns_orders = get_return_orders_as_per_warehouse(warehouseId)
|
| 2871 |
return [to_t_returnOrderInfo(order) for order in all_returns_orders]
|
2872 |
return [to_t_returnOrderInfo(order) for order in all_returns_orders]
|
| 2872 |
finally:
|
2873 |
finally:
|
| 2873 |
close_session()
|
2874 |
close_session()
|
| 2874 |
|
2875 |
|
| 2875 |
def createReturnTransaction(self, returnTransaction):
|
2876 |
def createReturnTransaction(self, returnTransaction, itemCondition, overrideWarranty):
|
| 2876 |
"""
|
2877 |
"""
|
| 2877 |
Create Return Ticket or Transaction for all Returns
|
2878 |
Create Return Ticket or Transaction for all Returns
|
| 2878 |
|
2879 |
|
| 2879 |
Parameters:
|
2880 |
Parameters:
|
| 2880 |
- returnTransaction Thrift Object
|
2881 |
- returnTransaction Thrift Object
|
| - |
|
2882 |
- itemCondition
|
| - |
|
2883 |
- overrideWarranty
|
| 2881 |
"""
|
2884 |
"""
|
| 2882 |
try:
|
2885 |
try:
|
| 2883 |
return create_return_transaction(returnTransaction)
|
2886 |
return create_return_transaction(returnTransaction, itemCondition, overrideWarranty)
|
| 2884 |
finally:
|
2887 |
finally:
|
| 2885 |
close_session()
|
2888 |
close_session()
|
| 2886 |
|
2889 |
|
| 2887 |
def getReturnTransactionsForCustomer(self, statusList, customerMobile, customerEmail, returnTransactionId, customerId):
|
2890 |
def getReturnTransactionsForCustomer(self, statusList, customerMobile, customerEmail, returnTransactionId, customerId):
|
| 2888 |
"""
|
2891 |
"""
|
| Line 3066... |
Line 3069... |
| 3066 |
for returnOrder in eligibleReturnOrders:
|
3069 |
for returnOrder in eligibleReturnOrders:
|
| 3067 |
returnOrders.append(to_t_returnOrderInfo(returnOrder))
|
3070 |
returnOrders.append(to_t_returnOrderInfo(returnOrder))
|
| 3068 |
return returnOrders
|
3071 |
return returnOrders
|
| 3069 |
finally:
|
3072 |
finally:
|
| 3070 |
close_session()
|
3073 |
close_session()
|
| - |
|
3074 |
|
| - |
|
3075 |
def validateReturnTransaction(self, customerId, returnOrdersMap, itemCondition, overrideWarranty):
|
| - |
|
3076 |
"""
|
| - |
|
3077 |
To Validate return transaction data
|
| - |
|
3078 |
|
| - |
|
3079 |
Parameters
|
| - |
|
3080 |
- customerId
|
| - |
|
3081 |
- returnOrdersMap
|
| - |
|
3082 |
- itemCondition
|
| - |
|
3083 |
- overrideWarranty
|
| - |
|
3084 |
"""
|
| - |
|
3085 |
try:
|
| - |
|
3086 |
return validate_return_transaction(customerId, returnOrdersMap, itemCondition, overrideWarranty)
|
| - |
|
3087 |
finally:
|
| - |
|
3088 |
close_session()
|
| 3071 |
|
3089 |
|
| 3072 |
def main():
|
3090 |
def main():
|
| 3073 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
3091 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
| 3074 |
|
3092 |
|
| 3075 |
if __name__ == '__main__':
|
3093 |
if __name__ == '__main__':
|