Subversion Repositories SmartDukaan

Rev

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

Rev 21454 Rev 22358
Line 36... Line 36...
36
    is_private_deal_user, add_private_deal_user, change_private_deal_user_status, \
36
    is_private_deal_user, add_private_deal_user, change_private_deal_user_status, \
37
    get_private_deal_user, register_counter, search_counter, \
37
    get_private_deal_user, register_counter, search_counter, \
38
    get_all_users_by_counter, get_active_access_token_for_user, \
38
    get_all_users_by_counter, get_active_access_token_for_user, \
39
    validate_access_token, is_address_editable_for_counter, \
39
    validate_access_token, is_address_editable_for_counter, \
40
    get_billing_address_for_user, is_creditor_assigned, is_tax_invoice_enabled_user, \
40
    get_billing_address_for_user, is_creditor_assigned, is_tax_invoice_enabled_user, \
41
    get_cart_by_value, get_counter_by_user_id, tax_invoice_available,\
41
    get_cart_by_value, get_counter_by_user_id, tax_invoice_available, \
42
    get_counter_name
42
    get_counter_name, update_address
43
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
43
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
44
from shop2020.utils.Utils import log_entry, to_py_date
44
from shop2020.utils.Utils import log_entry, to_py_date
45
 
-
 
46
    
-
 
-
 
45
from shop2020.thriftpy.model.v1.user.UserContextService import setWalletAmountInCart_args
47
 
46
 
48
 
47
 
49
#from apport.hookutils import ret
48
#from apport.hookutils import ret
50
 
-
 
51
class UserContextServiceHandler:
49
class UserContextServiceHandler:
52
    
50
    
53
    
51
    
54
    def __init__(self, dbname='user', db_hostname='localhost'):
52
    def __init__(self, dbname='user', db_hostname='localhost'):
55
        initialize(dbname, db_hostname)
53
        initialize(dbname, db_hostname)
Line 1005... Line 1003...
1005
            
1003
            
1006
    def setWalletAmountInCart(self, cartId, wallet_amount):
1004
    def setWalletAmountInCart(self, cartId, wallet_amount):
1007
        try:
1005
        try:
1008
            return set_wallet_amount_in_cart(cartId, wallet_amount)
1006
            return set_wallet_amount_in_cart(cartId, wallet_amount)
1009
        finally:
1007
        finally:
1010
            self.closeSession()
-
 
1011
1008
            self.closeSession()
-
 
1009
            
-
 
1010
            
-
 
1011
    def updateAddress(self, address):
-
 
1012
        try:
-
 
1013
            return update_address(address)
-
 
1014
        finally:
-
 
1015
            self.closeSession()
-
 
1016
        
-
 
1017
1012
1018