Subversion Repositories SmartDukaan

Rev

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

Rev 5342 Rev 5407
Line 13... Line 13...
13
    get_track_logs_by_user, get_track_logs, create_master_affiliate,\
13
    get_track_logs_by_user, get_track_logs, create_master_affiliate,\
14
    get_master_affiliate_by_id, get_master_affiliate_by_name, get_affiliates_by_master_affiliate, get_all_master_affiliates,\
14
    get_master_affiliate_by_id, get_master_affiliate_by_name, get_affiliates_by_master_affiliate, get_all_master_affiliates,\
15
    get_user_notes, put_user_note, get_my_research_items,\
15
    get_user_notes, put_user_note, get_my_research_items,\
16
    get_browse_history_items, update_my_research, delete_item_from_my_research,\
16
    get_browse_history_items, update_my_research, delete_item_from_my_research,\
17
    update_browse_history, get_user_by_mobile_number, is_alive, increase_trust_level,\
17
    update_browse_history, get_user_by_mobile_number, is_alive, increase_trust_level,\
18
    get_user_by_cart_id
18
    get_user_by_cart_id, get_trust_level, remove_user_communication
19
 
19
 
20
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
20
from shop2020.model.v1.user.impl.CartDataAccessors import create_cart, get_cart,\
21
    get_cart_by_id, get_carts_between, add_item_to_cart,\
21
    get_cart_by_id, get_carts_between, add_item_to_cart,\
22
    add_address_to_cart, commit_cart,\
22
    add_address_to_cart, commit_cart,\
23
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
23
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
Line 506... Line 506...
506
    def getAllUserCommunications(self):
506
    def getAllUserCommunications(self):
507
        try:
507
        try:
508
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
508
            return [to_t_user_communication(user_communication) for user_communication in get_all_user_communications()]
509
        finally:
509
        finally:
510
            self.closeSession()
510
            self.closeSession()
-
 
511
            
-
 
512
    def removeUserCommunication(self, id):
-
 
513
        try:
-
 
514
            remove_user_communication(id)
-
 
515
        finally:
-
 
516
            self.closeSession()
511
 
517
 
512
    def createMasterAffiliate(self, name, addedOn):
518
    def createMasterAffiliate(self, name, addedOn):
513
        """
519
        """
514
        Parameters
520
        Parameters
515
         - name
521
         - name
Line 756... Line 762...
756
        try:
762
        try:
757
            return increase_trust_level(userId, trustLevelDelta)
763
            return increase_trust_level(userId, trustLevelDelta)
758
        finally:
764
        finally:
759
            self.closeSession()
765
            self.closeSession()
760
    
766
    
-
 
767
    def getTrustLevel(self, userId):
-
 
768
        try:
-
 
769
            return get_trust_level(userId)
-
 
770
        finally:
-
 
771
            self.closeSession()
-
 
772
            
761
    def deleteDiscountsFromCart(self, cartId):
773
    def deleteDiscountsFromCart(self, cartId):
762
        '''
774
        '''
763
        Parameters:
775
        Parameters:
764
         - cartId
776
         - cartId
765
        '''
777
        '''