Subversion Repositories SmartDukaan

Rev

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

Rev 1976 Rev 3385
Line 27... Line 27...
27
  print '  Promotion getPromotionById(i64 promotionId)'
27
  print '  Promotion getPromotionById(i64 promotionId)'
28
  print '  void generateCouponsForPromotion(i64 promotionId, string couponCode)'
28
  print '  void generateCouponsForPromotion(i64 promotionId, string couponCode)'
29
  print '  Cart applyCoupon(string couponCode, i64 cartId)'
29
  print '  Cart applyCoupon(string couponCode, i64 cartId)'
30
  print '  void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
30
  print '  void trackCouponUsage(string couponCode, i64 transactionId, i64 userId)'
31
  print '  i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
31
  print '  i64 getCouponUsageCountByUser(string couponCode, i64 userId)'
-
 
32
  print '   getActiveCoupons()'
-
 
33
  print '  i64 getSuccessfulPaymentCountForCoupon(string couponCode)'
-
 
34
  print '  string getRuleDocString(string ruleName)'
32
  print ''
35
  print ''
33
  sys.exit(0)
36
  sys.exit(0)
34
 
37
 
35
pp = pprint.PrettyPrinter(indent = 2)
38
pp = pprint.PrettyPrinter(indent = 2)
36
host = 'localhost'
39
host = 'localhost'
Line 123... Line 126...
123
  if len(args) != 2:
126
  if len(args) != 2:
124
    print 'getCouponUsageCountByUser requires 2 args'
127
    print 'getCouponUsageCountByUser requires 2 args'
125
    sys.exit(1)
128
    sys.exit(1)
126
  pp.pprint(client.getCouponUsageCountByUser(args[0],eval(args[1]),))
129
  pp.pprint(client.getCouponUsageCountByUser(args[0],eval(args[1]),))
127
 
130
 
-
 
131
elif cmd == 'getActiveCoupons':
-
 
132
  if len(args) != 0:
-
 
133
    print 'getActiveCoupons requires 0 args'
-
 
134
    sys.exit(1)
-
 
135
  pp.pprint(client.getActiveCoupons())
-
 
136
 
-
 
137
elif cmd == 'getSuccessfulPaymentCountForCoupon':
-
 
138
  if len(args) != 1:
-
 
139
    print 'getSuccessfulPaymentCountForCoupon requires 1 args'
-
 
140
    sys.exit(1)
-
 
141
  pp.pprint(client.getSuccessfulPaymentCountForCoupon(args[0],))
-
 
142
 
-
 
143
elif cmd == 'getRuleDocString':
-
 
144
  if len(args) != 1:
-
 
145
    print 'getRuleDocString requires 1 args'
-
 
146
    sys.exit(1)
-
 
147
  pp.pprint(client.getRuleDocString(args[0],))
-
 
148
 
128
transport.close()
149
transport.close()