| Line 12... |
Line 12... |
| 12 |
to_t_attribute, to_t_rechargeTransaction, to_t_frc, to_t_hotspot, \
|
12 |
to_t_attribute, to_t_rechargeTransaction, to_t_frc, to_t_hotspot, \
|
| 13 |
to_t_sourcedetail, to_t_amazonorder, to_t_storeOrderDetail, \
|
13 |
to_t_sourcedetail, to_t_amazonorder, to_t_storeOrderDetail, \
|
| 14 |
to_t_storeOrderCollection, to_t_hotspotServiceMatrix, to_t_ebayOrder, \
|
14 |
to_t_storeOrderCollection, to_t_hotspotServiceMatrix, to_t_ebayOrder, \
|
| 15 |
to_t_amazonFbaSalesSnapshot, to_t_snapdealOrder, to_t_flipkartOrder, \
|
15 |
to_t_amazonFbaSalesSnapshot, to_t_snapdealOrder, to_t_flipkartOrder, \
|
| 16 |
to_t_amazonFbaOrderReturn, to_t_flipkartAdvantageOrder, to_t_hsOrder, to_t_Creditor, \
|
16 |
to_t_amazonFbaOrderReturn, to_t_flipkartAdvantageOrder, to_t_hsOrder, to_t_Creditor, \
|
| 17 |
to_t_CreditHistory, to_t_UserSanction, to_t_LoanHistory
|
17 |
to_t_CreditHistory, to_t_UserSanction, to_t_LoanHistory, to_t_PaginatedCreditHostory, \
|
| - |
|
18 |
to_t_PaginatedLoanHistory, to_t_PaginatedUserSanction
|
| 18 |
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
|
19 |
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
|
| 19 |
get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
|
20 |
get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
|
| 20 |
get_transaction, get_transactions_for_shopping_cart_id, \
|
21 |
get_transaction, get_transactions_for_shopping_cart_id, \
|
| 21 |
change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
|
22 |
change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
|
| 22 |
get_order, get_returnable_orders_for_customer, \
|
23 |
get_order, get_returnable_orders_for_customer, \
|
| Line 110... |
Line 111... |
| 110 |
get_invoice_format_logistics_txn_id, homeshop_order_exists, \
|
111 |
get_invoice_format_logistics_txn_id, homeshop_order_exists, \
|
| 111 |
create_homeshop_order, get_homeshop_order, split_bulk_order, move_orders_to_correct_warehouse, \
|
112 |
create_homeshop_order, get_homeshop_order, split_bulk_order, move_orders_to_correct_warehouse, \
|
| 112 |
verify_orders_for_transaction, get_creditor_info, update_creditor_info, get_user_sanction_details, \
|
113 |
verify_orders_for_transaction, get_creditor_info, update_creditor_info, get_user_sanction_details, \
|
| 113 |
update_user_sanction, get_credit_history_records, process_credit_transaction, \
|
114 |
update_user_sanction, get_credit_history_records, process_credit_transaction, \
|
| 114 |
get_loan_payable_for_user_to_creditor, get_loan_history_records, \
|
115 |
get_loan_payable_for_user_to_creditor, get_loan_history_records, \
|
| - |
|
116 |
process_loan_transaction, get_credit_history_records_paginated, get_loan_history_records_paginated, \
|
| 115 |
process_loan_transaction
|
117 |
get_user_sanction_details_paginated
|
| 116 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
118 |
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
|
| 117 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
119 |
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
|
| 118 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
120 |
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
|
| 119 |
DigitalTransaction
|
121 |
DigitalTransaction
|
| 120 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
122 |
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
|
| Line 2741... |
Line 2743... |
| 2741 |
finally:
|
2743 |
finally:
|
| 2742 |
close_session()
|
2744 |
close_session()
|
| 2743 |
|
2745 |
|
| 2744 |
def getLimitedCreditHistoryRecords(self, paymentId, userId, creditorId, limit, offset):
|
2746 |
def getLimitedCreditHistoryRecords(self, paymentId, userId, creditorId, limit, offset):
|
| 2745 |
try:
|
2747 |
try:
|
| 2746 |
return [to_t_CreditHistory(creditHistory) for creditHistory in get_credit_history_records(paymentId, userId, creditorId, None, limit, offset)]
|
2748 |
return get_credit_history_records_paginated(paymentId, userId, creditorId, None, limit, offset)
|
| 2747 |
finally:
|
2749 |
finally:
|
| 2748 |
close_session()
|
2750 |
close_session()
|
| 2749 |
|
2751 |
|
| 2750 |
def getLimitedLoanHistoryRecords(self, paymentId, userId, creditorId, limit, offset):
|
2752 |
def getLimitedLoanHistoryRecords(self, paymentId, userId, creditorId, limit, offset):
|
| 2751 |
try:
|
2753 |
try:
|
| 2752 |
return [to_t_LoanHistory(loanHistory) for loanHistory in get_loan_history_records(paymentId, userId, creditorId, None, limit, offset)]
|
2754 |
return get_loan_history_records_paginated(paymentId, userId, creditorId, None, limit, offset)
|
| 2753 |
finally:
|
2755 |
finally:
|
| 2754 |
close_session()
|
2756 |
close_session()
|
| 2755 |
|
2757 |
|
| - |
|
2758 |
def getUserSanctionsDetailsAsPerLimit(self, userId, creditorId, limit, offset):
|
| - |
|
2759 |
try:
|
| - |
|
2760 |
hasMore, totalCount, returnMap = get_user_sanction_details_paginated(userId, creditorId, limit, offset)
|
| - |
|
2761 |
sanctionsList = []
|
| - |
|
2762 |
for creditorMap in returnMap.values():
|
| - |
|
2763 |
for sanction in creditorMap.get('Sanctions'):
|
| - |
|
2764 |
sanctionsList.append(to_t_UserSanction(sanction, creditorMap.get('TicketSize')))
|
| - |
|
2765 |
return to_t_PaginatedUserSanction(hasMore, totalCount, sanctionsList)
|
| - |
|
2766 |
finally:
|
| - |
|
2767 |
close_session()
|
| - |
|
2768 |
|
| 2756 |
def main():
|
2769 |
def main():
|
| 2757 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
2770 |
OrderServiceHandler().creditBatch(2, '{"483649":100.0, "8021773":23, "123213":10}')
|
| 2758 |
|
2771 |
|
| 2759 |
if __name__ == '__main__':
|
2772 |
if __name__ == '__main__':
|
| 2760 |
main()
|
2773 |
main()
|
| 2761 |
|
2774 |
|