| Line 27... |
Line 27... |
| 27 |
print ' bool isCodApplicable(string couponCode)'
|
27 |
print ' bool isCodApplicable(string couponCode)'
|
| 28 |
print ' getAllPromotions()'
|
28 |
print ' getAllPromotions()'
|
| 29 |
print ' Promotion getPromotionById(i64 promotionId)'
|
29 |
print ' Promotion getPromotionById(i64 promotionId)'
|
| 30 |
print ' void generateCouponsForPromotion(i64 promotionId, string couponCode)'
|
30 |
print ' void generateCouponsForPromotion(i64 promotionId, string couponCode)'
|
| 31 |
print ' Cart applyCoupon(string couponCode, i64 cartId)'
|
31 |
print ' Cart applyCoupon(string couponCode, i64 cartId)'
|
| - |
|
32 |
print ' getEmiDiscount(i64 cartId)'
|
| 32 |
print ' applyRechargeCoupon(string couponCode, i64 totalAmount, i64 userId)'
|
33 |
print ' applyRechargeCoupon(string couponCode, i64 totalAmount, i64 userId)'
|
| 33 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
34 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
| 34 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
35 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
| 35 |
print ' getActiveCodes(i64 promotionId)'
|
36 |
print ' getActiveCodes(i64 promotionId)'
|
| 36 |
print ' void deleteCoupon(string couponCode)'
|
37 |
print ' void deleteCoupon(string couponCode)'
|
| Line 139... |
Line 140... |
| 139 |
if len(args) != 2:
|
140 |
if len(args) != 2:
|
| 140 |
print 'applyCoupon requires 2 args'
|
141 |
print 'applyCoupon requires 2 args'
|
| 141 |
sys.exit(1)
|
142 |
sys.exit(1)
|
| 142 |
pp.pprint(client.applyCoupon(args[0],eval(args[1]),))
|
143 |
pp.pprint(client.applyCoupon(args[0],eval(args[1]),))
|
| 143 |
|
144 |
|
| - |
|
145 |
elif cmd == 'getEmiDiscount':
|
| - |
|
146 |
if len(args) != 1:
|
| - |
|
147 |
print 'getEmiDiscount requires 1 args'
|
| - |
|
148 |
sys.exit(1)
|
| - |
|
149 |
pp.pprint(client.getEmiDiscount(eval(args[0]),))
|
| - |
|
150 |
|
| 144 |
elif cmd == 'applyRechargeCoupon':
|
151 |
elif cmd == 'applyRechargeCoupon':
|
| 145 |
if len(args) != 3:
|
152 |
if len(args) != 3:
|
| 146 |
print 'applyRechargeCoupon requires 3 args'
|
153 |
print 'applyRechargeCoupon requires 3 args'
|
| 147 |
sys.exit(1)
|
154 |
sys.exit(1)
|
| 148 |
pp.pprint(client.applyRechargeCoupon(args[0],eval(args[1]),eval(args[2]),))
|
155 |
pp.pprint(client.applyRechargeCoupon(args[0],eval(args[1]),eval(args[2]),))
|