Subversion Repositories SmartDukaan

Rev

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

Rev 6736 Rev 7092
Line 10... Line 10...
10
    create_promotion, generate_coupons_for_promotion, apply_coupon, \
10
    create_promotion, generate_coupons_for_promotion, apply_coupon, \
11
    track_coupon_usage, is_alive, get_active_coupons, \
11
    track_coupon_usage, is_alive, get_active_coupons, \
12
    get_successful_payment_count_for_coupon, get_rule_doc_string, \
12
    get_successful_payment_count_for_coupon, get_rule_doc_string, \
13
    get_item_discount_map, get_discounts_for_entity, add_voucher, assign_voucher, \
13
    get_item_discount_map, get_discounts_for_entity, add_voucher, assign_voucher, \
14
    mark_voucher_as_redeemed, create_coupon, get_coupon, apply_recharge_coupon, \
14
    mark_voucher_as_redeemed, create_coupon, get_coupon, apply_recharge_coupon, \
15
    get_active_gvs, delete_coupon, get_emi_discount
15
    get_active_gvs, delete_coupon, get_emi_discount, get_all_coupons_by_promotion_id
16
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import \
16
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import \
17
    get_coupon_usage_count_by_user
17
    get_coupon_usage_count_by_user
18
 
18
 
19
class PromotionServiceHandler:
19
class PromotionServiceHandler:
20
    
20
    
Line 254... Line 254...
254
        """
254
        """
255
        try:
255
        try:
256
            return mark_voucher_as_redeemed(voucherCode, redeemedOn)
256
            return mark_voucher_as_redeemed(voucherCode, redeemedOn)
257
        finally:
257
        finally:
258
            PromotionDataAccessors.close_session()
258
            PromotionDataAccessors.close_session()
-
 
259
            
-
 
260
    def getAllCouponsByPromotionId(self, promotionId):
-
 
261
        try:
-
 
262
            return get_all_coupons_by_promotion_id(promotionId)
-
 
263
        finally:
-
 
264
            PromotionDataAccessors.close_session()
-
 
265
    
-
 
266
        
259
        
267
        
260
    def isAlive(self):
268
    def isAlive(self):
261
        """
269
        """
262
        For checking weather service is active alive or not. It also checks connectivity with database
270
        For checking weather service is active alive or not. It also checks connectivity with database
263
        """
271
        """