| Line 27... |
Line 27... |
| 27 |
print ' void generateCouponsForPromotion(i64 promotionId, string couponCode)'
|
27 |
print ' void generateCouponsForPromotion(i64 promotionId, string couponCode)'
|
| 28 |
print ' Cart applyCoupon(string couponCode, i64 cartId)'
|
28 |
print ' Cart applyCoupon(string couponCode, i64 cartId)'
|
| 29 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
29 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
| 30 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
30 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
| 31 |
print ' getActiveCoupons()'
|
31 |
print ' getActiveCoupons()'
|
| - |
|
32 |
print ' string createCoupon(i64 promotionId, i64 endOn, string email, i64 amount, i64 usage)'
|
| 32 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
33 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
| 33 |
print ' string getRuleDocString(string ruleName)'
|
34 |
print ' string getRuleDocString(string ruleName)'
|
| 34 |
print ' getItemDiscountMap( itemIds)'
|
35 |
print ' getItemDiscountMap( itemIds)'
|
| 35 |
print ' getDiscountsForEntity(i64 entityId)'
|
36 |
print ' getDiscountsForEntity(i64 entityId)'
|
| 36 |
print ' void addVoucher(Voucher voucher)'
|
37 |
print ' void addVoucher(Voucher voucher)'
|
| Line 132... |
Line 133... |
| 132 |
if len(args) != 0:
|
133 |
if len(args) != 0:
|
| 133 |
print 'getActiveCoupons requires 0 args'
|
134 |
print 'getActiveCoupons requires 0 args'
|
| 134 |
sys.exit(1)
|
135 |
sys.exit(1)
|
| 135 |
pp.pprint(client.getActiveCoupons())
|
136 |
pp.pprint(client.getActiveCoupons())
|
| 136 |
|
137 |
|
| - |
|
138 |
elif cmd == 'createCoupon':
|
| - |
|
139 |
if len(args) != 5:
|
| - |
|
140 |
print 'createCoupon requires 5 args'
|
| - |
|
141 |
sys.exit(1)
|
| - |
|
142 |
pp.pprint(client.createCoupon(eval(args[0]),eval(args[1]),args[2],eval(args[3]),eval(args[4]),))
|
| - |
|
143 |
|
| 137 |
elif cmd == 'getSuccessfulPaymentCountForCoupon':
|
144 |
elif cmd == 'getSuccessfulPaymentCountForCoupon':
|
| 138 |
if len(args) != 1:
|
145 |
if len(args) != 1:
|
| 139 |
print 'getSuccessfulPaymentCountForCoupon requires 1 args'
|
146 |
print 'getSuccessfulPaymentCountForCoupon requires 1 args'
|
| 140 |
sys.exit(1)
|
147 |
sys.exit(1)
|
| 141 |
pp.pprint(client.getSuccessfulPaymentCountForCoupon(args[0],))
|
148 |
pp.pprint(client.getSuccessfulPaymentCountForCoupon(args[0],))
|