Subversion Repositories SmartDukaan

Rev

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

Rev 6821 Rev 6903
Line 22... Line 22...
22
    get_cart_by_id, get_carts_between, add_item_to_cart,\
22
    get_cart_by_id, get_carts_between, add_item_to_cart,\
23
    add_address_to_cart, commit_cart,\
23
    add_address_to_cart, commit_cart,\
24
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
24
    validate_cart, merge_cart, delete_item_from_cart, check_out, reset_cart,\
25
    apply_coupon_to_cart, remove_coupon, get_carts_with_coupon_count,\
25
    apply_coupon_to_cart, remove_coupon, get_carts_with_coupon_count,\
26
    delete_discounts_from_cart, save_discounts, show_cod_option,\
26
    delete_discounts_from_cart, save_discounts, show_cod_option,\
-
 
27
    insure_item, cancel_insurance, store_insurance_specific_details,\
27
    add_store_to_cart, is_product_added_to_cart
28
    is_insurance_detail_present, add_store_to_cart, is_product_added_to_cart
-
 
29
    
28
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, to_t_address, to_t_user_communication,\
30
from shop2020.model.v1.user.impl.Converters import to_t_user, to_t_cart, to_t_address, to_t_user_communication,\
29
     to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log
31
     to_t_master_affiliate, to_t_affiliate, to_t_tracker, to_t_track_log
30
 
32
 
31
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
33
from shop2020.thriftpy.model.v1.user.ttypes import ShoppingCartException
32
 
34
 
Line 808... Line 810...
808
            return is_product_added_to_cart(item_id, startDate, endDate)
810
            return is_product_added_to_cart(item_id, startDate, endDate)
809
        finally:
811
        finally:
810
            self.closeSession()
812
            self.closeSession()
811
        
813
        
812
        
814
        
-
 
815
    def insureItem(self, itemId, cartId, toInsure):
-
 
816
        try:
-
 
817
            return insure_item(itemId, cartId, toInsure)
-
 
818
        finally:
-
 
819
            self.closeSession()
-
 
820
            
-
 
821
    def cancelInsurance(self, cartId):
-
 
822
        try:
-
 
823
            return cancel_insurance(cartId)
-
 
824
        finally:
-
 
825
            self.closeSession()
-
 
826
            
-
 
827
    def storeInsuranceSpecificDetails (self, addressId, dob, guardianName):
-
 
828
        try:
-
 
829
            return store_insurance_specific_details(addressId, dob, guardianName)
-
 
830
        finally:
-
 
831
            self.closeSession()
-
 
832
                    
-
 
833
    def isInsuranceDetailPresent(self, addressId):
-
 
834
        try:
-
 
835
            return is_insurance_detail_present(addressId)
-
 
836
        finally:
-
 
837
            self.closeSession()
-
 
838
    
813
    def closeSession(self, ):
839
    def closeSession(self, ):
814
        CartDataAccessors.close_session()
840
        CartDataAccessors.close_session()
815
        UserDataAccessors.close_session()
841
        UserDataAccessors.close_session()
816
 
842
 
817
    def isAlive(self, ):
843
    def isAlive(self, ):