| Line 33... |
Line 33... |
| 33 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
33 |
print ' void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
|
| 34 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
34 |
print ' i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
|
| 35 |
print ' getActiveCodes(i64 promotionId)'
|
35 |
print ' getActiveCodes(i64 promotionId)'
|
| 36 |
print ' void deleteCoupon(string couponCode)'
|
36 |
print ' void deleteCoupon(string couponCode)'
|
| 37 |
print ' getActiveCoupons()'
|
37 |
print ' getActiveCoupons()'
|
| 38 |
print ' string createCoupon(i64 promotionId, i64 endOn, string email, i64 amount, bool isCod, i64 usage, string prefix)'
|
38 |
print ' string createCoupon(i64 promotionId, string arguments, bool isCod, string prefix)'
|
| 39 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
39 |
print ' i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
|
| 40 |
print ' string getRuleDocString(string ruleName)'
|
40 |
print ' string getRuleDocString(string ruleName)'
|
| 41 |
print ' getItemDiscountMap( itemIds)'
|
41 |
print ' getItemDiscountMap( itemIds)'
|
| 42 |
print ' getDiscountsForEntity(i64 entityId)'
|
42 |
print ' getDiscountsForEntity(i64 entityId)'
|
| 43 |
print ' void addVoucher(Voucher voucher)'
|
43 |
print ' void addVoucher(Voucher voucher)'
|
| Line 176... |
Line 176... |
| 176 |
print 'getActiveCoupons requires 0 args'
|
176 |
print 'getActiveCoupons requires 0 args'
|
| 177 |
sys.exit(1)
|
177 |
sys.exit(1)
|
| 178 |
pp.pprint(client.getActiveCoupons())
|
178 |
pp.pprint(client.getActiveCoupons())
|
| 179 |
|
179 |
|
| 180 |
elif cmd == 'createCoupon':
|
180 |
elif cmd == 'createCoupon':
|
| 181 |
if len(args) != 7:
|
181 |
if len(args) != 4:
|
| 182 |
print 'createCoupon requires 7 args'
|
182 |
print 'createCoupon requires 4 args'
|
| 183 |
sys.exit(1)
|
183 |
sys.exit(1)
|
| 184 |
pp.pprint(client.createCoupon(eval(args[0]),eval(args[1]),args[2],eval(args[3]),eval(args[4]),eval(args[5]),args[6],))
|
184 |
pp.pprint(client.createCoupon(eval(args[0]),args[1],eval(args[2]),args[3],))
|
| 185 |
|
185 |
|
| 186 |
elif cmd == 'getSuccessfulPaymentCountForCoupon':
|
186 |
elif cmd == 'getSuccessfulPaymentCountForCoupon':
|
| 187 |
if len(args) != 1:
|
187 |
if len(args) != 1:
|
| 188 |
print 'getSuccessfulPaymentCountForCoupon requires 1 args'
|
188 |
print 'getSuccessfulPaymentCountForCoupon requires 1 args'
|
| 189 |
sys.exit(1)
|
189 |
sys.exit(1)
|