Subversion Repositories SmartDukaan

Rev

Rev 19868 | Rev 19912 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19868 Rev 19889
Line 15... Line 15...
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, \
16
    to_t_amazonFbaOrderReturn, to_t_flipkartAdvantageOrder, to_t_hsOrder, \
17
    to_t_Creditor, to_t_CreditHistory, to_t_UserSanction, to_t_LoanHistory, \
17
    to_t_Creditor, to_t_CreditHistory, to_t_UserSanction, to_t_LoanHistory, \
18
    to_t_PaginatedCreditHistory, to_t_PaginatedLoanHistory, \
18
    to_t_PaginatedCreditHistory, to_t_PaginatedLoanHistory, \
19
    to_t_PaginatedUserSanction, to_t_returnOrderInfo, to_t_returnTransaction, \
19
    to_t_PaginatedUserSanction, to_t_returnOrderInfo, to_t_returnTransaction, \
20
    to_t_rPickupRequest
20
    to_t_rPickupRequest, to_t_OutstandingPayments
21
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
21
from shop2020.model.v1.order.impl.DataAccessors import create_transaction, \
22
    get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
22
    get_transactions_for_customer, get_transaction_status, get_line_items_for_order, \
23
    get_transaction, get_transactions_for_shopping_cart_id, \
23
    get_transaction, get_transactions_for_shopping_cart_id, \
24
    change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
24
    change_transaction_status, get_orders_for_customer, get_orders_for_transaction, \
25
    get_order, get_returnable_orders_for_customer, \
25
    get_order, get_returnable_orders_for_customer, \
Line 129... Line 129...
129
    get_return_orders_for_return_transaction, receive_return_pickup, \
129
    get_return_orders_for_return_transaction, receive_return_pickup, \
130
    validate_return_pickup, process_return_pickup, mark_return_transaction_complete, \
130
    validate_return_pickup, process_return_pickup, mark_return_transaction_complete, \
131
    refund_return_transaction_payment, get_eligible_orders_for_return, \
131
    refund_return_transaction_payment, get_eligible_orders_for_return, \
132
    get_eligible_return_orders_for_pickup, validate_return_transaction, \
132
    get_eligible_return_orders_for_pickup, validate_return_transaction, \
133
    get_return_pickup_request, mark_return_not_required_orders_as_processed, \
133
    get_return_pickup_request, mark_return_not_required_orders_as_processed, \
134
    get_all_return_orders_for_return_pickup_request, unaccept_order
134
    get_all_return_orders_for_return_pickup_request, unaccept_order,\
-
 
135
    get_outstanding_payments
135
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
136
from shop2020.model.v1.order.impl.DataService import DtrBatchCreditTracker
136
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
137
from shop2020.model.v1.order.impl.model.DTHRechargeOrder import DTHRechargeOrder
137
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
138
from shop2020.model.v1.order.impl.model.DigitalTransaction import \
138
    DigitalTransaction
139
    DigitalTransaction
139
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
140
from shop2020.model.v1.order.impl.model.MobileRechargeOrder import \
Line 2795... Line 2796...
2795
                    sanctionsList.append(to_t_UserSanction(sanction, creditorMap.get('TicketSize')))
2796
                    sanctionsList.append(to_t_UserSanction(sanction, creditorMap.get('TicketSize')))
2796
            return to_t_PaginatedUserSanction(hasMore, totalCount, sanctionsList)
2797
            return to_t_PaginatedUserSanction(hasMore, totalCount, sanctionsList)
2797
        finally:
2798
        finally:
2798
            close_session()
2799
            close_session()
2799
    
2800
    
-
 
2801
    def getOutstandingPayments(self,fetchType,userId,limit):
-
 
2802
        try:
-
 
2803
            userCounterMap, outstandingResults = get_outstanding_payments(fetchType,userId,limit)
-
 
2804
            return [to_t_OutstandingPayments(outstandingResult,userCounterMap.get(outstandingResult.user_id)) for outstandingResult in outstandingResults]
-
 
2805
        finally:
-
 
2806
            close_session()
-
 
2807
            
2800
    def getOrdersInBatchAsPromisedShipping(self, statuses, offset, limit, warehouse_id, source):
2808
    def getOrdersInBatchAsPromisedShipping(self, statuses, offset, limit, warehouse_id, source):
2801
        """
2809
        """
2802
        Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
2810
        Returns at most 'limit' orders with the given statuses for the given warehouse starting from the given offset.
2803
        These orders should be in order of promised shipping time. 
2811
        These orders should be in order of promised shipping time. 
2804
        Pass the status as null and the limit as 0 to ignore them.
2812
        Pass the status as null and the limit as 0 to ignore them.