| 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 ' applyRechargeCoupon(string couponCode, i64 totalAmount, i64 userId)'
|
| 32 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
33 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
| 33 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
34 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
| 34 |
print ' getActiveCoupons()'
|
35 |
print ' getActiveCoupons()'
|
| 35 |
print ' string createCoupon(i64 promotionId, i64 endOn, string email, i64 amount, bool isCod, i64 usage)'
|
36 |
print ' string createCoupon(i64 promotionId, i64 endOn, string email, i64 amount, bool isCod, i64 usage)'
|
| 36 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
37 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
| Line 136... |
Line 137... |
| 136 |
if len(args) != 2:
|
137 |
if len(args) != 2:
|
| 137 |
print 'applyCoupon requires 2 args'
|
138 |
print 'applyCoupon requires 2 args'
|
| 138 |
sys.exit(1)
|
139 |
sys.exit(1)
|
| 139 |
pp.pprint(client.applyCoupon(args[0],eval(args[1]),))
|
140 |
pp.pprint(client.applyCoupon(args[0],eval(args[1]),))
|
| 140 |
|
141 |
|
| - |
|
142 |
elif cmd == 'applyRechargeCoupon':
|
| - |
|
143 |
if len(args) != 3:
|
| - |
|
144 |
print 'applyRechargeCoupon requires 3 args'
|
| - |
|
145 |
sys.exit(1)
|
| - |
|
146 |
pp.pprint(client.applyRechargeCoupon(args[0],eval(args[1]),eval(args[2]),))
|
| - |
|
147 |
|
| 141 |
elif cmd == 'trackCouponUsage':
|
148 |
elif cmd == 'trackCouponUsage':
|
| 142 |
if len(args) != 3:
|
149 |
if len(args) != 3:
|
| 143 |
print 'trackCouponUsage requires 3 args'
|
150 |
print 'trackCouponUsage requires 3 args'
|
| 144 |
sys.exit(1)
|
151 |
sys.exit(1)
|
| 145 |
pp.pprint(client.trackCouponUsage(args[0],eval(args[1]),eval(args[2]),))
|
152 |
pp.pprint(client.trackCouponUsage(args[0],eval(args[1]),eval(args[2]),))
|