Subversion Repositories SmartDukaan

Rev

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

Rev 766 Rev 921
Line 7... Line 7...
7
from shop2020.model.v1.order.impl.DataAccessors import create_transaction,\
7
from shop2020.model.v1.order.impl.DataAccessors import create_transaction,\
8
create_order, get_new_transaction, get_transactions_for_customer, get_transaction_status,\
8
create_order, get_new_transaction, get_transactions_for_customer, get_transaction_status,\
9
 get_line_items_for_order, get_transaction, get_transactions_for_shopping_cart_id,\
9
 get_line_items_for_order, get_transaction, get_transactions_for_shopping_cart_id,\
10
 change_transaction_status, get_orders_for_customer,get_orders_for_transaction, get_order,\
10
 change_transaction_status, get_orders_for_customer,get_orders_for_transaction, get_order,\
11
 get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
11
 get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
12
    mark_orders_as_manifested, close_session
12
    mark_orders_as_manifested, close_session, accept_order, bill_order
13
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
13
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
14
    to_t_lineitem, to_t_alert, to_t_order, to_t_lineitem
14
    to_t_lineitem, to_t_alert, to_t_order, to_t_lineitem
15
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
15
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
16
    LineItem, Order
16
    LineItem, Order
17
from shop2020.utils.Utils import to_py_date, get_fdate_tdate
17
from shop2020.utils.Utils import to_py_date, get_fdate_tdate
Line 138... Line 138...
138
        """
138
        """
139
        try:
139
        try:
140
            return change_order_status(self, orderId, status, description)
140
            return change_order_status(self, orderId, status, description)
141
        finally:
141
        finally:
142
            close_session()
142
            close_session()
-
 
143
 
-
 
144
    def acceptOrder(self, orderId):
-
 
145
        """
-
 
146
        Parameters:
-
 
147
         - orderId
-
 
148
        """
-
 
149
        try:
-
 
150
            return accept_order(self, orderId)
-
 
151
        finally:
-
 
152
            close_session()
-
 
153
    
-
 
154
    def billOrder(self, orderId):
-
 
155
        """
-
 
156
        Parameters:
-
 
157
         - orderId
-
 
158
        """
-
 
159
        try:
-
 
160
            return bill_order(self, orderId)
-
 
161
        finally:
-
 
162
            close_session()
143
            
163
            
144
    def getOrdersForCustomer(self, customerId, from_date, to_date, status):
164
    def getOrdersForCustomer(self, customerId, from_date, to_date, status):
145
        """
165
        """
146
        Parameters:
166
        Parameters:
147
         - customerId
167
         - customerId