| Line 11... |
Line 11... |
| 11 |
get_returnable_orders_for_customer, get_cancellable_orders_for_customer, get_orders_by_billing_date,\
|
11 |
get_returnable_orders_for_customer, get_cancellable_orders_for_customer, get_orders_by_billing_date,\
|
| 12 |
get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
|
12 |
get_all_orders, change_order_status, get_alerts, set_alert, add_billing_details,\
|
| 13 |
mark_orders_as_manifested, close_session, accept_order, bill_order, mark_orders_as_picked_up,\
|
13 |
mark_orders_as_manifested, close_session, accept_order, bill_order, mark_orders_as_picked_up,\
|
| 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_max_valid_order_amount, get_min_valid_order_amount,\
|
| - |
|
18 |
get_cust_count_with_successful_txn
|
| 17 |
|
19 |
|
| 18 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
20 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 19 |
to_t_alert, to_t_order, to_t_lineitem
|
21 |
to_t_alert, to_t_order, to_t_lineitem
|
| 20 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
22 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 21 |
LineItem, Order
|
23 |
LineItem, Order
|
| Line 450... |
Line 452... |
| 450 |
def getValidOrderCount(self, ):
|
452 |
def getValidOrderCount(self, ):
|
| 451 |
"""
|
453 |
"""
|
| 452 |
Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
454 |
Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| 453 |
"""
|
455 |
"""
|
| 454 |
return get_valid_order_count()
|
456 |
return get_valid_order_count()
|
| - |
|
457 |
|
| - |
|
458 |
def getNoOfCustomersWithSuccessfulTransaction(self, ):
|
| - |
|
459 |
"""
|
| - |
|
460 |
Returns the number of distinct customers who have done successful transactions
|
| - |
|
461 |
"""
|
| - |
|
462 |
return get_cust_count_with_successful_txn()
|
| - |
|
463 |
|
| - |
|
464 |
def getMaxValidOrderAmount(self, ):
|
| - |
|
465 |
"""
|
| - |
|
466 |
Returns the maximum amount of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| - |
|
467 |
"""
|
| - |
|
468 |
return get_max_valid_order_amount()
|
| - |
|
469 |
|
| - |
|
470 |
def getMinValidOrderAmount(self, ):
|
| - |
|
471 |
"""
|
| - |
|
472 |
Returns the minimum amount of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
|
| - |
|
473 |
"""
|
| - |
|
474 |
return get_min_valid_order_amount()
|
| 455 |
|
475 |
|
| 456 |
def closeSession(self, ):
|
476 |
def closeSession(self, ):
|
| 457 |
close_session()
|
477 |
close_session()
|
| 458 |
|
478 |
|
| 459 |
|
479 |
|