Subversion Repositories SmartDukaan

Rev

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

Rev 4861 Rev 4862
Line 1... Line 1...
1
'''
1
'''
2
Created on 06-Jul-2011
2
Created on 06-Jul-2011
3
 
3
 
4
@author: Varun Gupta
4
@author: Varun Gupta
5
'''
5
'''
6
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException
6
from shop2020.thriftpy.model.v1.user.ttypes import PromotionException, Discount
7
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
7
from shop2020.model.v1.user.impl.PromotionRuleDataUtilities import get_coupon_usage_count, get_coupon_usage_count_by_user
8
from shop2020.model.v1.user.impl.Dataservice import Discount
-
 
9
 
8
 
10
def execute(cart, coupon_code, args):
9
def execute(cart, coupon_code, args):
11
    if 'items' not in args or 'discount' not in args or 'handset_display_name' not in args:
10
    if 'items' not in args or 'discount' not in args or 'handset_display_name' not in args:
12
        raise PromotionException(109, 'Error in rule arguments.')
11
        raise PromotionException(109, 'Error in rule arguments.')
13
        
12