Subversion Repositories SmartDukaan

Rev

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

Rev 4386 Rev 4394
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_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, add_alert, add_billing_details,\
13
    mark_orders_as_manifested, close_session, accept_order, mark_orders_as_picked_up,\
13
    mark_orders_as_manifested, close_session, accept_order, mark_orders_as_picked_up,\
14
    mark_orders_as_delivered, mark_orders_as_failed,\
14
    mark_orders_as_delivered, mark_orders_as_failed,\
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,\
Line 489... Line 489...
489
        try:
489
        try:
490
            return enqueue_transaction_info_email(transactionId)
490
            return enqueue_transaction_info_email(transactionId)
491
        finally:
491
        finally:
492
            close_session()
492
            close_session()
493
    
493
    
494
    def getAlerts(self, orderId, valid):
494
    def getAlerts(self, type, status, timestamp):
495
        """
495
        """
496
        Parameters:
496
        Parameters:
497
         - orderId
497
         - type
498
         - valid
498
         - status
-
 
499
         - timestamp
499
        """
500
        """
500
        try:
501
        try:
501
            alerts = get_alerts(orderId, valid)
502
            alerts = get_alerts(type, status, timestamp)
502
            
503
            
503
            t_alerts = []
504
            t_alerts = []
504
            
-
 
505
            for alert in alerts:
505
            for alert in alerts:
506
                t_alerts.append(to_t_alert(alert)) 
506
                t_alerts.append(to_t_alert(alert)) 
507
            
507
            
508
            return t_alerts
508
            return t_alerts
509
        finally:
509
        finally:
510
            close_session()
510
            close_session()
511
            
511
 
512
    def setAlert(self, orderId, unset, type, comment):
512
    def addAlert(self, type, description):
513
        """
513
        """
514
        Parameters:
514
        Parameters:
515
         - orderId
-
 
516
         - unset
-
 
517
         - type
515
         - type
518
         - comment
516
         - description
519
        """
517
        """
520
        try:
518
        try:
521
            set_alert(orderId, unset, type, comment)
519
            add_alert(type, description)
522
        finally:
520
        finally:
523
            close_session()
521
            close_session()
524
 
522
 
525
    def getValidOrderCount(self, ):
523
    def getValidOrderCount(self, ):
526
        """
524
        """