Subversion Repositories SmartDukaan

Rev

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

Rev 2609 Rev 2616
Line 14... Line 14...
14
    mark_orders_as_delivered, mark_orders_as_failed, add_jacket_number,\
14
    mark_orders_as_delivered, mark_orders_as_failed, add_jacket_number,\
15
    order_outofstock, batch_orders, update_non_delivery_reason, enqueue_transaction_info_email,\
15
    order_outofstock, batch_orders, update_non_delivery_reason, enqueue_transaction_info_email,\
16
    get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
16
    get_undelivered_orders, get_order_for_customer, get_valid_order_count,\
17
    get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
17
    get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
18
    get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
18
    get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
19
    accept_doa, validate_doa
19
    receive_return, validate_doa
20
 
20
 
21
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
21
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
22
    to_t_alert, to_t_order, to_t_lineitem
22
    to_t_alert, to_t_order, to_t_lineitem
23
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
23
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
24
    LineItem, Order
24
    LineItem, Order
Line 538... Line 538...
538
        try:
538
        try:
539
            return authorize_pickup(orderId, pickupNumber)
539
            return authorize_pickup(orderId, pickupNumber)
540
        finally:
540
        finally:
541
            close_session()    
541
            close_session()    
542
    
542
    
543
    def acceptDoa(self, orderId):
543
    def receiveReturn(self, orderId):
544
        """
544
        """
545
        If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
545
        If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
546
        If the order is in any other state, it returns false.
546
        If the order is in any other state, it returns false.
547
        Throws an exception if the order with the given id couldn't be found.
547
        Throws an exception if the order with the given id couldn't be found.
548
        
548
        
549
        Parameters:
549
        Parameters:
550
         - orderId
550
         - orderId
551
        """
551
        """
552
        try:
552
        try:
553
            return accept_doa(orderId)
553
            return receive_return(orderId)
554
        finally:
554
        finally:
555
            close_session()
555
            close_session()
556
 
556
 
557
    def validateDoa(self, orderId, isValid):
557
    def validateDoa(self, orderId, isValid):
558
        """
558
        """