| 1976 |
varun.gupt |
1 |
#
|
| 3431 |
rajveer |
2 |
# Autogenerated by Thrift Compiler (0.7.0)
|
| 1976 |
varun.gupt |
3 |
#
|
|
|
4 |
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
#
|
|
|
6 |
|
|
|
7 |
from thrift.Thrift import *
|
| 3376 |
rajveer |
8 |
import shop2020.thriftpy.generic.GenericService
|
| 1976 |
varun.gupt |
9 |
from ttypes import *
|
|
|
10 |
from thrift.Thrift import TProcessor
|
|
|
11 |
from thrift.transport import TTransport
|
| 3431 |
rajveer |
12 |
from thrift.protocol import TBinaryProtocol, TProtocol
|
| 1976 |
varun.gupt |
13 |
try:
|
|
|
14 |
from thrift.protocol import fastbinary
|
|
|
15 |
except:
|
|
|
16 |
fastbinary = None
|
|
|
17 |
|
|
|
18 |
|
| 3376 |
rajveer |
19 |
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
|
| 1976 |
varun.gupt |
20 |
"""
|
|
|
21 |
Promotion Service
|
|
|
22 |
"""
|
|
|
23 |
def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
|
|
|
24 |
"""
|
|
|
25 |
Parameters:
|
|
|
26 |
- name
|
|
|
27 |
- ruleExecutionSrc
|
|
|
28 |
- startOn
|
|
|
29 |
- endOn
|
|
|
30 |
"""
|
|
|
31 |
pass
|
|
|
32 |
|
| 6301 |
amit.gupta |
33 |
def getCoupon(self, couponCode):
|
|
|
34 |
"""
|
|
|
35 |
Parameters:
|
|
|
36 |
- couponCode
|
|
|
37 |
"""
|
|
|
38 |
pass
|
|
|
39 |
|
|
|
40 |
def isGiftVoucher(self, couponCode):
|
|
|
41 |
"""
|
|
|
42 |
Parameters:
|
|
|
43 |
- couponCode
|
|
|
44 |
"""
|
|
|
45 |
pass
|
|
|
46 |
|
| 6356 |
amit.gupta |
47 |
def isCodApplicable(self, couponCode):
|
|
|
48 |
"""
|
|
|
49 |
Parameters:
|
|
|
50 |
- couponCode
|
|
|
51 |
"""
|
|
|
52 |
pass
|
|
|
53 |
|
| 1976 |
varun.gupt |
54 |
def getAllPromotions(self, ):
|
|
|
55 |
pass
|
|
|
56 |
|
|
|
57 |
def getPromotionById(self, promotionId):
|
|
|
58 |
"""
|
|
|
59 |
Parameters:
|
|
|
60 |
- promotionId
|
|
|
61 |
"""
|
|
|
62 |
pass
|
|
|
63 |
|
|
|
64 |
def generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
65 |
"""
|
|
|
66 |
Parameters:
|
|
|
67 |
- promotionId
|
|
|
68 |
- couponCode
|
|
|
69 |
"""
|
|
|
70 |
pass
|
|
|
71 |
|
|
|
72 |
def applyCoupon(self, couponCode, cartId):
|
|
|
73 |
"""
|
|
|
74 |
Parameters:
|
|
|
75 |
- couponCode
|
|
|
76 |
- cartId
|
|
|
77 |
"""
|
|
|
78 |
pass
|
|
|
79 |
|
| 6736 |
amit.gupta |
80 |
def getEmiDiscount(self, cartId):
|
|
|
81 |
"""
|
|
|
82 |
Parameters:
|
|
|
83 |
- cartId
|
|
|
84 |
"""
|
|
|
85 |
pass
|
|
|
86 |
|
| 6433 |
anupam.sin |
87 |
def applyRechargeCoupon(self, couponCode, totalAmount, userId):
|
|
|
88 |
"""
|
|
|
89 |
Parameters:
|
|
|
90 |
- couponCode
|
|
|
91 |
- totalAmount
|
|
|
92 |
- userId
|
|
|
93 |
"""
|
|
|
94 |
pass
|
|
|
95 |
|
| 1976 |
varun.gupt |
96 |
def trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
97 |
"""
|
|
|
98 |
Parameters:
|
|
|
99 |
- couponCode
|
|
|
100 |
- transactionId
|
|
|
101 |
- userId
|
|
|
102 |
"""
|
|
|
103 |
pass
|
|
|
104 |
|
|
|
105 |
def getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
106 |
"""
|
|
|
107 |
Parameters:
|
|
|
108 |
- couponCode
|
|
|
109 |
- userId
|
|
|
110 |
"""
|
|
|
111 |
pass
|
|
|
112 |
|
| 6497 |
amit.gupta |
113 |
def getActiveCodes(self, promotionId):
|
|
|
114 |
"""
|
|
|
115 |
Parameters:
|
|
|
116 |
- promotionId
|
|
|
117 |
"""
|
|
|
118 |
pass
|
|
|
119 |
|
|
|
120 |
def deleteCoupon(self, couponCode):
|
|
|
121 |
"""
|
|
|
122 |
Parameters:
|
|
|
123 |
- couponCode
|
|
|
124 |
"""
|
|
|
125 |
pass
|
|
|
126 |
|
| 3385 |
varun.gupt |
127 |
def getActiveCoupons(self, ):
|
|
|
128 |
"""
|
|
|
129 |
Returns a list of active coupons
|
|
|
130 |
"""
|
|
|
131 |
pass
|
| 1976 |
varun.gupt |
132 |
|
| 6730 |
anupam.sin |
133 |
def createCoupon(self, promotionId, couponCode, arguments, isCod, prefix):
|
| 6250 |
amit.gupta |
134 |
"""
|
| 6561 |
amit.gupta |
135 |
Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
|
| 6250 |
amit.gupta |
136 |
|
|
|
137 |
Parameters:
|
|
|
138 |
- promotionId
|
| 6730 |
anupam.sin |
139 |
- couponCode
|
| 6679 |
anupam.sin |
140 |
- arguments
|
| 6356 |
amit.gupta |
141 |
- isCod
|
| 6561 |
amit.gupta |
142 |
- prefix
|
| 6250 |
amit.gupta |
143 |
"""
|
|
|
144 |
pass
|
|
|
145 |
|
| 3385 |
varun.gupt |
146 |
def getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
147 |
"""
|
|
|
148 |
Returns the count of successful payments done using a given coupon
|
| 3431 |
rajveer |
149 |
|
| 3385 |
varun.gupt |
150 |
Parameters:
|
|
|
151 |
- couponCode
|
|
|
152 |
"""
|
|
|
153 |
pass
|
|
|
154 |
|
|
|
155 |
def getRuleDocString(self, ruleName):
|
|
|
156 |
"""
|
|
|
157 |
Returns the doc string of the rule module
|
| 3431 |
rajveer |
158 |
|
| 3385 |
varun.gupt |
159 |
Parameters:
|
|
|
160 |
- ruleName
|
|
|
161 |
"""
|
|
|
162 |
pass
|
|
|
163 |
|
| 4189 |
varun.gupt |
164 |
def getItemDiscountMap(self, itemIds):
|
|
|
165 |
"""
|
|
|
166 |
Parameters:
|
|
|
167 |
- itemIds
|
|
|
168 |
"""
|
|
|
169 |
pass
|
| 3385 |
varun.gupt |
170 |
|
| 4494 |
varun.gupt |
171 |
def getDiscountsForEntity(self, entityId):
|
|
|
172 |
"""
|
|
|
173 |
Parameters:
|
|
|
174 |
- entityId
|
|
|
175 |
"""
|
|
|
176 |
pass
|
| 4189 |
varun.gupt |
177 |
|
| 5469 |
rajveer |
178 |
def addVoucher(self, voucher):
|
|
|
179 |
"""
|
|
|
180 |
Parameters:
|
|
|
181 |
- voucher
|
|
|
182 |
"""
|
|
|
183 |
pass
|
| 4494 |
varun.gupt |
184 |
|
| 5469 |
rajveer |
185 |
def assignVoucher(self, userId, userEmail, voucherType, amount):
|
|
|
186 |
"""
|
|
|
187 |
Parameters:
|
|
|
188 |
- userId
|
|
|
189 |
- userEmail
|
|
|
190 |
- voucherType
|
|
|
191 |
- amount
|
|
|
192 |
"""
|
|
|
193 |
pass
|
|
|
194 |
|
|
|
195 |
def markVoucherAsRedeemed(self, voucherCode, redeemedOn):
|
|
|
196 |
"""
|
|
|
197 |
Parameters:
|
|
|
198 |
- voucherCode
|
|
|
199 |
- redeemedOn
|
|
|
200 |
"""
|
|
|
201 |
pass
|
|
|
202 |
|
|
|
203 |
|
| 3376 |
rajveer |
204 |
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
|
| 1976 |
varun.gupt |
205 |
"""
|
|
|
206 |
Promotion Service
|
|
|
207 |
"""
|
|
|
208 |
def __init__(self, iprot, oprot=None):
|
| 3376 |
rajveer |
209 |
shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
|
| 1976 |
varun.gupt |
210 |
|
|
|
211 |
def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
|
|
|
212 |
"""
|
|
|
213 |
Parameters:
|
|
|
214 |
- name
|
|
|
215 |
- ruleExecutionSrc
|
|
|
216 |
- startOn
|
|
|
217 |
- endOn
|
|
|
218 |
"""
|
|
|
219 |
self.send_createPromotion(name, ruleExecutionSrc, startOn, endOn)
|
|
|
220 |
self.recv_createPromotion()
|
|
|
221 |
|
|
|
222 |
def send_createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
|
|
|
223 |
self._oprot.writeMessageBegin('createPromotion', TMessageType.CALL, self._seqid)
|
|
|
224 |
args = createPromotion_args()
|
|
|
225 |
args.name = name
|
|
|
226 |
args.ruleExecutionSrc = ruleExecutionSrc
|
|
|
227 |
args.startOn = startOn
|
|
|
228 |
args.endOn = endOn
|
|
|
229 |
args.write(self._oprot)
|
|
|
230 |
self._oprot.writeMessageEnd()
|
|
|
231 |
self._oprot.trans.flush()
|
|
|
232 |
|
|
|
233 |
def recv_createPromotion(self, ):
|
|
|
234 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
235 |
if mtype == TMessageType.EXCEPTION:
|
|
|
236 |
x = TApplicationException()
|
|
|
237 |
x.read(self._iprot)
|
|
|
238 |
self._iprot.readMessageEnd()
|
|
|
239 |
raise x
|
|
|
240 |
result = createPromotion_result()
|
|
|
241 |
result.read(self._iprot)
|
|
|
242 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
243 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
244 |
raise result.pex
|
|
|
245 |
return
|
|
|
246 |
|
| 6301 |
amit.gupta |
247 |
def getCoupon(self, couponCode):
|
|
|
248 |
"""
|
|
|
249 |
Parameters:
|
|
|
250 |
- couponCode
|
|
|
251 |
"""
|
|
|
252 |
self.send_getCoupon(couponCode)
|
|
|
253 |
return self.recv_getCoupon()
|
|
|
254 |
|
|
|
255 |
def send_getCoupon(self, couponCode):
|
|
|
256 |
self._oprot.writeMessageBegin('getCoupon', TMessageType.CALL, self._seqid)
|
|
|
257 |
args = getCoupon_args()
|
|
|
258 |
args.couponCode = couponCode
|
|
|
259 |
args.write(self._oprot)
|
|
|
260 |
self._oprot.writeMessageEnd()
|
|
|
261 |
self._oprot.trans.flush()
|
|
|
262 |
|
|
|
263 |
def recv_getCoupon(self, ):
|
|
|
264 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
265 |
if mtype == TMessageType.EXCEPTION:
|
|
|
266 |
x = TApplicationException()
|
|
|
267 |
x.read(self._iprot)
|
|
|
268 |
self._iprot.readMessageEnd()
|
|
|
269 |
raise x
|
|
|
270 |
result = getCoupon_result()
|
|
|
271 |
result.read(self._iprot)
|
|
|
272 |
self._iprot.readMessageEnd()
|
|
|
273 |
if result.success is not None:
|
|
|
274 |
return result.success
|
|
|
275 |
if result.pex is not None:
|
|
|
276 |
raise result.pex
|
|
|
277 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getCoupon failed: unknown result");
|
|
|
278 |
|
|
|
279 |
def isGiftVoucher(self, couponCode):
|
|
|
280 |
"""
|
|
|
281 |
Parameters:
|
|
|
282 |
- couponCode
|
|
|
283 |
"""
|
|
|
284 |
self.send_isGiftVoucher(couponCode)
|
|
|
285 |
return self.recv_isGiftVoucher()
|
|
|
286 |
|
|
|
287 |
def send_isGiftVoucher(self, couponCode):
|
|
|
288 |
self._oprot.writeMessageBegin('isGiftVoucher', TMessageType.CALL, self._seqid)
|
|
|
289 |
args = isGiftVoucher_args()
|
|
|
290 |
args.couponCode = couponCode
|
|
|
291 |
args.write(self._oprot)
|
|
|
292 |
self._oprot.writeMessageEnd()
|
|
|
293 |
self._oprot.trans.flush()
|
|
|
294 |
|
|
|
295 |
def recv_isGiftVoucher(self, ):
|
|
|
296 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
297 |
if mtype == TMessageType.EXCEPTION:
|
|
|
298 |
x = TApplicationException()
|
|
|
299 |
x.read(self._iprot)
|
|
|
300 |
self._iprot.readMessageEnd()
|
|
|
301 |
raise x
|
|
|
302 |
result = isGiftVoucher_result()
|
|
|
303 |
result.read(self._iprot)
|
|
|
304 |
self._iprot.readMessageEnd()
|
|
|
305 |
if result.success is not None:
|
|
|
306 |
return result.success
|
|
|
307 |
if result.pex is not None:
|
|
|
308 |
raise result.pex
|
|
|
309 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "isGiftVoucher failed: unknown result");
|
|
|
310 |
|
| 6356 |
amit.gupta |
311 |
def isCodApplicable(self, couponCode):
|
|
|
312 |
"""
|
|
|
313 |
Parameters:
|
|
|
314 |
- couponCode
|
|
|
315 |
"""
|
|
|
316 |
self.send_isCodApplicable(couponCode)
|
|
|
317 |
return self.recv_isCodApplicable()
|
|
|
318 |
|
|
|
319 |
def send_isCodApplicable(self, couponCode):
|
|
|
320 |
self._oprot.writeMessageBegin('isCodApplicable', TMessageType.CALL, self._seqid)
|
|
|
321 |
args = isCodApplicable_args()
|
|
|
322 |
args.couponCode = couponCode
|
|
|
323 |
args.write(self._oprot)
|
|
|
324 |
self._oprot.writeMessageEnd()
|
|
|
325 |
self._oprot.trans.flush()
|
|
|
326 |
|
|
|
327 |
def recv_isCodApplicable(self, ):
|
|
|
328 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
329 |
if mtype == TMessageType.EXCEPTION:
|
|
|
330 |
x = TApplicationException()
|
|
|
331 |
x.read(self._iprot)
|
|
|
332 |
self._iprot.readMessageEnd()
|
|
|
333 |
raise x
|
|
|
334 |
result = isCodApplicable_result()
|
|
|
335 |
result.read(self._iprot)
|
|
|
336 |
self._iprot.readMessageEnd()
|
|
|
337 |
if result.success is not None:
|
|
|
338 |
return result.success
|
|
|
339 |
if result.pex is not None:
|
|
|
340 |
raise result.pex
|
|
|
341 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "isCodApplicable failed: unknown result");
|
|
|
342 |
|
| 1976 |
varun.gupt |
343 |
def getAllPromotions(self, ):
|
|
|
344 |
self.send_getAllPromotions()
|
|
|
345 |
return self.recv_getAllPromotions()
|
|
|
346 |
|
|
|
347 |
def send_getAllPromotions(self, ):
|
|
|
348 |
self._oprot.writeMessageBegin('getAllPromotions', TMessageType.CALL, self._seqid)
|
|
|
349 |
args = getAllPromotions_args()
|
|
|
350 |
args.write(self._oprot)
|
|
|
351 |
self._oprot.writeMessageEnd()
|
|
|
352 |
self._oprot.trans.flush()
|
|
|
353 |
|
|
|
354 |
def recv_getAllPromotions(self, ):
|
|
|
355 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
356 |
if mtype == TMessageType.EXCEPTION:
|
|
|
357 |
x = TApplicationException()
|
|
|
358 |
x.read(self._iprot)
|
|
|
359 |
self._iprot.readMessageEnd()
|
|
|
360 |
raise x
|
|
|
361 |
result = getAllPromotions_result()
|
|
|
362 |
result.read(self._iprot)
|
|
|
363 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
364 |
if result.success is not None:
|
| 1976 |
varun.gupt |
365 |
return result.success
|
| 3431 |
rajveer |
366 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
367 |
raise result.pex
|
|
|
368 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
|
|
|
369 |
|
|
|
370 |
def getPromotionById(self, promotionId):
|
|
|
371 |
"""
|
|
|
372 |
Parameters:
|
|
|
373 |
- promotionId
|
|
|
374 |
"""
|
|
|
375 |
self.send_getPromotionById(promotionId)
|
|
|
376 |
return self.recv_getPromotionById()
|
|
|
377 |
|
|
|
378 |
def send_getPromotionById(self, promotionId):
|
|
|
379 |
self._oprot.writeMessageBegin('getPromotionById', TMessageType.CALL, self._seqid)
|
|
|
380 |
args = getPromotionById_args()
|
|
|
381 |
args.promotionId = promotionId
|
|
|
382 |
args.write(self._oprot)
|
|
|
383 |
self._oprot.writeMessageEnd()
|
|
|
384 |
self._oprot.trans.flush()
|
|
|
385 |
|
|
|
386 |
def recv_getPromotionById(self, ):
|
|
|
387 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
388 |
if mtype == TMessageType.EXCEPTION:
|
|
|
389 |
x = TApplicationException()
|
|
|
390 |
x.read(self._iprot)
|
|
|
391 |
self._iprot.readMessageEnd()
|
|
|
392 |
raise x
|
|
|
393 |
result = getPromotionById_result()
|
|
|
394 |
result.read(self._iprot)
|
|
|
395 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
396 |
if result.success is not None:
|
| 1976 |
varun.gupt |
397 |
return result.success
|
| 3431 |
rajveer |
398 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
399 |
raise result.pex
|
|
|
400 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
|
|
|
401 |
|
|
|
402 |
def generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
403 |
"""
|
|
|
404 |
Parameters:
|
|
|
405 |
- promotionId
|
|
|
406 |
- couponCode
|
|
|
407 |
"""
|
|
|
408 |
self.send_generateCouponsForPromotion(promotionId, couponCode)
|
|
|
409 |
self.recv_generateCouponsForPromotion()
|
|
|
410 |
|
|
|
411 |
def send_generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
412 |
self._oprot.writeMessageBegin('generateCouponsForPromotion', TMessageType.CALL, self._seqid)
|
|
|
413 |
args = generateCouponsForPromotion_args()
|
|
|
414 |
args.promotionId = promotionId
|
|
|
415 |
args.couponCode = couponCode
|
|
|
416 |
args.write(self._oprot)
|
|
|
417 |
self._oprot.writeMessageEnd()
|
|
|
418 |
self._oprot.trans.flush()
|
|
|
419 |
|
|
|
420 |
def recv_generateCouponsForPromotion(self, ):
|
|
|
421 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
422 |
if mtype == TMessageType.EXCEPTION:
|
|
|
423 |
x = TApplicationException()
|
|
|
424 |
x.read(self._iprot)
|
|
|
425 |
self._iprot.readMessageEnd()
|
|
|
426 |
raise x
|
|
|
427 |
result = generateCouponsForPromotion_result()
|
|
|
428 |
result.read(self._iprot)
|
|
|
429 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
430 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
431 |
raise result.pex
|
|
|
432 |
return
|
|
|
433 |
|
|
|
434 |
def applyCoupon(self, couponCode, cartId):
|
|
|
435 |
"""
|
|
|
436 |
Parameters:
|
|
|
437 |
- couponCode
|
|
|
438 |
- cartId
|
|
|
439 |
"""
|
|
|
440 |
self.send_applyCoupon(couponCode, cartId)
|
|
|
441 |
return self.recv_applyCoupon()
|
|
|
442 |
|
|
|
443 |
def send_applyCoupon(self, couponCode, cartId):
|
|
|
444 |
self._oprot.writeMessageBegin('applyCoupon', TMessageType.CALL, self._seqid)
|
|
|
445 |
args = applyCoupon_args()
|
|
|
446 |
args.couponCode = couponCode
|
|
|
447 |
args.cartId = cartId
|
|
|
448 |
args.write(self._oprot)
|
|
|
449 |
self._oprot.writeMessageEnd()
|
|
|
450 |
self._oprot.trans.flush()
|
|
|
451 |
|
|
|
452 |
def recv_applyCoupon(self, ):
|
|
|
453 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
454 |
if mtype == TMessageType.EXCEPTION:
|
|
|
455 |
x = TApplicationException()
|
|
|
456 |
x.read(self._iprot)
|
|
|
457 |
self._iprot.readMessageEnd()
|
|
|
458 |
raise x
|
|
|
459 |
result = applyCoupon_result()
|
|
|
460 |
result.read(self._iprot)
|
|
|
461 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
462 |
if result.success is not None:
|
| 1976 |
varun.gupt |
463 |
return result.success
|
| 3431 |
rajveer |
464 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
465 |
raise result.pex
|
|
|
466 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
|
|
|
467 |
|
| 6736 |
amit.gupta |
468 |
def getEmiDiscount(self, cartId):
|
|
|
469 |
"""
|
|
|
470 |
Parameters:
|
|
|
471 |
- cartId
|
|
|
472 |
"""
|
|
|
473 |
self.send_getEmiDiscount(cartId)
|
|
|
474 |
return self.recv_getEmiDiscount()
|
|
|
475 |
|
|
|
476 |
def send_getEmiDiscount(self, cartId):
|
|
|
477 |
self._oprot.writeMessageBegin('getEmiDiscount', TMessageType.CALL, self._seqid)
|
|
|
478 |
args = getEmiDiscount_args()
|
|
|
479 |
args.cartId = cartId
|
|
|
480 |
args.write(self._oprot)
|
|
|
481 |
self._oprot.writeMessageEnd()
|
|
|
482 |
self._oprot.trans.flush()
|
|
|
483 |
|
|
|
484 |
def recv_getEmiDiscount(self, ):
|
|
|
485 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
486 |
if mtype == TMessageType.EXCEPTION:
|
|
|
487 |
x = TApplicationException()
|
|
|
488 |
x.read(self._iprot)
|
|
|
489 |
self._iprot.readMessageEnd()
|
|
|
490 |
raise x
|
|
|
491 |
result = getEmiDiscount_result()
|
|
|
492 |
result.read(self._iprot)
|
|
|
493 |
self._iprot.readMessageEnd()
|
|
|
494 |
if result.success is not None:
|
|
|
495 |
return result.success
|
|
|
496 |
if result.pex is not None:
|
|
|
497 |
raise result.pex
|
|
|
498 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getEmiDiscount failed: unknown result");
|
|
|
499 |
|
| 6433 |
anupam.sin |
500 |
def applyRechargeCoupon(self, couponCode, totalAmount, userId):
|
|
|
501 |
"""
|
|
|
502 |
Parameters:
|
|
|
503 |
- couponCode
|
|
|
504 |
- totalAmount
|
|
|
505 |
- userId
|
|
|
506 |
"""
|
|
|
507 |
self.send_applyRechargeCoupon(couponCode, totalAmount, userId)
|
|
|
508 |
return self.recv_applyRechargeCoupon()
|
|
|
509 |
|
|
|
510 |
def send_applyRechargeCoupon(self, couponCode, totalAmount, userId):
|
|
|
511 |
self._oprot.writeMessageBegin('applyRechargeCoupon', TMessageType.CALL, self._seqid)
|
|
|
512 |
args = applyRechargeCoupon_args()
|
|
|
513 |
args.couponCode = couponCode
|
|
|
514 |
args.totalAmount = totalAmount
|
|
|
515 |
args.userId = userId
|
|
|
516 |
args.write(self._oprot)
|
|
|
517 |
self._oprot.writeMessageEnd()
|
|
|
518 |
self._oprot.trans.flush()
|
|
|
519 |
|
|
|
520 |
def recv_applyRechargeCoupon(self, ):
|
|
|
521 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
522 |
if mtype == TMessageType.EXCEPTION:
|
|
|
523 |
x = TApplicationException()
|
|
|
524 |
x.read(self._iprot)
|
|
|
525 |
self._iprot.readMessageEnd()
|
|
|
526 |
raise x
|
|
|
527 |
result = applyRechargeCoupon_result()
|
|
|
528 |
result.read(self._iprot)
|
|
|
529 |
self._iprot.readMessageEnd()
|
|
|
530 |
if result.success is not None:
|
|
|
531 |
return result.success
|
|
|
532 |
if result.pex is not None:
|
|
|
533 |
raise result.pex
|
|
|
534 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "applyRechargeCoupon failed: unknown result");
|
|
|
535 |
|
| 1976 |
varun.gupt |
536 |
def trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
537 |
"""
|
|
|
538 |
Parameters:
|
|
|
539 |
- couponCode
|
|
|
540 |
- transactionId
|
|
|
541 |
- userId
|
|
|
542 |
"""
|
|
|
543 |
self.send_trackCouponUsage(couponCode, transactionId, userId)
|
|
|
544 |
self.recv_trackCouponUsage()
|
|
|
545 |
|
|
|
546 |
def send_trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
547 |
self._oprot.writeMessageBegin('trackCouponUsage', TMessageType.CALL, self._seqid)
|
|
|
548 |
args = trackCouponUsage_args()
|
|
|
549 |
args.couponCode = couponCode
|
|
|
550 |
args.transactionId = transactionId
|
|
|
551 |
args.userId = userId
|
|
|
552 |
args.write(self._oprot)
|
|
|
553 |
self._oprot.writeMessageEnd()
|
|
|
554 |
self._oprot.trans.flush()
|
|
|
555 |
|
|
|
556 |
def recv_trackCouponUsage(self, ):
|
|
|
557 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
558 |
if mtype == TMessageType.EXCEPTION:
|
|
|
559 |
x = TApplicationException()
|
|
|
560 |
x.read(self._iprot)
|
|
|
561 |
self._iprot.readMessageEnd()
|
|
|
562 |
raise x
|
|
|
563 |
result = trackCouponUsage_result()
|
|
|
564 |
result.read(self._iprot)
|
|
|
565 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
566 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
567 |
raise result.pex
|
|
|
568 |
return
|
|
|
569 |
|
|
|
570 |
def getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
571 |
"""
|
|
|
572 |
Parameters:
|
|
|
573 |
- couponCode
|
|
|
574 |
- userId
|
|
|
575 |
"""
|
|
|
576 |
self.send_getCouponUsageCountByUser(couponCode, userId)
|
|
|
577 |
return self.recv_getCouponUsageCountByUser()
|
|
|
578 |
|
|
|
579 |
def send_getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
580 |
self._oprot.writeMessageBegin('getCouponUsageCountByUser', TMessageType.CALL, self._seqid)
|
|
|
581 |
args = getCouponUsageCountByUser_args()
|
|
|
582 |
args.couponCode = couponCode
|
|
|
583 |
args.userId = userId
|
|
|
584 |
args.write(self._oprot)
|
|
|
585 |
self._oprot.writeMessageEnd()
|
|
|
586 |
self._oprot.trans.flush()
|
|
|
587 |
|
|
|
588 |
def recv_getCouponUsageCountByUser(self, ):
|
|
|
589 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
590 |
if mtype == TMessageType.EXCEPTION:
|
|
|
591 |
x = TApplicationException()
|
|
|
592 |
x.read(self._iprot)
|
|
|
593 |
self._iprot.readMessageEnd()
|
|
|
594 |
raise x
|
|
|
595 |
result = getCouponUsageCountByUser_result()
|
|
|
596 |
result.read(self._iprot)
|
|
|
597 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
598 |
if result.success is not None:
|
| 1976 |
varun.gupt |
599 |
return result.success
|
| 3431 |
rajveer |
600 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
601 |
raise result.pex
|
|
|
602 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
|
|
|
603 |
|
| 6497 |
amit.gupta |
604 |
def getActiveCodes(self, promotionId):
|
|
|
605 |
"""
|
|
|
606 |
Parameters:
|
|
|
607 |
- promotionId
|
|
|
608 |
"""
|
|
|
609 |
self.send_getActiveCodes(promotionId)
|
|
|
610 |
return self.recv_getActiveCodes()
|
|
|
611 |
|
|
|
612 |
def send_getActiveCodes(self, promotionId):
|
|
|
613 |
self._oprot.writeMessageBegin('getActiveCodes', TMessageType.CALL, self._seqid)
|
|
|
614 |
args = getActiveCodes_args()
|
|
|
615 |
args.promotionId = promotionId
|
|
|
616 |
args.write(self._oprot)
|
|
|
617 |
self._oprot.writeMessageEnd()
|
|
|
618 |
self._oprot.trans.flush()
|
|
|
619 |
|
|
|
620 |
def recv_getActiveCodes(self, ):
|
|
|
621 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
622 |
if mtype == TMessageType.EXCEPTION:
|
|
|
623 |
x = TApplicationException()
|
|
|
624 |
x.read(self._iprot)
|
|
|
625 |
self._iprot.readMessageEnd()
|
|
|
626 |
raise x
|
|
|
627 |
result = getActiveCodes_result()
|
|
|
628 |
result.read(self._iprot)
|
|
|
629 |
self._iprot.readMessageEnd()
|
|
|
630 |
if result.success is not None:
|
|
|
631 |
return result.success
|
|
|
632 |
if result.pex is not None:
|
|
|
633 |
raise result.pex
|
|
|
634 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCodes failed: unknown result");
|
|
|
635 |
|
|
|
636 |
def deleteCoupon(self, couponCode):
|
|
|
637 |
"""
|
|
|
638 |
Parameters:
|
|
|
639 |
- couponCode
|
|
|
640 |
"""
|
|
|
641 |
self.send_deleteCoupon(couponCode)
|
|
|
642 |
self.recv_deleteCoupon()
|
|
|
643 |
|
|
|
644 |
def send_deleteCoupon(self, couponCode):
|
|
|
645 |
self._oprot.writeMessageBegin('deleteCoupon', TMessageType.CALL, self._seqid)
|
|
|
646 |
args = deleteCoupon_args()
|
|
|
647 |
args.couponCode = couponCode
|
|
|
648 |
args.write(self._oprot)
|
|
|
649 |
self._oprot.writeMessageEnd()
|
|
|
650 |
self._oprot.trans.flush()
|
|
|
651 |
|
|
|
652 |
def recv_deleteCoupon(self, ):
|
|
|
653 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
654 |
if mtype == TMessageType.EXCEPTION:
|
|
|
655 |
x = TApplicationException()
|
|
|
656 |
x.read(self._iprot)
|
|
|
657 |
self._iprot.readMessageEnd()
|
|
|
658 |
raise x
|
|
|
659 |
result = deleteCoupon_result()
|
|
|
660 |
result.read(self._iprot)
|
|
|
661 |
self._iprot.readMessageEnd()
|
|
|
662 |
if result.pex is not None:
|
|
|
663 |
raise result.pex
|
|
|
664 |
return
|
|
|
665 |
|
| 3385 |
varun.gupt |
666 |
def getActiveCoupons(self, ):
|
|
|
667 |
"""
|
|
|
668 |
Returns a list of active coupons
|
|
|
669 |
"""
|
|
|
670 |
self.send_getActiveCoupons()
|
|
|
671 |
return self.recv_getActiveCoupons()
|
| 1976 |
varun.gupt |
672 |
|
| 3385 |
varun.gupt |
673 |
def send_getActiveCoupons(self, ):
|
|
|
674 |
self._oprot.writeMessageBegin('getActiveCoupons', TMessageType.CALL, self._seqid)
|
|
|
675 |
args = getActiveCoupons_args()
|
|
|
676 |
args.write(self._oprot)
|
|
|
677 |
self._oprot.writeMessageEnd()
|
|
|
678 |
self._oprot.trans.flush()
|
|
|
679 |
|
|
|
680 |
def recv_getActiveCoupons(self, ):
|
|
|
681 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
682 |
if mtype == TMessageType.EXCEPTION:
|
|
|
683 |
x = TApplicationException()
|
|
|
684 |
x.read(self._iprot)
|
|
|
685 |
self._iprot.readMessageEnd()
|
|
|
686 |
raise x
|
|
|
687 |
result = getActiveCoupons_result()
|
|
|
688 |
result.read(self._iprot)
|
|
|
689 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
690 |
if result.success is not None:
|
| 3385 |
varun.gupt |
691 |
return result.success
|
| 3431 |
rajveer |
692 |
if result.pex is not None:
|
| 3385 |
varun.gupt |
693 |
raise result.pex
|
|
|
694 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
|
|
|
695 |
|
| 6730 |
anupam.sin |
696 |
def createCoupon(self, promotionId, couponCode, arguments, isCod, prefix):
|
| 6250 |
amit.gupta |
697 |
"""
|
| 6561 |
amit.gupta |
698 |
Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
|
| 6250 |
amit.gupta |
699 |
|
|
|
700 |
Parameters:
|
|
|
701 |
- promotionId
|
| 6730 |
anupam.sin |
702 |
- couponCode
|
| 6679 |
anupam.sin |
703 |
- arguments
|
| 6356 |
amit.gupta |
704 |
- isCod
|
| 6561 |
amit.gupta |
705 |
- prefix
|
| 6250 |
amit.gupta |
706 |
"""
|
| 6730 |
anupam.sin |
707 |
self.send_createCoupon(promotionId, couponCode, arguments, isCod, prefix)
|
| 6250 |
amit.gupta |
708 |
return self.recv_createCoupon()
|
|
|
709 |
|
| 6730 |
anupam.sin |
710 |
def send_createCoupon(self, promotionId, couponCode, arguments, isCod, prefix):
|
| 6250 |
amit.gupta |
711 |
self._oprot.writeMessageBegin('createCoupon', TMessageType.CALL, self._seqid)
|
|
|
712 |
args = createCoupon_args()
|
|
|
713 |
args.promotionId = promotionId
|
| 6730 |
anupam.sin |
714 |
args.couponCode = couponCode
|
| 6679 |
anupam.sin |
715 |
args.arguments = arguments
|
| 6356 |
amit.gupta |
716 |
args.isCod = isCod
|
| 6561 |
amit.gupta |
717 |
args.prefix = prefix
|
| 6250 |
amit.gupta |
718 |
args.write(self._oprot)
|
|
|
719 |
self._oprot.writeMessageEnd()
|
|
|
720 |
self._oprot.trans.flush()
|
|
|
721 |
|
|
|
722 |
def recv_createCoupon(self, ):
|
|
|
723 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
724 |
if mtype == TMessageType.EXCEPTION:
|
|
|
725 |
x = TApplicationException()
|
|
|
726 |
x.read(self._iprot)
|
|
|
727 |
self._iprot.readMessageEnd()
|
|
|
728 |
raise x
|
|
|
729 |
result = createCoupon_result()
|
|
|
730 |
result.read(self._iprot)
|
|
|
731 |
self._iprot.readMessageEnd()
|
|
|
732 |
if result.success is not None:
|
|
|
733 |
return result.success
|
|
|
734 |
if result.pex is not None:
|
|
|
735 |
raise result.pex
|
|
|
736 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "createCoupon failed: unknown result");
|
|
|
737 |
|
| 3385 |
varun.gupt |
738 |
def getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
739 |
"""
|
|
|
740 |
Returns the count of successful payments done using a given coupon
|
| 3431 |
rajveer |
741 |
|
| 3385 |
varun.gupt |
742 |
Parameters:
|
|
|
743 |
- couponCode
|
|
|
744 |
"""
|
|
|
745 |
self.send_getSuccessfulPaymentCountForCoupon(couponCode)
|
|
|
746 |
return self.recv_getSuccessfulPaymentCountForCoupon()
|
|
|
747 |
|
|
|
748 |
def send_getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
749 |
self._oprot.writeMessageBegin('getSuccessfulPaymentCountForCoupon', TMessageType.CALL, self._seqid)
|
|
|
750 |
args = getSuccessfulPaymentCountForCoupon_args()
|
|
|
751 |
args.couponCode = couponCode
|
|
|
752 |
args.write(self._oprot)
|
|
|
753 |
self._oprot.writeMessageEnd()
|
|
|
754 |
self._oprot.trans.flush()
|
|
|
755 |
|
|
|
756 |
def recv_getSuccessfulPaymentCountForCoupon(self, ):
|
|
|
757 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
758 |
if mtype == TMessageType.EXCEPTION:
|
|
|
759 |
x = TApplicationException()
|
|
|
760 |
x.read(self._iprot)
|
|
|
761 |
self._iprot.readMessageEnd()
|
|
|
762 |
raise x
|
|
|
763 |
result = getSuccessfulPaymentCountForCoupon_result()
|
|
|
764 |
result.read(self._iprot)
|
|
|
765 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
766 |
if result.success is not None:
|
| 3385 |
varun.gupt |
767 |
return result.success
|
| 3431 |
rajveer |
768 |
if result.pex is not None:
|
| 3385 |
varun.gupt |
769 |
raise result.pex
|
|
|
770 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
|
|
|
771 |
|
|
|
772 |
def getRuleDocString(self, ruleName):
|
|
|
773 |
"""
|
|
|
774 |
Returns the doc string of the rule module
|
| 3431 |
rajveer |
775 |
|
| 3385 |
varun.gupt |
776 |
Parameters:
|
|
|
777 |
- ruleName
|
|
|
778 |
"""
|
|
|
779 |
self.send_getRuleDocString(ruleName)
|
|
|
780 |
return self.recv_getRuleDocString()
|
|
|
781 |
|
|
|
782 |
def send_getRuleDocString(self, ruleName):
|
|
|
783 |
self._oprot.writeMessageBegin('getRuleDocString', TMessageType.CALL, self._seqid)
|
|
|
784 |
args = getRuleDocString_args()
|
|
|
785 |
args.ruleName = ruleName
|
|
|
786 |
args.write(self._oprot)
|
|
|
787 |
self._oprot.writeMessageEnd()
|
|
|
788 |
self._oprot.trans.flush()
|
|
|
789 |
|
|
|
790 |
def recv_getRuleDocString(self, ):
|
|
|
791 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
792 |
if mtype == TMessageType.EXCEPTION:
|
|
|
793 |
x = TApplicationException()
|
|
|
794 |
x.read(self._iprot)
|
|
|
795 |
self._iprot.readMessageEnd()
|
|
|
796 |
raise x
|
|
|
797 |
result = getRuleDocString_result()
|
|
|
798 |
result.read(self._iprot)
|
|
|
799 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
800 |
if result.success is not None:
|
| 3385 |
varun.gupt |
801 |
return result.success
|
|
|
802 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
|
|
|
803 |
|
| 4189 |
varun.gupt |
804 |
def getItemDiscountMap(self, itemIds):
|
|
|
805 |
"""
|
|
|
806 |
Parameters:
|
|
|
807 |
- itemIds
|
|
|
808 |
"""
|
|
|
809 |
self.send_getItemDiscountMap(itemIds)
|
|
|
810 |
return self.recv_getItemDiscountMap()
|
| 3385 |
varun.gupt |
811 |
|
| 4189 |
varun.gupt |
812 |
def send_getItemDiscountMap(self, itemIds):
|
|
|
813 |
self._oprot.writeMessageBegin('getItemDiscountMap', TMessageType.CALL, self._seqid)
|
|
|
814 |
args = getItemDiscountMap_args()
|
|
|
815 |
args.itemIds = itemIds
|
|
|
816 |
args.write(self._oprot)
|
|
|
817 |
self._oprot.writeMessageEnd()
|
|
|
818 |
self._oprot.trans.flush()
|
|
|
819 |
|
|
|
820 |
def recv_getItemDiscountMap(self, ):
|
|
|
821 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
822 |
if mtype == TMessageType.EXCEPTION:
|
|
|
823 |
x = TApplicationException()
|
|
|
824 |
x.read(self._iprot)
|
|
|
825 |
self._iprot.readMessageEnd()
|
|
|
826 |
raise x
|
|
|
827 |
result = getItemDiscountMap_result()
|
|
|
828 |
result.read(self._iprot)
|
|
|
829 |
self._iprot.readMessageEnd()
|
|
|
830 |
if result.success is not None:
|
|
|
831 |
return result.success
|
|
|
832 |
if result.pex is not None:
|
|
|
833 |
raise result.pex
|
|
|
834 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemDiscountMap failed: unknown result");
|
|
|
835 |
|
| 4494 |
varun.gupt |
836 |
def getDiscountsForEntity(self, entityId):
|
|
|
837 |
"""
|
|
|
838 |
Parameters:
|
|
|
839 |
- entityId
|
|
|
840 |
"""
|
|
|
841 |
self.send_getDiscountsForEntity(entityId)
|
|
|
842 |
return self.recv_getDiscountsForEntity()
|
| 4189 |
varun.gupt |
843 |
|
| 4494 |
varun.gupt |
844 |
def send_getDiscountsForEntity(self, entityId):
|
|
|
845 |
self._oprot.writeMessageBegin('getDiscountsForEntity', TMessageType.CALL, self._seqid)
|
|
|
846 |
args = getDiscountsForEntity_args()
|
|
|
847 |
args.entityId = entityId
|
|
|
848 |
args.write(self._oprot)
|
|
|
849 |
self._oprot.writeMessageEnd()
|
|
|
850 |
self._oprot.trans.flush()
|
|
|
851 |
|
|
|
852 |
def recv_getDiscountsForEntity(self, ):
|
|
|
853 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
854 |
if mtype == TMessageType.EXCEPTION:
|
|
|
855 |
x = TApplicationException()
|
|
|
856 |
x.read(self._iprot)
|
|
|
857 |
self._iprot.readMessageEnd()
|
|
|
858 |
raise x
|
|
|
859 |
result = getDiscountsForEntity_result()
|
|
|
860 |
result.read(self._iprot)
|
|
|
861 |
self._iprot.readMessageEnd()
|
|
|
862 |
if result.success is not None:
|
|
|
863 |
return result.success
|
|
|
864 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
|
|
|
865 |
|
| 5469 |
rajveer |
866 |
def addVoucher(self, voucher):
|
|
|
867 |
"""
|
|
|
868 |
Parameters:
|
|
|
869 |
- voucher
|
|
|
870 |
"""
|
|
|
871 |
self.send_addVoucher(voucher)
|
|
|
872 |
self.recv_addVoucher()
|
| 4494 |
varun.gupt |
873 |
|
| 5469 |
rajveer |
874 |
def send_addVoucher(self, voucher):
|
|
|
875 |
self._oprot.writeMessageBegin('addVoucher', TMessageType.CALL, self._seqid)
|
|
|
876 |
args = addVoucher_args()
|
|
|
877 |
args.voucher = voucher
|
|
|
878 |
args.write(self._oprot)
|
|
|
879 |
self._oprot.writeMessageEnd()
|
|
|
880 |
self._oprot.trans.flush()
|
|
|
881 |
|
|
|
882 |
def recv_addVoucher(self, ):
|
|
|
883 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
884 |
if mtype == TMessageType.EXCEPTION:
|
|
|
885 |
x = TApplicationException()
|
|
|
886 |
x.read(self._iprot)
|
|
|
887 |
self._iprot.readMessageEnd()
|
|
|
888 |
raise x
|
|
|
889 |
result = addVoucher_result()
|
|
|
890 |
result.read(self._iprot)
|
|
|
891 |
self._iprot.readMessageEnd()
|
|
|
892 |
return
|
|
|
893 |
|
|
|
894 |
def assignVoucher(self, userId, userEmail, voucherType, amount):
|
|
|
895 |
"""
|
|
|
896 |
Parameters:
|
|
|
897 |
- userId
|
|
|
898 |
- userEmail
|
|
|
899 |
- voucherType
|
|
|
900 |
- amount
|
|
|
901 |
"""
|
|
|
902 |
self.send_assignVoucher(userId, userEmail, voucherType, amount)
|
|
|
903 |
return self.recv_assignVoucher()
|
|
|
904 |
|
|
|
905 |
def send_assignVoucher(self, userId, userEmail, voucherType, amount):
|
|
|
906 |
self._oprot.writeMessageBegin('assignVoucher', TMessageType.CALL, self._seqid)
|
|
|
907 |
args = assignVoucher_args()
|
|
|
908 |
args.userId = userId
|
|
|
909 |
args.userEmail = userEmail
|
|
|
910 |
args.voucherType = voucherType
|
|
|
911 |
args.amount = amount
|
|
|
912 |
args.write(self._oprot)
|
|
|
913 |
self._oprot.writeMessageEnd()
|
|
|
914 |
self._oprot.trans.flush()
|
|
|
915 |
|
|
|
916 |
def recv_assignVoucher(self, ):
|
|
|
917 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
918 |
if mtype == TMessageType.EXCEPTION:
|
|
|
919 |
x = TApplicationException()
|
|
|
920 |
x.read(self._iprot)
|
|
|
921 |
self._iprot.readMessageEnd()
|
|
|
922 |
raise x
|
|
|
923 |
result = assignVoucher_result()
|
|
|
924 |
result.read(self._iprot)
|
|
|
925 |
self._iprot.readMessageEnd()
|
|
|
926 |
if result.success is not None:
|
|
|
927 |
return result.success
|
|
|
928 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "assignVoucher failed: unknown result");
|
|
|
929 |
|
|
|
930 |
def markVoucherAsRedeemed(self, voucherCode, redeemedOn):
|
|
|
931 |
"""
|
|
|
932 |
Parameters:
|
|
|
933 |
- voucherCode
|
|
|
934 |
- redeemedOn
|
|
|
935 |
"""
|
|
|
936 |
self.send_markVoucherAsRedeemed(voucherCode, redeemedOn)
|
|
|
937 |
return self.recv_markVoucherAsRedeemed()
|
|
|
938 |
|
|
|
939 |
def send_markVoucherAsRedeemed(self, voucherCode, redeemedOn):
|
|
|
940 |
self._oprot.writeMessageBegin('markVoucherAsRedeemed', TMessageType.CALL, self._seqid)
|
|
|
941 |
args = markVoucherAsRedeemed_args()
|
|
|
942 |
args.voucherCode = voucherCode
|
|
|
943 |
args.redeemedOn = redeemedOn
|
|
|
944 |
args.write(self._oprot)
|
|
|
945 |
self._oprot.writeMessageEnd()
|
|
|
946 |
self._oprot.trans.flush()
|
|
|
947 |
|
|
|
948 |
def recv_markVoucherAsRedeemed(self, ):
|
|
|
949 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
950 |
if mtype == TMessageType.EXCEPTION:
|
|
|
951 |
x = TApplicationException()
|
|
|
952 |
x.read(self._iprot)
|
|
|
953 |
self._iprot.readMessageEnd()
|
|
|
954 |
raise x
|
|
|
955 |
result = markVoucherAsRedeemed_result()
|
|
|
956 |
result.read(self._iprot)
|
|
|
957 |
self._iprot.readMessageEnd()
|
|
|
958 |
if result.success is not None:
|
|
|
959 |
return result.success
|
|
|
960 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "markVoucherAsRedeemed failed: unknown result");
|
|
|
961 |
|
|
|
962 |
|
| 3376 |
rajveer |
963 |
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
|
| 1976 |
varun.gupt |
964 |
def __init__(self, handler):
|
| 3376 |
rajveer |
965 |
shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
|
| 1976 |
varun.gupt |
966 |
self._processMap["createPromotion"] = Processor.process_createPromotion
|
| 6301 |
amit.gupta |
967 |
self._processMap["getCoupon"] = Processor.process_getCoupon
|
|
|
968 |
self._processMap["isGiftVoucher"] = Processor.process_isGiftVoucher
|
| 6356 |
amit.gupta |
969 |
self._processMap["isCodApplicable"] = Processor.process_isCodApplicable
|
| 1976 |
varun.gupt |
970 |
self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
|
|
|
971 |
self._processMap["getPromotionById"] = Processor.process_getPromotionById
|
|
|
972 |
self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
|
|
|
973 |
self._processMap["applyCoupon"] = Processor.process_applyCoupon
|
| 6736 |
amit.gupta |
974 |
self._processMap["getEmiDiscount"] = Processor.process_getEmiDiscount
|
| 6433 |
anupam.sin |
975 |
self._processMap["applyRechargeCoupon"] = Processor.process_applyRechargeCoupon
|
| 1976 |
varun.gupt |
976 |
self._processMap["trackCouponUsage"] = Processor.process_trackCouponUsage
|
|
|
977 |
self._processMap["getCouponUsageCountByUser"] = Processor.process_getCouponUsageCountByUser
|
| 6497 |
amit.gupta |
978 |
self._processMap["getActiveCodes"] = Processor.process_getActiveCodes
|
|
|
979 |
self._processMap["deleteCoupon"] = Processor.process_deleteCoupon
|
| 3385 |
varun.gupt |
980 |
self._processMap["getActiveCoupons"] = Processor.process_getActiveCoupons
|
| 6250 |
amit.gupta |
981 |
self._processMap["createCoupon"] = Processor.process_createCoupon
|
| 3385 |
varun.gupt |
982 |
self._processMap["getSuccessfulPaymentCountForCoupon"] = Processor.process_getSuccessfulPaymentCountForCoupon
|
|
|
983 |
self._processMap["getRuleDocString"] = Processor.process_getRuleDocString
|
| 4189 |
varun.gupt |
984 |
self._processMap["getItemDiscountMap"] = Processor.process_getItemDiscountMap
|
| 4494 |
varun.gupt |
985 |
self._processMap["getDiscountsForEntity"] = Processor.process_getDiscountsForEntity
|
| 5469 |
rajveer |
986 |
self._processMap["addVoucher"] = Processor.process_addVoucher
|
|
|
987 |
self._processMap["assignVoucher"] = Processor.process_assignVoucher
|
|
|
988 |
self._processMap["markVoucherAsRedeemed"] = Processor.process_markVoucherAsRedeemed
|
| 1976 |
varun.gupt |
989 |
|
|
|
990 |
def process(self, iprot, oprot):
|
|
|
991 |
(name, type, seqid) = iprot.readMessageBegin()
|
|
|
992 |
if name not in self._processMap:
|
|
|
993 |
iprot.skip(TType.STRUCT)
|
|
|
994 |
iprot.readMessageEnd()
|
|
|
995 |
x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
|
|
|
996 |
oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
|
|
|
997 |
x.write(oprot)
|
|
|
998 |
oprot.writeMessageEnd()
|
|
|
999 |
oprot.trans.flush()
|
|
|
1000 |
return
|
|
|
1001 |
else:
|
|
|
1002 |
self._processMap[name](self, seqid, iprot, oprot)
|
|
|
1003 |
return True
|
|
|
1004 |
|
|
|
1005 |
def process_createPromotion(self, seqid, iprot, oprot):
|
|
|
1006 |
args = createPromotion_args()
|
|
|
1007 |
args.read(iprot)
|
|
|
1008 |
iprot.readMessageEnd()
|
|
|
1009 |
result = createPromotion_result()
|
|
|
1010 |
try:
|
|
|
1011 |
self._handler.createPromotion(args.name, args.ruleExecutionSrc, args.startOn, args.endOn)
|
|
|
1012 |
except PromotionException, pex:
|
|
|
1013 |
result.pex = pex
|
|
|
1014 |
oprot.writeMessageBegin("createPromotion", TMessageType.REPLY, seqid)
|
|
|
1015 |
result.write(oprot)
|
|
|
1016 |
oprot.writeMessageEnd()
|
|
|
1017 |
oprot.trans.flush()
|
|
|
1018 |
|
| 6301 |
amit.gupta |
1019 |
def process_getCoupon(self, seqid, iprot, oprot):
|
|
|
1020 |
args = getCoupon_args()
|
|
|
1021 |
args.read(iprot)
|
|
|
1022 |
iprot.readMessageEnd()
|
|
|
1023 |
result = getCoupon_result()
|
|
|
1024 |
try:
|
|
|
1025 |
result.success = self._handler.getCoupon(args.couponCode)
|
|
|
1026 |
except PromotionException, pex:
|
|
|
1027 |
result.pex = pex
|
|
|
1028 |
oprot.writeMessageBegin("getCoupon", TMessageType.REPLY, seqid)
|
|
|
1029 |
result.write(oprot)
|
|
|
1030 |
oprot.writeMessageEnd()
|
|
|
1031 |
oprot.trans.flush()
|
|
|
1032 |
|
|
|
1033 |
def process_isGiftVoucher(self, seqid, iprot, oprot):
|
|
|
1034 |
args = isGiftVoucher_args()
|
|
|
1035 |
args.read(iprot)
|
|
|
1036 |
iprot.readMessageEnd()
|
|
|
1037 |
result = isGiftVoucher_result()
|
|
|
1038 |
try:
|
|
|
1039 |
result.success = self._handler.isGiftVoucher(args.couponCode)
|
|
|
1040 |
except PromotionException, pex:
|
|
|
1041 |
result.pex = pex
|
|
|
1042 |
oprot.writeMessageBegin("isGiftVoucher", TMessageType.REPLY, seqid)
|
|
|
1043 |
result.write(oprot)
|
|
|
1044 |
oprot.writeMessageEnd()
|
|
|
1045 |
oprot.trans.flush()
|
|
|
1046 |
|
| 6356 |
amit.gupta |
1047 |
def process_isCodApplicable(self, seqid, iprot, oprot):
|
|
|
1048 |
args = isCodApplicable_args()
|
|
|
1049 |
args.read(iprot)
|
|
|
1050 |
iprot.readMessageEnd()
|
|
|
1051 |
result = isCodApplicable_result()
|
|
|
1052 |
try:
|
|
|
1053 |
result.success = self._handler.isCodApplicable(args.couponCode)
|
|
|
1054 |
except PromotionException, pex:
|
|
|
1055 |
result.pex = pex
|
|
|
1056 |
oprot.writeMessageBegin("isCodApplicable", TMessageType.REPLY, seqid)
|
|
|
1057 |
result.write(oprot)
|
|
|
1058 |
oprot.writeMessageEnd()
|
|
|
1059 |
oprot.trans.flush()
|
|
|
1060 |
|
| 1976 |
varun.gupt |
1061 |
def process_getAllPromotions(self, seqid, iprot, oprot):
|
|
|
1062 |
args = getAllPromotions_args()
|
|
|
1063 |
args.read(iprot)
|
|
|
1064 |
iprot.readMessageEnd()
|
|
|
1065 |
result = getAllPromotions_result()
|
|
|
1066 |
try:
|
|
|
1067 |
result.success = self._handler.getAllPromotions()
|
|
|
1068 |
except PromotionException, pex:
|
|
|
1069 |
result.pex = pex
|
|
|
1070 |
oprot.writeMessageBegin("getAllPromotions", TMessageType.REPLY, seqid)
|
|
|
1071 |
result.write(oprot)
|
|
|
1072 |
oprot.writeMessageEnd()
|
|
|
1073 |
oprot.trans.flush()
|
|
|
1074 |
|
|
|
1075 |
def process_getPromotionById(self, seqid, iprot, oprot):
|
|
|
1076 |
args = getPromotionById_args()
|
|
|
1077 |
args.read(iprot)
|
|
|
1078 |
iprot.readMessageEnd()
|
|
|
1079 |
result = getPromotionById_result()
|
|
|
1080 |
try:
|
|
|
1081 |
result.success = self._handler.getPromotionById(args.promotionId)
|
|
|
1082 |
except PromotionException, pex:
|
|
|
1083 |
result.pex = pex
|
|
|
1084 |
oprot.writeMessageBegin("getPromotionById", TMessageType.REPLY, seqid)
|
|
|
1085 |
result.write(oprot)
|
|
|
1086 |
oprot.writeMessageEnd()
|
|
|
1087 |
oprot.trans.flush()
|
|
|
1088 |
|
|
|
1089 |
def process_generateCouponsForPromotion(self, seqid, iprot, oprot):
|
|
|
1090 |
args = generateCouponsForPromotion_args()
|
|
|
1091 |
args.read(iprot)
|
|
|
1092 |
iprot.readMessageEnd()
|
|
|
1093 |
result = generateCouponsForPromotion_result()
|
|
|
1094 |
try:
|
|
|
1095 |
self._handler.generateCouponsForPromotion(args.promotionId, args.couponCode)
|
|
|
1096 |
except PromotionException, pex:
|
|
|
1097 |
result.pex = pex
|
|
|
1098 |
oprot.writeMessageBegin("generateCouponsForPromotion", TMessageType.REPLY, seqid)
|
|
|
1099 |
result.write(oprot)
|
|
|
1100 |
oprot.writeMessageEnd()
|
|
|
1101 |
oprot.trans.flush()
|
|
|
1102 |
|
|
|
1103 |
def process_applyCoupon(self, seqid, iprot, oprot):
|
|
|
1104 |
args = applyCoupon_args()
|
|
|
1105 |
args.read(iprot)
|
|
|
1106 |
iprot.readMessageEnd()
|
|
|
1107 |
result = applyCoupon_result()
|
|
|
1108 |
try:
|
|
|
1109 |
result.success = self._handler.applyCoupon(args.couponCode, args.cartId)
|
|
|
1110 |
except PromotionException, pex:
|
|
|
1111 |
result.pex = pex
|
|
|
1112 |
oprot.writeMessageBegin("applyCoupon", TMessageType.REPLY, seqid)
|
|
|
1113 |
result.write(oprot)
|
|
|
1114 |
oprot.writeMessageEnd()
|
|
|
1115 |
oprot.trans.flush()
|
|
|
1116 |
|
| 6736 |
amit.gupta |
1117 |
def process_getEmiDiscount(self, seqid, iprot, oprot):
|
|
|
1118 |
args = getEmiDiscount_args()
|
|
|
1119 |
args.read(iprot)
|
|
|
1120 |
iprot.readMessageEnd()
|
|
|
1121 |
result = getEmiDiscount_result()
|
|
|
1122 |
try:
|
|
|
1123 |
result.success = self._handler.getEmiDiscount(args.cartId)
|
|
|
1124 |
except PromotionException, pex:
|
|
|
1125 |
result.pex = pex
|
|
|
1126 |
oprot.writeMessageBegin("getEmiDiscount", TMessageType.REPLY, seqid)
|
|
|
1127 |
result.write(oprot)
|
|
|
1128 |
oprot.writeMessageEnd()
|
|
|
1129 |
oprot.trans.flush()
|
|
|
1130 |
|
| 6433 |
anupam.sin |
1131 |
def process_applyRechargeCoupon(self, seqid, iprot, oprot):
|
|
|
1132 |
args = applyRechargeCoupon_args()
|
|
|
1133 |
args.read(iprot)
|
|
|
1134 |
iprot.readMessageEnd()
|
|
|
1135 |
result = applyRechargeCoupon_result()
|
|
|
1136 |
try:
|
|
|
1137 |
result.success = self._handler.applyRechargeCoupon(args.couponCode, args.totalAmount, args.userId)
|
|
|
1138 |
except PromotionException, pex:
|
|
|
1139 |
result.pex = pex
|
|
|
1140 |
oprot.writeMessageBegin("applyRechargeCoupon", TMessageType.REPLY, seqid)
|
|
|
1141 |
result.write(oprot)
|
|
|
1142 |
oprot.writeMessageEnd()
|
|
|
1143 |
oprot.trans.flush()
|
|
|
1144 |
|
| 1976 |
varun.gupt |
1145 |
def process_trackCouponUsage(self, seqid, iprot, oprot):
|
|
|
1146 |
args = trackCouponUsage_args()
|
|
|
1147 |
args.read(iprot)
|
|
|
1148 |
iprot.readMessageEnd()
|
|
|
1149 |
result = trackCouponUsage_result()
|
|
|
1150 |
try:
|
|
|
1151 |
self._handler.trackCouponUsage(args.couponCode, args.transactionId, args.userId)
|
|
|
1152 |
except PromotionException, pex:
|
|
|
1153 |
result.pex = pex
|
|
|
1154 |
oprot.writeMessageBegin("trackCouponUsage", TMessageType.REPLY, seqid)
|
|
|
1155 |
result.write(oprot)
|
|
|
1156 |
oprot.writeMessageEnd()
|
|
|
1157 |
oprot.trans.flush()
|
|
|
1158 |
|
|
|
1159 |
def process_getCouponUsageCountByUser(self, seqid, iprot, oprot):
|
|
|
1160 |
args = getCouponUsageCountByUser_args()
|
|
|
1161 |
args.read(iprot)
|
|
|
1162 |
iprot.readMessageEnd()
|
|
|
1163 |
result = getCouponUsageCountByUser_result()
|
|
|
1164 |
try:
|
|
|
1165 |
result.success = self._handler.getCouponUsageCountByUser(args.couponCode, args.userId)
|
|
|
1166 |
except PromotionException, pex:
|
|
|
1167 |
result.pex = pex
|
|
|
1168 |
oprot.writeMessageBegin("getCouponUsageCountByUser", TMessageType.REPLY, seqid)
|
|
|
1169 |
result.write(oprot)
|
|
|
1170 |
oprot.writeMessageEnd()
|
|
|
1171 |
oprot.trans.flush()
|
|
|
1172 |
|
| 6497 |
amit.gupta |
1173 |
def process_getActiveCodes(self, seqid, iprot, oprot):
|
|
|
1174 |
args = getActiveCodes_args()
|
|
|
1175 |
args.read(iprot)
|
|
|
1176 |
iprot.readMessageEnd()
|
|
|
1177 |
result = getActiveCodes_result()
|
|
|
1178 |
try:
|
|
|
1179 |
result.success = self._handler.getActiveCodes(args.promotionId)
|
|
|
1180 |
except PromotionException, pex:
|
|
|
1181 |
result.pex = pex
|
|
|
1182 |
oprot.writeMessageBegin("getActiveCodes", TMessageType.REPLY, seqid)
|
|
|
1183 |
result.write(oprot)
|
|
|
1184 |
oprot.writeMessageEnd()
|
|
|
1185 |
oprot.trans.flush()
|
|
|
1186 |
|
|
|
1187 |
def process_deleteCoupon(self, seqid, iprot, oprot):
|
|
|
1188 |
args = deleteCoupon_args()
|
|
|
1189 |
args.read(iprot)
|
|
|
1190 |
iprot.readMessageEnd()
|
|
|
1191 |
result = deleteCoupon_result()
|
|
|
1192 |
try:
|
|
|
1193 |
self._handler.deleteCoupon(args.couponCode)
|
|
|
1194 |
except PromotionException, pex:
|
|
|
1195 |
result.pex = pex
|
|
|
1196 |
oprot.writeMessageBegin("deleteCoupon", TMessageType.REPLY, seqid)
|
|
|
1197 |
result.write(oprot)
|
|
|
1198 |
oprot.writeMessageEnd()
|
|
|
1199 |
oprot.trans.flush()
|
|
|
1200 |
|
| 3385 |
varun.gupt |
1201 |
def process_getActiveCoupons(self, seqid, iprot, oprot):
|
|
|
1202 |
args = getActiveCoupons_args()
|
|
|
1203 |
args.read(iprot)
|
|
|
1204 |
iprot.readMessageEnd()
|
|
|
1205 |
result = getActiveCoupons_result()
|
|
|
1206 |
try:
|
|
|
1207 |
result.success = self._handler.getActiveCoupons()
|
|
|
1208 |
except PromotionException, pex:
|
|
|
1209 |
result.pex = pex
|
|
|
1210 |
oprot.writeMessageBegin("getActiveCoupons", TMessageType.REPLY, seqid)
|
|
|
1211 |
result.write(oprot)
|
|
|
1212 |
oprot.writeMessageEnd()
|
|
|
1213 |
oprot.trans.flush()
|
| 1976 |
varun.gupt |
1214 |
|
| 6250 |
amit.gupta |
1215 |
def process_createCoupon(self, seqid, iprot, oprot):
|
|
|
1216 |
args = createCoupon_args()
|
|
|
1217 |
args.read(iprot)
|
|
|
1218 |
iprot.readMessageEnd()
|
|
|
1219 |
result = createCoupon_result()
|
|
|
1220 |
try:
|
| 6730 |
anupam.sin |
1221 |
result.success = self._handler.createCoupon(args.promotionId, args.couponCode, args.arguments, args.isCod, args.prefix)
|
| 6250 |
amit.gupta |
1222 |
except PromotionException, pex:
|
|
|
1223 |
result.pex = pex
|
|
|
1224 |
oprot.writeMessageBegin("createCoupon", TMessageType.REPLY, seqid)
|
|
|
1225 |
result.write(oprot)
|
|
|
1226 |
oprot.writeMessageEnd()
|
|
|
1227 |
oprot.trans.flush()
|
|
|
1228 |
|
| 3385 |
varun.gupt |
1229 |
def process_getSuccessfulPaymentCountForCoupon(self, seqid, iprot, oprot):
|
|
|
1230 |
args = getSuccessfulPaymentCountForCoupon_args()
|
|
|
1231 |
args.read(iprot)
|
|
|
1232 |
iprot.readMessageEnd()
|
|
|
1233 |
result = getSuccessfulPaymentCountForCoupon_result()
|
|
|
1234 |
try:
|
|
|
1235 |
result.success = self._handler.getSuccessfulPaymentCountForCoupon(args.couponCode)
|
|
|
1236 |
except PromotionException, pex:
|
|
|
1237 |
result.pex = pex
|
|
|
1238 |
oprot.writeMessageBegin("getSuccessfulPaymentCountForCoupon", TMessageType.REPLY, seqid)
|
|
|
1239 |
result.write(oprot)
|
|
|
1240 |
oprot.writeMessageEnd()
|
|
|
1241 |
oprot.trans.flush()
|
|
|
1242 |
|
|
|
1243 |
def process_getRuleDocString(self, seqid, iprot, oprot):
|
|
|
1244 |
args = getRuleDocString_args()
|
|
|
1245 |
args.read(iprot)
|
|
|
1246 |
iprot.readMessageEnd()
|
|
|
1247 |
result = getRuleDocString_result()
|
|
|
1248 |
result.success = self._handler.getRuleDocString(args.ruleName)
|
|
|
1249 |
oprot.writeMessageBegin("getRuleDocString", TMessageType.REPLY, seqid)
|
|
|
1250 |
result.write(oprot)
|
|
|
1251 |
oprot.writeMessageEnd()
|
|
|
1252 |
oprot.trans.flush()
|
|
|
1253 |
|
| 4189 |
varun.gupt |
1254 |
def process_getItemDiscountMap(self, seqid, iprot, oprot):
|
|
|
1255 |
args = getItemDiscountMap_args()
|
|
|
1256 |
args.read(iprot)
|
|
|
1257 |
iprot.readMessageEnd()
|
|
|
1258 |
result = getItemDiscountMap_result()
|
|
|
1259 |
try:
|
|
|
1260 |
result.success = self._handler.getItemDiscountMap(args.itemIds)
|
|
|
1261 |
except PromotionException, pex:
|
|
|
1262 |
result.pex = pex
|
|
|
1263 |
oprot.writeMessageBegin("getItemDiscountMap", TMessageType.REPLY, seqid)
|
|
|
1264 |
result.write(oprot)
|
|
|
1265 |
oprot.writeMessageEnd()
|
|
|
1266 |
oprot.trans.flush()
|
| 3385 |
varun.gupt |
1267 |
|
| 4494 |
varun.gupt |
1268 |
def process_getDiscountsForEntity(self, seqid, iprot, oprot):
|
|
|
1269 |
args = getDiscountsForEntity_args()
|
|
|
1270 |
args.read(iprot)
|
|
|
1271 |
iprot.readMessageEnd()
|
|
|
1272 |
result = getDiscountsForEntity_result()
|
|
|
1273 |
result.success = self._handler.getDiscountsForEntity(args.entityId)
|
|
|
1274 |
oprot.writeMessageBegin("getDiscountsForEntity", TMessageType.REPLY, seqid)
|
|
|
1275 |
result.write(oprot)
|
|
|
1276 |
oprot.writeMessageEnd()
|
|
|
1277 |
oprot.trans.flush()
|
| 4189 |
varun.gupt |
1278 |
|
| 5469 |
rajveer |
1279 |
def process_addVoucher(self, seqid, iprot, oprot):
|
|
|
1280 |
args = addVoucher_args()
|
|
|
1281 |
args.read(iprot)
|
|
|
1282 |
iprot.readMessageEnd()
|
|
|
1283 |
result = addVoucher_result()
|
|
|
1284 |
self._handler.addVoucher(args.voucher)
|
|
|
1285 |
oprot.writeMessageBegin("addVoucher", TMessageType.REPLY, seqid)
|
|
|
1286 |
result.write(oprot)
|
|
|
1287 |
oprot.writeMessageEnd()
|
|
|
1288 |
oprot.trans.flush()
|
| 4494 |
varun.gupt |
1289 |
|
| 5469 |
rajveer |
1290 |
def process_assignVoucher(self, seqid, iprot, oprot):
|
|
|
1291 |
args = assignVoucher_args()
|
|
|
1292 |
args.read(iprot)
|
|
|
1293 |
iprot.readMessageEnd()
|
|
|
1294 |
result = assignVoucher_result()
|
|
|
1295 |
result.success = self._handler.assignVoucher(args.userId, args.userEmail, args.voucherType, args.amount)
|
|
|
1296 |
oprot.writeMessageBegin("assignVoucher", TMessageType.REPLY, seqid)
|
|
|
1297 |
result.write(oprot)
|
|
|
1298 |
oprot.writeMessageEnd()
|
|
|
1299 |
oprot.trans.flush()
|
|
|
1300 |
|
|
|
1301 |
def process_markVoucherAsRedeemed(self, seqid, iprot, oprot):
|
|
|
1302 |
args = markVoucherAsRedeemed_args()
|
|
|
1303 |
args.read(iprot)
|
|
|
1304 |
iprot.readMessageEnd()
|
|
|
1305 |
result = markVoucherAsRedeemed_result()
|
|
|
1306 |
result.success = self._handler.markVoucherAsRedeemed(args.voucherCode, args.redeemedOn)
|
|
|
1307 |
oprot.writeMessageBegin("markVoucherAsRedeemed", TMessageType.REPLY, seqid)
|
|
|
1308 |
result.write(oprot)
|
|
|
1309 |
oprot.writeMessageEnd()
|
|
|
1310 |
oprot.trans.flush()
|
|
|
1311 |
|
|
|
1312 |
|
| 1976 |
varun.gupt |
1313 |
# HELPER FUNCTIONS AND STRUCTURES
|
|
|
1314 |
|
|
|
1315 |
class createPromotion_args:
|
|
|
1316 |
"""
|
|
|
1317 |
Attributes:
|
|
|
1318 |
- name
|
|
|
1319 |
- ruleExecutionSrc
|
|
|
1320 |
- startOn
|
|
|
1321 |
- endOn
|
|
|
1322 |
"""
|
|
|
1323 |
|
|
|
1324 |
thrift_spec = (
|
|
|
1325 |
None, # 0
|
|
|
1326 |
(1, TType.STRING, 'name', None, None, ), # 1
|
|
|
1327 |
(2, TType.STRING, 'ruleExecutionSrc', None, None, ), # 2
|
|
|
1328 |
(3, TType.I64, 'startOn', None, None, ), # 3
|
|
|
1329 |
(4, TType.I64, 'endOn', None, None, ), # 4
|
|
|
1330 |
)
|
|
|
1331 |
|
|
|
1332 |
def __init__(self, name=None, ruleExecutionSrc=None, startOn=None, endOn=None,):
|
|
|
1333 |
self.name = name
|
|
|
1334 |
self.ruleExecutionSrc = ruleExecutionSrc
|
|
|
1335 |
self.startOn = startOn
|
|
|
1336 |
self.endOn = endOn
|
|
|
1337 |
|
|
|
1338 |
def read(self, iprot):
|
|
|
1339 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1340 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1341 |
return
|
|
|
1342 |
iprot.readStructBegin()
|
|
|
1343 |
while True:
|
|
|
1344 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1345 |
if ftype == TType.STOP:
|
|
|
1346 |
break
|
|
|
1347 |
if fid == 1:
|
|
|
1348 |
if ftype == TType.STRING:
|
|
|
1349 |
self.name = iprot.readString();
|
|
|
1350 |
else:
|
|
|
1351 |
iprot.skip(ftype)
|
|
|
1352 |
elif fid == 2:
|
|
|
1353 |
if ftype == TType.STRING:
|
|
|
1354 |
self.ruleExecutionSrc = iprot.readString();
|
|
|
1355 |
else:
|
|
|
1356 |
iprot.skip(ftype)
|
|
|
1357 |
elif fid == 3:
|
|
|
1358 |
if ftype == TType.I64:
|
|
|
1359 |
self.startOn = iprot.readI64();
|
|
|
1360 |
else:
|
|
|
1361 |
iprot.skip(ftype)
|
|
|
1362 |
elif fid == 4:
|
|
|
1363 |
if ftype == TType.I64:
|
|
|
1364 |
self.endOn = iprot.readI64();
|
|
|
1365 |
else:
|
|
|
1366 |
iprot.skip(ftype)
|
|
|
1367 |
else:
|
|
|
1368 |
iprot.skip(ftype)
|
|
|
1369 |
iprot.readFieldEnd()
|
|
|
1370 |
iprot.readStructEnd()
|
|
|
1371 |
|
|
|
1372 |
def write(self, oprot):
|
|
|
1373 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1374 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1375 |
return
|
|
|
1376 |
oprot.writeStructBegin('createPromotion_args')
|
| 3431 |
rajveer |
1377 |
if self.name is not None:
|
| 1976 |
varun.gupt |
1378 |
oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
1379 |
oprot.writeString(self.name)
|
|
|
1380 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1381 |
if self.ruleExecutionSrc is not None:
|
| 1976 |
varun.gupt |
1382 |
oprot.writeFieldBegin('ruleExecutionSrc', TType.STRING, 2)
|
|
|
1383 |
oprot.writeString(self.ruleExecutionSrc)
|
|
|
1384 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1385 |
if self.startOn is not None:
|
| 1976 |
varun.gupt |
1386 |
oprot.writeFieldBegin('startOn', TType.I64, 3)
|
|
|
1387 |
oprot.writeI64(self.startOn)
|
|
|
1388 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1389 |
if self.endOn is not None:
|
| 1976 |
varun.gupt |
1390 |
oprot.writeFieldBegin('endOn', TType.I64, 4)
|
|
|
1391 |
oprot.writeI64(self.endOn)
|
|
|
1392 |
oprot.writeFieldEnd()
|
|
|
1393 |
oprot.writeFieldStop()
|
|
|
1394 |
oprot.writeStructEnd()
|
|
|
1395 |
|
| 3431 |
rajveer |
1396 |
def validate(self):
|
|
|
1397 |
return
|
|
|
1398 |
|
|
|
1399 |
|
| 1976 |
varun.gupt |
1400 |
def __repr__(self):
|
|
|
1401 |
L = ['%s=%r' % (key, value)
|
|
|
1402 |
for key, value in self.__dict__.iteritems()]
|
|
|
1403 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1404 |
|
|
|
1405 |
def __eq__(self, other):
|
|
|
1406 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1407 |
|
|
|
1408 |
def __ne__(self, other):
|
|
|
1409 |
return not (self == other)
|
|
|
1410 |
|
|
|
1411 |
class createPromotion_result:
|
|
|
1412 |
"""
|
|
|
1413 |
Attributes:
|
|
|
1414 |
- pex
|
|
|
1415 |
"""
|
|
|
1416 |
|
|
|
1417 |
thrift_spec = (
|
|
|
1418 |
None, # 0
|
|
|
1419 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1420 |
)
|
|
|
1421 |
|
|
|
1422 |
def __init__(self, pex=None,):
|
|
|
1423 |
self.pex = pex
|
|
|
1424 |
|
|
|
1425 |
def read(self, iprot):
|
|
|
1426 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1427 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1428 |
return
|
|
|
1429 |
iprot.readStructBegin()
|
|
|
1430 |
while True:
|
|
|
1431 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1432 |
if ftype == TType.STOP:
|
|
|
1433 |
break
|
|
|
1434 |
if fid == 1:
|
|
|
1435 |
if ftype == TType.STRUCT:
|
|
|
1436 |
self.pex = PromotionException()
|
|
|
1437 |
self.pex.read(iprot)
|
|
|
1438 |
else:
|
|
|
1439 |
iprot.skip(ftype)
|
|
|
1440 |
else:
|
|
|
1441 |
iprot.skip(ftype)
|
|
|
1442 |
iprot.readFieldEnd()
|
|
|
1443 |
iprot.readStructEnd()
|
|
|
1444 |
|
|
|
1445 |
def write(self, oprot):
|
|
|
1446 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1447 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1448 |
return
|
|
|
1449 |
oprot.writeStructBegin('createPromotion_result')
|
| 3431 |
rajveer |
1450 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1451 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1452 |
self.pex.write(oprot)
|
|
|
1453 |
oprot.writeFieldEnd()
|
|
|
1454 |
oprot.writeFieldStop()
|
|
|
1455 |
oprot.writeStructEnd()
|
|
|
1456 |
|
| 3431 |
rajveer |
1457 |
def validate(self):
|
|
|
1458 |
return
|
|
|
1459 |
|
|
|
1460 |
|
| 1976 |
varun.gupt |
1461 |
def __repr__(self):
|
|
|
1462 |
L = ['%s=%r' % (key, value)
|
|
|
1463 |
for key, value in self.__dict__.iteritems()]
|
|
|
1464 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1465 |
|
|
|
1466 |
def __eq__(self, other):
|
|
|
1467 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1468 |
|
|
|
1469 |
def __ne__(self, other):
|
|
|
1470 |
return not (self == other)
|
|
|
1471 |
|
| 6301 |
amit.gupta |
1472 |
class getCoupon_args:
|
|
|
1473 |
"""
|
|
|
1474 |
Attributes:
|
|
|
1475 |
- couponCode
|
|
|
1476 |
"""
|
|
|
1477 |
|
|
|
1478 |
thrift_spec = (
|
|
|
1479 |
None, # 0
|
|
|
1480 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1481 |
)
|
|
|
1482 |
|
|
|
1483 |
def __init__(self, couponCode=None,):
|
|
|
1484 |
self.couponCode = couponCode
|
|
|
1485 |
|
|
|
1486 |
def read(self, iprot):
|
|
|
1487 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1488 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1489 |
return
|
|
|
1490 |
iprot.readStructBegin()
|
|
|
1491 |
while True:
|
|
|
1492 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1493 |
if ftype == TType.STOP:
|
|
|
1494 |
break
|
|
|
1495 |
if fid == 1:
|
|
|
1496 |
if ftype == TType.STRING:
|
|
|
1497 |
self.couponCode = iprot.readString();
|
|
|
1498 |
else:
|
|
|
1499 |
iprot.skip(ftype)
|
|
|
1500 |
else:
|
|
|
1501 |
iprot.skip(ftype)
|
|
|
1502 |
iprot.readFieldEnd()
|
|
|
1503 |
iprot.readStructEnd()
|
|
|
1504 |
|
|
|
1505 |
def write(self, oprot):
|
|
|
1506 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1507 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1508 |
return
|
|
|
1509 |
oprot.writeStructBegin('getCoupon_args')
|
|
|
1510 |
if self.couponCode is not None:
|
|
|
1511 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1512 |
oprot.writeString(self.couponCode)
|
|
|
1513 |
oprot.writeFieldEnd()
|
|
|
1514 |
oprot.writeFieldStop()
|
|
|
1515 |
oprot.writeStructEnd()
|
|
|
1516 |
|
|
|
1517 |
def validate(self):
|
|
|
1518 |
return
|
|
|
1519 |
|
|
|
1520 |
|
|
|
1521 |
def __repr__(self):
|
|
|
1522 |
L = ['%s=%r' % (key, value)
|
|
|
1523 |
for key, value in self.__dict__.iteritems()]
|
|
|
1524 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1525 |
|
|
|
1526 |
def __eq__(self, other):
|
|
|
1527 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1528 |
|
|
|
1529 |
def __ne__(self, other):
|
|
|
1530 |
return not (self == other)
|
|
|
1531 |
|
|
|
1532 |
class getCoupon_result:
|
|
|
1533 |
"""
|
|
|
1534 |
Attributes:
|
|
|
1535 |
- success
|
|
|
1536 |
- pex
|
|
|
1537 |
"""
|
|
|
1538 |
|
|
|
1539 |
thrift_spec = (
|
|
|
1540 |
(0, TType.STRUCT, 'success', (Coupon, Coupon.thrift_spec), None, ), # 0
|
|
|
1541 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1542 |
)
|
|
|
1543 |
|
|
|
1544 |
def __init__(self, success=None, pex=None,):
|
|
|
1545 |
self.success = success
|
|
|
1546 |
self.pex = pex
|
|
|
1547 |
|
|
|
1548 |
def read(self, iprot):
|
|
|
1549 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1550 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1551 |
return
|
|
|
1552 |
iprot.readStructBegin()
|
|
|
1553 |
while True:
|
|
|
1554 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1555 |
if ftype == TType.STOP:
|
|
|
1556 |
break
|
|
|
1557 |
if fid == 0:
|
|
|
1558 |
if ftype == TType.STRUCT:
|
|
|
1559 |
self.success = Coupon()
|
|
|
1560 |
self.success.read(iprot)
|
|
|
1561 |
else:
|
|
|
1562 |
iprot.skip(ftype)
|
|
|
1563 |
elif fid == 1:
|
|
|
1564 |
if ftype == TType.STRUCT:
|
|
|
1565 |
self.pex = PromotionException()
|
|
|
1566 |
self.pex.read(iprot)
|
|
|
1567 |
else:
|
|
|
1568 |
iprot.skip(ftype)
|
|
|
1569 |
else:
|
|
|
1570 |
iprot.skip(ftype)
|
|
|
1571 |
iprot.readFieldEnd()
|
|
|
1572 |
iprot.readStructEnd()
|
|
|
1573 |
|
|
|
1574 |
def write(self, oprot):
|
|
|
1575 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1576 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1577 |
return
|
|
|
1578 |
oprot.writeStructBegin('getCoupon_result')
|
|
|
1579 |
if self.success is not None:
|
|
|
1580 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
1581 |
self.success.write(oprot)
|
|
|
1582 |
oprot.writeFieldEnd()
|
|
|
1583 |
if self.pex is not None:
|
|
|
1584 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1585 |
self.pex.write(oprot)
|
|
|
1586 |
oprot.writeFieldEnd()
|
|
|
1587 |
oprot.writeFieldStop()
|
|
|
1588 |
oprot.writeStructEnd()
|
|
|
1589 |
|
|
|
1590 |
def validate(self):
|
|
|
1591 |
return
|
|
|
1592 |
|
|
|
1593 |
|
|
|
1594 |
def __repr__(self):
|
|
|
1595 |
L = ['%s=%r' % (key, value)
|
|
|
1596 |
for key, value in self.__dict__.iteritems()]
|
|
|
1597 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1598 |
|
|
|
1599 |
def __eq__(self, other):
|
|
|
1600 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1601 |
|
|
|
1602 |
def __ne__(self, other):
|
|
|
1603 |
return not (self == other)
|
|
|
1604 |
|
|
|
1605 |
class isGiftVoucher_args:
|
|
|
1606 |
"""
|
|
|
1607 |
Attributes:
|
|
|
1608 |
- couponCode
|
|
|
1609 |
"""
|
|
|
1610 |
|
|
|
1611 |
thrift_spec = (
|
|
|
1612 |
None, # 0
|
|
|
1613 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1614 |
)
|
|
|
1615 |
|
|
|
1616 |
def __init__(self, couponCode=None,):
|
|
|
1617 |
self.couponCode = couponCode
|
|
|
1618 |
|
|
|
1619 |
def read(self, iprot):
|
|
|
1620 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1621 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1622 |
return
|
|
|
1623 |
iprot.readStructBegin()
|
|
|
1624 |
while True:
|
|
|
1625 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1626 |
if ftype == TType.STOP:
|
|
|
1627 |
break
|
|
|
1628 |
if fid == 1:
|
|
|
1629 |
if ftype == TType.STRING:
|
|
|
1630 |
self.couponCode = iprot.readString();
|
|
|
1631 |
else:
|
|
|
1632 |
iprot.skip(ftype)
|
|
|
1633 |
else:
|
|
|
1634 |
iprot.skip(ftype)
|
|
|
1635 |
iprot.readFieldEnd()
|
|
|
1636 |
iprot.readStructEnd()
|
|
|
1637 |
|
|
|
1638 |
def write(self, oprot):
|
|
|
1639 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1640 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1641 |
return
|
|
|
1642 |
oprot.writeStructBegin('isGiftVoucher_args')
|
|
|
1643 |
if self.couponCode is not None:
|
|
|
1644 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1645 |
oprot.writeString(self.couponCode)
|
|
|
1646 |
oprot.writeFieldEnd()
|
|
|
1647 |
oprot.writeFieldStop()
|
|
|
1648 |
oprot.writeStructEnd()
|
|
|
1649 |
|
|
|
1650 |
def validate(self):
|
|
|
1651 |
return
|
|
|
1652 |
|
|
|
1653 |
|
|
|
1654 |
def __repr__(self):
|
|
|
1655 |
L = ['%s=%r' % (key, value)
|
|
|
1656 |
for key, value in self.__dict__.iteritems()]
|
|
|
1657 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1658 |
|
|
|
1659 |
def __eq__(self, other):
|
|
|
1660 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1661 |
|
|
|
1662 |
def __ne__(self, other):
|
|
|
1663 |
return not (self == other)
|
|
|
1664 |
|
|
|
1665 |
class isGiftVoucher_result:
|
|
|
1666 |
"""
|
|
|
1667 |
Attributes:
|
|
|
1668 |
- success
|
|
|
1669 |
- pex
|
|
|
1670 |
"""
|
|
|
1671 |
|
|
|
1672 |
thrift_spec = (
|
|
|
1673 |
(0, TType.BOOL, 'success', None, None, ), # 0
|
|
|
1674 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1675 |
)
|
|
|
1676 |
|
|
|
1677 |
def __init__(self, success=None, pex=None,):
|
|
|
1678 |
self.success = success
|
|
|
1679 |
self.pex = pex
|
|
|
1680 |
|
|
|
1681 |
def read(self, iprot):
|
|
|
1682 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1683 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1684 |
return
|
|
|
1685 |
iprot.readStructBegin()
|
|
|
1686 |
while True:
|
|
|
1687 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1688 |
if ftype == TType.STOP:
|
|
|
1689 |
break
|
|
|
1690 |
if fid == 0:
|
|
|
1691 |
if ftype == TType.BOOL:
|
|
|
1692 |
self.success = iprot.readBool();
|
|
|
1693 |
else:
|
|
|
1694 |
iprot.skip(ftype)
|
|
|
1695 |
elif fid == 1:
|
|
|
1696 |
if ftype == TType.STRUCT:
|
|
|
1697 |
self.pex = PromotionException()
|
|
|
1698 |
self.pex.read(iprot)
|
|
|
1699 |
else:
|
|
|
1700 |
iprot.skip(ftype)
|
|
|
1701 |
else:
|
|
|
1702 |
iprot.skip(ftype)
|
|
|
1703 |
iprot.readFieldEnd()
|
|
|
1704 |
iprot.readStructEnd()
|
|
|
1705 |
|
|
|
1706 |
def write(self, oprot):
|
|
|
1707 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1708 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1709 |
return
|
|
|
1710 |
oprot.writeStructBegin('isGiftVoucher_result')
|
|
|
1711 |
if self.success is not None:
|
|
|
1712 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
|
|
1713 |
oprot.writeBool(self.success)
|
|
|
1714 |
oprot.writeFieldEnd()
|
|
|
1715 |
if self.pex is not None:
|
|
|
1716 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1717 |
self.pex.write(oprot)
|
|
|
1718 |
oprot.writeFieldEnd()
|
|
|
1719 |
oprot.writeFieldStop()
|
|
|
1720 |
oprot.writeStructEnd()
|
|
|
1721 |
|
|
|
1722 |
def validate(self):
|
|
|
1723 |
return
|
|
|
1724 |
|
|
|
1725 |
|
|
|
1726 |
def __repr__(self):
|
|
|
1727 |
L = ['%s=%r' % (key, value)
|
|
|
1728 |
for key, value in self.__dict__.iteritems()]
|
|
|
1729 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1730 |
|
|
|
1731 |
def __eq__(self, other):
|
|
|
1732 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1733 |
|
|
|
1734 |
def __ne__(self, other):
|
|
|
1735 |
return not (self == other)
|
|
|
1736 |
|
| 6356 |
amit.gupta |
1737 |
class isCodApplicable_args:
|
|
|
1738 |
"""
|
|
|
1739 |
Attributes:
|
|
|
1740 |
- couponCode
|
|
|
1741 |
"""
|
|
|
1742 |
|
|
|
1743 |
thrift_spec = (
|
|
|
1744 |
None, # 0
|
|
|
1745 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1746 |
)
|
|
|
1747 |
|
|
|
1748 |
def __init__(self, couponCode=None,):
|
|
|
1749 |
self.couponCode = couponCode
|
|
|
1750 |
|
|
|
1751 |
def read(self, iprot):
|
|
|
1752 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1753 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1754 |
return
|
|
|
1755 |
iprot.readStructBegin()
|
|
|
1756 |
while True:
|
|
|
1757 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1758 |
if ftype == TType.STOP:
|
|
|
1759 |
break
|
|
|
1760 |
if fid == 1:
|
|
|
1761 |
if ftype == TType.STRING:
|
|
|
1762 |
self.couponCode = iprot.readString();
|
|
|
1763 |
else:
|
|
|
1764 |
iprot.skip(ftype)
|
|
|
1765 |
else:
|
|
|
1766 |
iprot.skip(ftype)
|
|
|
1767 |
iprot.readFieldEnd()
|
|
|
1768 |
iprot.readStructEnd()
|
|
|
1769 |
|
|
|
1770 |
def write(self, oprot):
|
|
|
1771 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1772 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1773 |
return
|
|
|
1774 |
oprot.writeStructBegin('isCodApplicable_args')
|
|
|
1775 |
if self.couponCode is not None:
|
|
|
1776 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1777 |
oprot.writeString(self.couponCode)
|
|
|
1778 |
oprot.writeFieldEnd()
|
|
|
1779 |
oprot.writeFieldStop()
|
|
|
1780 |
oprot.writeStructEnd()
|
|
|
1781 |
|
|
|
1782 |
def validate(self):
|
|
|
1783 |
return
|
|
|
1784 |
|
|
|
1785 |
|
|
|
1786 |
def __repr__(self):
|
|
|
1787 |
L = ['%s=%r' % (key, value)
|
|
|
1788 |
for key, value in self.__dict__.iteritems()]
|
|
|
1789 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1790 |
|
|
|
1791 |
def __eq__(self, other):
|
|
|
1792 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1793 |
|
|
|
1794 |
def __ne__(self, other):
|
|
|
1795 |
return not (self == other)
|
|
|
1796 |
|
|
|
1797 |
class isCodApplicable_result:
|
|
|
1798 |
"""
|
|
|
1799 |
Attributes:
|
|
|
1800 |
- success
|
|
|
1801 |
- pex
|
|
|
1802 |
"""
|
|
|
1803 |
|
|
|
1804 |
thrift_spec = (
|
|
|
1805 |
(0, TType.BOOL, 'success', None, None, ), # 0
|
|
|
1806 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1807 |
)
|
|
|
1808 |
|
|
|
1809 |
def __init__(self, success=None, pex=None,):
|
|
|
1810 |
self.success = success
|
|
|
1811 |
self.pex = pex
|
|
|
1812 |
|
|
|
1813 |
def read(self, iprot):
|
|
|
1814 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1815 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1816 |
return
|
|
|
1817 |
iprot.readStructBegin()
|
|
|
1818 |
while True:
|
|
|
1819 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1820 |
if ftype == TType.STOP:
|
|
|
1821 |
break
|
|
|
1822 |
if fid == 0:
|
|
|
1823 |
if ftype == TType.BOOL:
|
|
|
1824 |
self.success = iprot.readBool();
|
|
|
1825 |
else:
|
|
|
1826 |
iprot.skip(ftype)
|
|
|
1827 |
elif fid == 1:
|
|
|
1828 |
if ftype == TType.STRUCT:
|
|
|
1829 |
self.pex = PromotionException()
|
|
|
1830 |
self.pex.read(iprot)
|
|
|
1831 |
else:
|
|
|
1832 |
iprot.skip(ftype)
|
|
|
1833 |
else:
|
|
|
1834 |
iprot.skip(ftype)
|
|
|
1835 |
iprot.readFieldEnd()
|
|
|
1836 |
iprot.readStructEnd()
|
|
|
1837 |
|
|
|
1838 |
def write(self, oprot):
|
|
|
1839 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1840 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1841 |
return
|
|
|
1842 |
oprot.writeStructBegin('isCodApplicable_result')
|
|
|
1843 |
if self.success is not None:
|
|
|
1844 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
|
|
1845 |
oprot.writeBool(self.success)
|
|
|
1846 |
oprot.writeFieldEnd()
|
|
|
1847 |
if self.pex is not None:
|
|
|
1848 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1849 |
self.pex.write(oprot)
|
|
|
1850 |
oprot.writeFieldEnd()
|
|
|
1851 |
oprot.writeFieldStop()
|
|
|
1852 |
oprot.writeStructEnd()
|
|
|
1853 |
|
|
|
1854 |
def validate(self):
|
|
|
1855 |
return
|
|
|
1856 |
|
|
|
1857 |
|
|
|
1858 |
def __repr__(self):
|
|
|
1859 |
L = ['%s=%r' % (key, value)
|
|
|
1860 |
for key, value in self.__dict__.iteritems()]
|
|
|
1861 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1862 |
|
|
|
1863 |
def __eq__(self, other):
|
|
|
1864 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1865 |
|
|
|
1866 |
def __ne__(self, other):
|
|
|
1867 |
return not (self == other)
|
|
|
1868 |
|
| 1976 |
varun.gupt |
1869 |
class getAllPromotions_args:
|
|
|
1870 |
|
|
|
1871 |
thrift_spec = (
|
|
|
1872 |
)
|
|
|
1873 |
|
|
|
1874 |
def read(self, iprot):
|
|
|
1875 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1876 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1877 |
return
|
|
|
1878 |
iprot.readStructBegin()
|
|
|
1879 |
while True:
|
|
|
1880 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1881 |
if ftype == TType.STOP:
|
|
|
1882 |
break
|
|
|
1883 |
else:
|
|
|
1884 |
iprot.skip(ftype)
|
|
|
1885 |
iprot.readFieldEnd()
|
|
|
1886 |
iprot.readStructEnd()
|
|
|
1887 |
|
|
|
1888 |
def write(self, oprot):
|
|
|
1889 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1890 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1891 |
return
|
|
|
1892 |
oprot.writeStructBegin('getAllPromotions_args')
|
|
|
1893 |
oprot.writeFieldStop()
|
|
|
1894 |
oprot.writeStructEnd()
|
|
|
1895 |
|
| 3431 |
rajveer |
1896 |
def validate(self):
|
|
|
1897 |
return
|
|
|
1898 |
|
|
|
1899 |
|
| 1976 |
varun.gupt |
1900 |
def __repr__(self):
|
|
|
1901 |
L = ['%s=%r' % (key, value)
|
|
|
1902 |
for key, value in self.__dict__.iteritems()]
|
|
|
1903 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1904 |
|
|
|
1905 |
def __eq__(self, other):
|
|
|
1906 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1907 |
|
|
|
1908 |
def __ne__(self, other):
|
|
|
1909 |
return not (self == other)
|
|
|
1910 |
|
|
|
1911 |
class getAllPromotions_result:
|
|
|
1912 |
"""
|
|
|
1913 |
Attributes:
|
|
|
1914 |
- success
|
|
|
1915 |
- pex
|
|
|
1916 |
"""
|
|
|
1917 |
|
|
|
1918 |
thrift_spec = (
|
|
|
1919 |
(0, TType.LIST, 'success', (TType.STRUCT,(Promotion, Promotion.thrift_spec)), None, ), # 0
|
|
|
1920 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1921 |
)
|
|
|
1922 |
|
|
|
1923 |
def __init__(self, success=None, pex=None,):
|
|
|
1924 |
self.success = success
|
|
|
1925 |
self.pex = pex
|
|
|
1926 |
|
|
|
1927 |
def read(self, iprot):
|
|
|
1928 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1929 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1930 |
return
|
|
|
1931 |
iprot.readStructBegin()
|
|
|
1932 |
while True:
|
|
|
1933 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1934 |
if ftype == TType.STOP:
|
|
|
1935 |
break
|
|
|
1936 |
if fid == 0:
|
|
|
1937 |
if ftype == TType.LIST:
|
|
|
1938 |
self.success = []
|
| 5326 |
rajveer |
1939 |
(_etype24, _size21) = iprot.readListBegin()
|
|
|
1940 |
for _i25 in xrange(_size21):
|
|
|
1941 |
_elem26 = Promotion()
|
|
|
1942 |
_elem26.read(iprot)
|
|
|
1943 |
self.success.append(_elem26)
|
| 1976 |
varun.gupt |
1944 |
iprot.readListEnd()
|
|
|
1945 |
else:
|
|
|
1946 |
iprot.skip(ftype)
|
|
|
1947 |
elif fid == 1:
|
|
|
1948 |
if ftype == TType.STRUCT:
|
|
|
1949 |
self.pex = PromotionException()
|
|
|
1950 |
self.pex.read(iprot)
|
|
|
1951 |
else:
|
|
|
1952 |
iprot.skip(ftype)
|
|
|
1953 |
else:
|
|
|
1954 |
iprot.skip(ftype)
|
|
|
1955 |
iprot.readFieldEnd()
|
|
|
1956 |
iprot.readStructEnd()
|
|
|
1957 |
|
|
|
1958 |
def write(self, oprot):
|
|
|
1959 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1960 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1961 |
return
|
|
|
1962 |
oprot.writeStructBegin('getAllPromotions_result')
|
| 3431 |
rajveer |
1963 |
if self.success is not None:
|
| 1976 |
varun.gupt |
1964 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
1965 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 5326 |
rajveer |
1966 |
for iter27 in self.success:
|
|
|
1967 |
iter27.write(oprot)
|
| 1976 |
varun.gupt |
1968 |
oprot.writeListEnd()
|
|
|
1969 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1970 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1971 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1972 |
self.pex.write(oprot)
|
|
|
1973 |
oprot.writeFieldEnd()
|
|
|
1974 |
oprot.writeFieldStop()
|
|
|
1975 |
oprot.writeStructEnd()
|
|
|
1976 |
|
| 3431 |
rajveer |
1977 |
def validate(self):
|
|
|
1978 |
return
|
|
|
1979 |
|
|
|
1980 |
|
| 1976 |
varun.gupt |
1981 |
def __repr__(self):
|
|
|
1982 |
L = ['%s=%r' % (key, value)
|
|
|
1983 |
for key, value in self.__dict__.iteritems()]
|
|
|
1984 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1985 |
|
|
|
1986 |
def __eq__(self, other):
|
|
|
1987 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1988 |
|
|
|
1989 |
def __ne__(self, other):
|
|
|
1990 |
return not (self == other)
|
|
|
1991 |
|
|
|
1992 |
class getPromotionById_args:
|
|
|
1993 |
"""
|
|
|
1994 |
Attributes:
|
|
|
1995 |
- promotionId
|
|
|
1996 |
"""
|
|
|
1997 |
|
|
|
1998 |
thrift_spec = (
|
|
|
1999 |
None, # 0
|
|
|
2000 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
|
|
2001 |
)
|
|
|
2002 |
|
|
|
2003 |
def __init__(self, promotionId=None,):
|
|
|
2004 |
self.promotionId = promotionId
|
|
|
2005 |
|
|
|
2006 |
def read(self, iprot):
|
|
|
2007 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2008 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2009 |
return
|
|
|
2010 |
iprot.readStructBegin()
|
|
|
2011 |
while True:
|
|
|
2012 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2013 |
if ftype == TType.STOP:
|
|
|
2014 |
break
|
|
|
2015 |
if fid == 1:
|
|
|
2016 |
if ftype == TType.I64:
|
|
|
2017 |
self.promotionId = iprot.readI64();
|
|
|
2018 |
else:
|
|
|
2019 |
iprot.skip(ftype)
|
|
|
2020 |
else:
|
|
|
2021 |
iprot.skip(ftype)
|
|
|
2022 |
iprot.readFieldEnd()
|
|
|
2023 |
iprot.readStructEnd()
|
|
|
2024 |
|
|
|
2025 |
def write(self, oprot):
|
|
|
2026 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2027 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2028 |
return
|
|
|
2029 |
oprot.writeStructBegin('getPromotionById_args')
|
| 3431 |
rajveer |
2030 |
if self.promotionId is not None:
|
| 1976 |
varun.gupt |
2031 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
2032 |
oprot.writeI64(self.promotionId)
|
|
|
2033 |
oprot.writeFieldEnd()
|
|
|
2034 |
oprot.writeFieldStop()
|
|
|
2035 |
oprot.writeStructEnd()
|
|
|
2036 |
|
| 3431 |
rajveer |
2037 |
def validate(self):
|
|
|
2038 |
return
|
|
|
2039 |
|
|
|
2040 |
|
| 1976 |
varun.gupt |
2041 |
def __repr__(self):
|
|
|
2042 |
L = ['%s=%r' % (key, value)
|
|
|
2043 |
for key, value in self.__dict__.iteritems()]
|
|
|
2044 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2045 |
|
|
|
2046 |
def __eq__(self, other):
|
|
|
2047 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2048 |
|
|
|
2049 |
def __ne__(self, other):
|
|
|
2050 |
return not (self == other)
|
|
|
2051 |
|
|
|
2052 |
class getPromotionById_result:
|
|
|
2053 |
"""
|
|
|
2054 |
Attributes:
|
|
|
2055 |
- success
|
|
|
2056 |
- pex
|
|
|
2057 |
"""
|
|
|
2058 |
|
|
|
2059 |
thrift_spec = (
|
|
|
2060 |
(0, TType.STRUCT, 'success', (Promotion, Promotion.thrift_spec), None, ), # 0
|
|
|
2061 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2062 |
)
|
|
|
2063 |
|
|
|
2064 |
def __init__(self, success=None, pex=None,):
|
|
|
2065 |
self.success = success
|
|
|
2066 |
self.pex = pex
|
|
|
2067 |
|
|
|
2068 |
def read(self, iprot):
|
|
|
2069 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2070 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2071 |
return
|
|
|
2072 |
iprot.readStructBegin()
|
|
|
2073 |
while True:
|
|
|
2074 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2075 |
if ftype == TType.STOP:
|
|
|
2076 |
break
|
|
|
2077 |
if fid == 0:
|
|
|
2078 |
if ftype == TType.STRUCT:
|
|
|
2079 |
self.success = Promotion()
|
|
|
2080 |
self.success.read(iprot)
|
|
|
2081 |
else:
|
|
|
2082 |
iprot.skip(ftype)
|
|
|
2083 |
elif fid == 1:
|
|
|
2084 |
if ftype == TType.STRUCT:
|
|
|
2085 |
self.pex = PromotionException()
|
|
|
2086 |
self.pex.read(iprot)
|
|
|
2087 |
else:
|
|
|
2088 |
iprot.skip(ftype)
|
|
|
2089 |
else:
|
|
|
2090 |
iprot.skip(ftype)
|
|
|
2091 |
iprot.readFieldEnd()
|
|
|
2092 |
iprot.readStructEnd()
|
|
|
2093 |
|
|
|
2094 |
def write(self, oprot):
|
|
|
2095 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2096 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2097 |
return
|
|
|
2098 |
oprot.writeStructBegin('getPromotionById_result')
|
| 3431 |
rajveer |
2099 |
if self.success is not None:
|
| 1976 |
varun.gupt |
2100 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
2101 |
self.success.write(oprot)
|
|
|
2102 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2103 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
2104 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2105 |
self.pex.write(oprot)
|
|
|
2106 |
oprot.writeFieldEnd()
|
|
|
2107 |
oprot.writeFieldStop()
|
|
|
2108 |
oprot.writeStructEnd()
|
|
|
2109 |
|
| 3431 |
rajveer |
2110 |
def validate(self):
|
|
|
2111 |
return
|
|
|
2112 |
|
|
|
2113 |
|
| 1976 |
varun.gupt |
2114 |
def __repr__(self):
|
|
|
2115 |
L = ['%s=%r' % (key, value)
|
|
|
2116 |
for key, value in self.__dict__.iteritems()]
|
|
|
2117 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2118 |
|
|
|
2119 |
def __eq__(self, other):
|
|
|
2120 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2121 |
|
|
|
2122 |
def __ne__(self, other):
|
|
|
2123 |
return not (self == other)
|
|
|
2124 |
|
|
|
2125 |
class generateCouponsForPromotion_args:
|
|
|
2126 |
"""
|
|
|
2127 |
Attributes:
|
|
|
2128 |
- promotionId
|
|
|
2129 |
- couponCode
|
|
|
2130 |
"""
|
|
|
2131 |
|
|
|
2132 |
thrift_spec = (
|
|
|
2133 |
None, # 0
|
|
|
2134 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
|
|
2135 |
(2, TType.STRING, 'couponCode', None, None, ), # 2
|
|
|
2136 |
)
|
|
|
2137 |
|
|
|
2138 |
def __init__(self, promotionId=None, couponCode=None,):
|
|
|
2139 |
self.promotionId = promotionId
|
|
|
2140 |
self.couponCode = couponCode
|
|
|
2141 |
|
|
|
2142 |
def read(self, iprot):
|
|
|
2143 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2144 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2145 |
return
|
|
|
2146 |
iprot.readStructBegin()
|
|
|
2147 |
while True:
|
|
|
2148 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2149 |
if ftype == TType.STOP:
|
|
|
2150 |
break
|
|
|
2151 |
if fid == 1:
|
|
|
2152 |
if ftype == TType.I64:
|
|
|
2153 |
self.promotionId = iprot.readI64();
|
|
|
2154 |
else:
|
|
|
2155 |
iprot.skip(ftype)
|
|
|
2156 |
elif fid == 2:
|
|
|
2157 |
if ftype == TType.STRING:
|
|
|
2158 |
self.couponCode = iprot.readString();
|
|
|
2159 |
else:
|
|
|
2160 |
iprot.skip(ftype)
|
|
|
2161 |
else:
|
|
|
2162 |
iprot.skip(ftype)
|
|
|
2163 |
iprot.readFieldEnd()
|
|
|
2164 |
iprot.readStructEnd()
|
|
|
2165 |
|
|
|
2166 |
def write(self, oprot):
|
|
|
2167 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2168 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2169 |
return
|
|
|
2170 |
oprot.writeStructBegin('generateCouponsForPromotion_args')
|
| 3431 |
rajveer |
2171 |
if self.promotionId is not None:
|
| 1976 |
varun.gupt |
2172 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
2173 |
oprot.writeI64(self.promotionId)
|
|
|
2174 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2175 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
2176 |
oprot.writeFieldBegin('couponCode', TType.STRING, 2)
|
|
|
2177 |
oprot.writeString(self.couponCode)
|
|
|
2178 |
oprot.writeFieldEnd()
|
|
|
2179 |
oprot.writeFieldStop()
|
|
|
2180 |
oprot.writeStructEnd()
|
|
|
2181 |
|
| 3431 |
rajveer |
2182 |
def validate(self):
|
|
|
2183 |
return
|
|
|
2184 |
|
|
|
2185 |
|
| 1976 |
varun.gupt |
2186 |
def __repr__(self):
|
|
|
2187 |
L = ['%s=%r' % (key, value)
|
|
|
2188 |
for key, value in self.__dict__.iteritems()]
|
|
|
2189 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2190 |
|
|
|
2191 |
def __eq__(self, other):
|
|
|
2192 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2193 |
|
|
|
2194 |
def __ne__(self, other):
|
|
|
2195 |
return not (self == other)
|
|
|
2196 |
|
|
|
2197 |
class generateCouponsForPromotion_result:
|
|
|
2198 |
"""
|
|
|
2199 |
Attributes:
|
|
|
2200 |
- pex
|
|
|
2201 |
"""
|
|
|
2202 |
|
|
|
2203 |
thrift_spec = (
|
|
|
2204 |
None, # 0
|
|
|
2205 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2206 |
)
|
|
|
2207 |
|
|
|
2208 |
def __init__(self, pex=None,):
|
|
|
2209 |
self.pex = pex
|
|
|
2210 |
|
|
|
2211 |
def read(self, iprot):
|
|
|
2212 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2213 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2214 |
return
|
|
|
2215 |
iprot.readStructBegin()
|
|
|
2216 |
while True:
|
|
|
2217 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2218 |
if ftype == TType.STOP:
|
|
|
2219 |
break
|
|
|
2220 |
if fid == 1:
|
|
|
2221 |
if ftype == TType.STRUCT:
|
|
|
2222 |
self.pex = PromotionException()
|
|
|
2223 |
self.pex.read(iprot)
|
|
|
2224 |
else:
|
|
|
2225 |
iprot.skip(ftype)
|
|
|
2226 |
else:
|
|
|
2227 |
iprot.skip(ftype)
|
|
|
2228 |
iprot.readFieldEnd()
|
|
|
2229 |
iprot.readStructEnd()
|
|
|
2230 |
|
|
|
2231 |
def write(self, oprot):
|
|
|
2232 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2233 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2234 |
return
|
|
|
2235 |
oprot.writeStructBegin('generateCouponsForPromotion_result')
|
| 3431 |
rajveer |
2236 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
2237 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2238 |
self.pex.write(oprot)
|
|
|
2239 |
oprot.writeFieldEnd()
|
|
|
2240 |
oprot.writeFieldStop()
|
|
|
2241 |
oprot.writeStructEnd()
|
|
|
2242 |
|
| 3431 |
rajveer |
2243 |
def validate(self):
|
|
|
2244 |
return
|
|
|
2245 |
|
|
|
2246 |
|
| 1976 |
varun.gupt |
2247 |
def __repr__(self):
|
|
|
2248 |
L = ['%s=%r' % (key, value)
|
|
|
2249 |
for key, value in self.__dict__.iteritems()]
|
|
|
2250 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2251 |
|
|
|
2252 |
def __eq__(self, other):
|
|
|
2253 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2254 |
|
|
|
2255 |
def __ne__(self, other):
|
|
|
2256 |
return not (self == other)
|
|
|
2257 |
|
|
|
2258 |
class applyCoupon_args:
|
|
|
2259 |
"""
|
|
|
2260 |
Attributes:
|
|
|
2261 |
- couponCode
|
|
|
2262 |
- cartId
|
|
|
2263 |
"""
|
|
|
2264 |
|
|
|
2265 |
thrift_spec = (
|
|
|
2266 |
None, # 0
|
|
|
2267 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
2268 |
(2, TType.I64, 'cartId', None, None, ), # 2
|
|
|
2269 |
)
|
|
|
2270 |
|
|
|
2271 |
def __init__(self, couponCode=None, cartId=None,):
|
|
|
2272 |
self.couponCode = couponCode
|
|
|
2273 |
self.cartId = cartId
|
|
|
2274 |
|
|
|
2275 |
def read(self, iprot):
|
|
|
2276 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2277 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2278 |
return
|
|
|
2279 |
iprot.readStructBegin()
|
|
|
2280 |
while True:
|
|
|
2281 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2282 |
if ftype == TType.STOP:
|
|
|
2283 |
break
|
|
|
2284 |
if fid == 1:
|
|
|
2285 |
if ftype == TType.STRING:
|
|
|
2286 |
self.couponCode = iprot.readString();
|
|
|
2287 |
else:
|
|
|
2288 |
iprot.skip(ftype)
|
|
|
2289 |
elif fid == 2:
|
|
|
2290 |
if ftype == TType.I64:
|
|
|
2291 |
self.cartId = iprot.readI64();
|
|
|
2292 |
else:
|
|
|
2293 |
iprot.skip(ftype)
|
|
|
2294 |
else:
|
|
|
2295 |
iprot.skip(ftype)
|
|
|
2296 |
iprot.readFieldEnd()
|
|
|
2297 |
iprot.readStructEnd()
|
|
|
2298 |
|
|
|
2299 |
def write(self, oprot):
|
|
|
2300 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2301 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2302 |
return
|
|
|
2303 |
oprot.writeStructBegin('applyCoupon_args')
|
| 3431 |
rajveer |
2304 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
2305 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
2306 |
oprot.writeString(self.couponCode)
|
|
|
2307 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2308 |
if self.cartId is not None:
|
| 1976 |
varun.gupt |
2309 |
oprot.writeFieldBegin('cartId', TType.I64, 2)
|
|
|
2310 |
oprot.writeI64(self.cartId)
|
|
|
2311 |
oprot.writeFieldEnd()
|
|
|
2312 |
oprot.writeFieldStop()
|
|
|
2313 |
oprot.writeStructEnd()
|
|
|
2314 |
|
| 3431 |
rajveer |
2315 |
def validate(self):
|
|
|
2316 |
return
|
|
|
2317 |
|
|
|
2318 |
|
| 1976 |
varun.gupt |
2319 |
def __repr__(self):
|
|
|
2320 |
L = ['%s=%r' % (key, value)
|
|
|
2321 |
for key, value in self.__dict__.iteritems()]
|
|
|
2322 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2323 |
|
|
|
2324 |
def __eq__(self, other):
|
|
|
2325 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2326 |
|
|
|
2327 |
def __ne__(self, other):
|
|
|
2328 |
return not (self == other)
|
|
|
2329 |
|
|
|
2330 |
class applyCoupon_result:
|
|
|
2331 |
"""
|
|
|
2332 |
Attributes:
|
|
|
2333 |
- success
|
|
|
2334 |
- pex
|
|
|
2335 |
"""
|
|
|
2336 |
|
|
|
2337 |
thrift_spec = (
|
|
|
2338 |
(0, TType.STRUCT, 'success', (Cart, Cart.thrift_spec), None, ), # 0
|
|
|
2339 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2340 |
)
|
|
|
2341 |
|
|
|
2342 |
def __init__(self, success=None, pex=None,):
|
|
|
2343 |
self.success = success
|
|
|
2344 |
self.pex = pex
|
|
|
2345 |
|
|
|
2346 |
def read(self, iprot):
|
|
|
2347 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2348 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2349 |
return
|
|
|
2350 |
iprot.readStructBegin()
|
|
|
2351 |
while True:
|
|
|
2352 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2353 |
if ftype == TType.STOP:
|
|
|
2354 |
break
|
|
|
2355 |
if fid == 0:
|
|
|
2356 |
if ftype == TType.STRUCT:
|
|
|
2357 |
self.success = Cart()
|
|
|
2358 |
self.success.read(iprot)
|
|
|
2359 |
else:
|
|
|
2360 |
iprot.skip(ftype)
|
|
|
2361 |
elif fid == 1:
|
|
|
2362 |
if ftype == TType.STRUCT:
|
|
|
2363 |
self.pex = PromotionException()
|
|
|
2364 |
self.pex.read(iprot)
|
|
|
2365 |
else:
|
|
|
2366 |
iprot.skip(ftype)
|
|
|
2367 |
else:
|
|
|
2368 |
iprot.skip(ftype)
|
|
|
2369 |
iprot.readFieldEnd()
|
|
|
2370 |
iprot.readStructEnd()
|
|
|
2371 |
|
|
|
2372 |
def write(self, oprot):
|
|
|
2373 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2374 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2375 |
return
|
|
|
2376 |
oprot.writeStructBegin('applyCoupon_result')
|
| 3431 |
rajveer |
2377 |
if self.success is not None:
|
| 1976 |
varun.gupt |
2378 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
2379 |
self.success.write(oprot)
|
|
|
2380 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2381 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
2382 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2383 |
self.pex.write(oprot)
|
|
|
2384 |
oprot.writeFieldEnd()
|
|
|
2385 |
oprot.writeFieldStop()
|
|
|
2386 |
oprot.writeStructEnd()
|
|
|
2387 |
|
| 3431 |
rajveer |
2388 |
def validate(self):
|
|
|
2389 |
return
|
|
|
2390 |
|
|
|
2391 |
|
| 1976 |
varun.gupt |
2392 |
def __repr__(self):
|
|
|
2393 |
L = ['%s=%r' % (key, value)
|
|
|
2394 |
for key, value in self.__dict__.iteritems()]
|
|
|
2395 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2396 |
|
|
|
2397 |
def __eq__(self, other):
|
|
|
2398 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2399 |
|
|
|
2400 |
def __ne__(self, other):
|
|
|
2401 |
return not (self == other)
|
|
|
2402 |
|
| 6736 |
amit.gupta |
2403 |
class getEmiDiscount_args:
|
|
|
2404 |
"""
|
|
|
2405 |
Attributes:
|
|
|
2406 |
- cartId
|
|
|
2407 |
"""
|
|
|
2408 |
|
|
|
2409 |
thrift_spec = (
|
|
|
2410 |
None, # 0
|
|
|
2411 |
(1, TType.I64, 'cartId', None, None, ), # 1
|
|
|
2412 |
)
|
|
|
2413 |
|
|
|
2414 |
def __init__(self, cartId=None,):
|
|
|
2415 |
self.cartId = cartId
|
|
|
2416 |
|
|
|
2417 |
def read(self, iprot):
|
|
|
2418 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2419 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2420 |
return
|
|
|
2421 |
iprot.readStructBegin()
|
|
|
2422 |
while True:
|
|
|
2423 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2424 |
if ftype == TType.STOP:
|
|
|
2425 |
break
|
|
|
2426 |
if fid == 1:
|
|
|
2427 |
if ftype == TType.I64:
|
|
|
2428 |
self.cartId = iprot.readI64();
|
|
|
2429 |
else:
|
|
|
2430 |
iprot.skip(ftype)
|
|
|
2431 |
else:
|
|
|
2432 |
iprot.skip(ftype)
|
|
|
2433 |
iprot.readFieldEnd()
|
|
|
2434 |
iprot.readStructEnd()
|
|
|
2435 |
|
|
|
2436 |
def write(self, oprot):
|
|
|
2437 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2438 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2439 |
return
|
|
|
2440 |
oprot.writeStructBegin('getEmiDiscount_args')
|
|
|
2441 |
if self.cartId is not None:
|
|
|
2442 |
oprot.writeFieldBegin('cartId', TType.I64, 1)
|
|
|
2443 |
oprot.writeI64(self.cartId)
|
|
|
2444 |
oprot.writeFieldEnd()
|
|
|
2445 |
oprot.writeFieldStop()
|
|
|
2446 |
oprot.writeStructEnd()
|
|
|
2447 |
|
|
|
2448 |
def validate(self):
|
|
|
2449 |
return
|
|
|
2450 |
|
|
|
2451 |
|
|
|
2452 |
def __repr__(self):
|
|
|
2453 |
L = ['%s=%r' % (key, value)
|
|
|
2454 |
for key, value in self.__dict__.iteritems()]
|
|
|
2455 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2456 |
|
|
|
2457 |
def __eq__(self, other):
|
|
|
2458 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2459 |
|
|
|
2460 |
def __ne__(self, other):
|
|
|
2461 |
return not (self == other)
|
|
|
2462 |
|
|
|
2463 |
class getEmiDiscount_result:
|
|
|
2464 |
"""
|
|
|
2465 |
Attributes:
|
|
|
2466 |
- success
|
|
|
2467 |
- pex
|
|
|
2468 |
"""
|
|
|
2469 |
|
|
|
2470 |
thrift_spec = (
|
|
|
2471 |
(0, TType.MAP, 'success', (TType.I64,None,TType.DOUBLE,None), None, ), # 0
|
|
|
2472 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2473 |
)
|
|
|
2474 |
|
|
|
2475 |
def __init__(self, success=None, pex=None,):
|
|
|
2476 |
self.success = success
|
|
|
2477 |
self.pex = pex
|
|
|
2478 |
|
|
|
2479 |
def read(self, iprot):
|
|
|
2480 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2481 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2482 |
return
|
|
|
2483 |
iprot.readStructBegin()
|
|
|
2484 |
while True:
|
|
|
2485 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2486 |
if ftype == TType.STOP:
|
|
|
2487 |
break
|
|
|
2488 |
if fid == 0:
|
|
|
2489 |
if ftype == TType.MAP:
|
|
|
2490 |
self.success = {}
|
|
|
2491 |
(_ktype29, _vtype30, _size28 ) = iprot.readMapBegin()
|
|
|
2492 |
for _i32 in xrange(_size28):
|
|
|
2493 |
_key33 = iprot.readI64();
|
|
|
2494 |
_val34 = iprot.readDouble();
|
|
|
2495 |
self.success[_key33] = _val34
|
|
|
2496 |
iprot.readMapEnd()
|
|
|
2497 |
else:
|
|
|
2498 |
iprot.skip(ftype)
|
|
|
2499 |
elif fid == 1:
|
|
|
2500 |
if ftype == TType.STRUCT:
|
|
|
2501 |
self.pex = PromotionException()
|
|
|
2502 |
self.pex.read(iprot)
|
|
|
2503 |
else:
|
|
|
2504 |
iprot.skip(ftype)
|
|
|
2505 |
else:
|
|
|
2506 |
iprot.skip(ftype)
|
|
|
2507 |
iprot.readFieldEnd()
|
|
|
2508 |
iprot.readStructEnd()
|
|
|
2509 |
|
|
|
2510 |
def write(self, oprot):
|
|
|
2511 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2512 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2513 |
return
|
|
|
2514 |
oprot.writeStructBegin('getEmiDiscount_result')
|
|
|
2515 |
if self.success is not None:
|
|
|
2516 |
oprot.writeFieldBegin('success', TType.MAP, 0)
|
|
|
2517 |
oprot.writeMapBegin(TType.I64, TType.DOUBLE, len(self.success))
|
|
|
2518 |
for kiter35,viter36 in self.success.items():
|
|
|
2519 |
oprot.writeI64(kiter35)
|
|
|
2520 |
oprot.writeDouble(viter36)
|
|
|
2521 |
oprot.writeMapEnd()
|
|
|
2522 |
oprot.writeFieldEnd()
|
|
|
2523 |
if self.pex is not None:
|
|
|
2524 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2525 |
self.pex.write(oprot)
|
|
|
2526 |
oprot.writeFieldEnd()
|
|
|
2527 |
oprot.writeFieldStop()
|
|
|
2528 |
oprot.writeStructEnd()
|
|
|
2529 |
|
|
|
2530 |
def validate(self):
|
|
|
2531 |
return
|
|
|
2532 |
|
|
|
2533 |
|
|
|
2534 |
def __repr__(self):
|
|
|
2535 |
L = ['%s=%r' % (key, value)
|
|
|
2536 |
for key, value in self.__dict__.iteritems()]
|
|
|
2537 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2538 |
|
|
|
2539 |
def __eq__(self, other):
|
|
|
2540 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2541 |
|
|
|
2542 |
def __ne__(self, other):
|
|
|
2543 |
return not (self == other)
|
|
|
2544 |
|
| 6433 |
anupam.sin |
2545 |
class applyRechargeCoupon_args:
|
|
|
2546 |
"""
|
|
|
2547 |
Attributes:
|
|
|
2548 |
- couponCode
|
|
|
2549 |
- totalAmount
|
|
|
2550 |
- userId
|
|
|
2551 |
"""
|
|
|
2552 |
|
|
|
2553 |
thrift_spec = (
|
|
|
2554 |
None, # 0
|
|
|
2555 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
2556 |
(2, TType.I64, 'totalAmount', None, None, ), # 2
|
|
|
2557 |
(3, TType.I64, 'userId', None, None, ), # 3
|
|
|
2558 |
)
|
|
|
2559 |
|
|
|
2560 |
def __init__(self, couponCode=None, totalAmount=None, userId=None,):
|
|
|
2561 |
self.couponCode = couponCode
|
|
|
2562 |
self.totalAmount = totalAmount
|
|
|
2563 |
self.userId = userId
|
|
|
2564 |
|
|
|
2565 |
def read(self, iprot):
|
|
|
2566 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2567 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2568 |
return
|
|
|
2569 |
iprot.readStructBegin()
|
|
|
2570 |
while True:
|
|
|
2571 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2572 |
if ftype == TType.STOP:
|
|
|
2573 |
break
|
|
|
2574 |
if fid == 1:
|
|
|
2575 |
if ftype == TType.STRING:
|
|
|
2576 |
self.couponCode = iprot.readString();
|
|
|
2577 |
else:
|
|
|
2578 |
iprot.skip(ftype)
|
|
|
2579 |
elif fid == 2:
|
|
|
2580 |
if ftype == TType.I64:
|
|
|
2581 |
self.totalAmount = iprot.readI64();
|
|
|
2582 |
else:
|
|
|
2583 |
iprot.skip(ftype)
|
|
|
2584 |
elif fid == 3:
|
|
|
2585 |
if ftype == TType.I64:
|
|
|
2586 |
self.userId = iprot.readI64();
|
|
|
2587 |
else:
|
|
|
2588 |
iprot.skip(ftype)
|
|
|
2589 |
else:
|
|
|
2590 |
iprot.skip(ftype)
|
|
|
2591 |
iprot.readFieldEnd()
|
|
|
2592 |
iprot.readStructEnd()
|
|
|
2593 |
|
|
|
2594 |
def write(self, oprot):
|
|
|
2595 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2596 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2597 |
return
|
|
|
2598 |
oprot.writeStructBegin('applyRechargeCoupon_args')
|
|
|
2599 |
if self.couponCode is not None:
|
|
|
2600 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
2601 |
oprot.writeString(self.couponCode)
|
|
|
2602 |
oprot.writeFieldEnd()
|
|
|
2603 |
if self.totalAmount is not None:
|
|
|
2604 |
oprot.writeFieldBegin('totalAmount', TType.I64, 2)
|
|
|
2605 |
oprot.writeI64(self.totalAmount)
|
|
|
2606 |
oprot.writeFieldEnd()
|
|
|
2607 |
if self.userId is not None:
|
|
|
2608 |
oprot.writeFieldBegin('userId', TType.I64, 3)
|
|
|
2609 |
oprot.writeI64(self.userId)
|
|
|
2610 |
oprot.writeFieldEnd()
|
|
|
2611 |
oprot.writeFieldStop()
|
|
|
2612 |
oprot.writeStructEnd()
|
|
|
2613 |
|
|
|
2614 |
def validate(self):
|
|
|
2615 |
return
|
|
|
2616 |
|
|
|
2617 |
|
|
|
2618 |
def __repr__(self):
|
|
|
2619 |
L = ['%s=%r' % (key, value)
|
|
|
2620 |
for key, value in self.__dict__.iteritems()]
|
|
|
2621 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2622 |
|
|
|
2623 |
def __eq__(self, other):
|
|
|
2624 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2625 |
|
|
|
2626 |
def __ne__(self, other):
|
|
|
2627 |
return not (self == other)
|
|
|
2628 |
|
|
|
2629 |
class applyRechargeCoupon_result:
|
|
|
2630 |
"""
|
|
|
2631 |
Attributes:
|
|
|
2632 |
- success
|
|
|
2633 |
- pex
|
|
|
2634 |
"""
|
|
|
2635 |
|
|
|
2636 |
thrift_spec = (
|
|
|
2637 |
(0, TType.MAP, 'success', (TType.I64,None,TType.STRING,None), None, ), # 0
|
|
|
2638 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2639 |
)
|
|
|
2640 |
|
|
|
2641 |
def __init__(self, success=None, pex=None,):
|
|
|
2642 |
self.success = success
|
|
|
2643 |
self.pex = pex
|
|
|
2644 |
|
|
|
2645 |
def read(self, iprot):
|
|
|
2646 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2647 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2648 |
return
|
|
|
2649 |
iprot.readStructBegin()
|
|
|
2650 |
while True:
|
|
|
2651 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2652 |
if ftype == TType.STOP:
|
|
|
2653 |
break
|
|
|
2654 |
if fid == 0:
|
|
|
2655 |
if ftype == TType.MAP:
|
|
|
2656 |
self.success = {}
|
| 6736 |
amit.gupta |
2657 |
(_ktype38, _vtype39, _size37 ) = iprot.readMapBegin()
|
|
|
2658 |
for _i41 in xrange(_size37):
|
|
|
2659 |
_key42 = iprot.readI64();
|
|
|
2660 |
_val43 = iprot.readString();
|
|
|
2661 |
self.success[_key42] = _val43
|
| 6433 |
anupam.sin |
2662 |
iprot.readMapEnd()
|
|
|
2663 |
else:
|
|
|
2664 |
iprot.skip(ftype)
|
|
|
2665 |
elif fid == 1:
|
|
|
2666 |
if ftype == TType.STRUCT:
|
|
|
2667 |
self.pex = PromotionException()
|
|
|
2668 |
self.pex.read(iprot)
|
|
|
2669 |
else:
|
|
|
2670 |
iprot.skip(ftype)
|
|
|
2671 |
else:
|
|
|
2672 |
iprot.skip(ftype)
|
|
|
2673 |
iprot.readFieldEnd()
|
|
|
2674 |
iprot.readStructEnd()
|
|
|
2675 |
|
|
|
2676 |
def write(self, oprot):
|
|
|
2677 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2678 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2679 |
return
|
|
|
2680 |
oprot.writeStructBegin('applyRechargeCoupon_result')
|
|
|
2681 |
if self.success is not None:
|
|
|
2682 |
oprot.writeFieldBegin('success', TType.MAP, 0)
|
|
|
2683 |
oprot.writeMapBegin(TType.I64, TType.STRING, len(self.success))
|
| 6736 |
amit.gupta |
2684 |
for kiter44,viter45 in self.success.items():
|
|
|
2685 |
oprot.writeI64(kiter44)
|
|
|
2686 |
oprot.writeString(viter45)
|
| 6433 |
anupam.sin |
2687 |
oprot.writeMapEnd()
|
|
|
2688 |
oprot.writeFieldEnd()
|
|
|
2689 |
if self.pex is not None:
|
|
|
2690 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2691 |
self.pex.write(oprot)
|
|
|
2692 |
oprot.writeFieldEnd()
|
|
|
2693 |
oprot.writeFieldStop()
|
|
|
2694 |
oprot.writeStructEnd()
|
|
|
2695 |
|
|
|
2696 |
def validate(self):
|
|
|
2697 |
return
|
|
|
2698 |
|
|
|
2699 |
|
|
|
2700 |
def __repr__(self):
|
|
|
2701 |
L = ['%s=%r' % (key, value)
|
|
|
2702 |
for key, value in self.__dict__.iteritems()]
|
|
|
2703 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2704 |
|
|
|
2705 |
def __eq__(self, other):
|
|
|
2706 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2707 |
|
|
|
2708 |
def __ne__(self, other):
|
|
|
2709 |
return not (self == other)
|
|
|
2710 |
|
| 1976 |
varun.gupt |
2711 |
class trackCouponUsage_args:
|
|
|
2712 |
"""
|
|
|
2713 |
Attributes:
|
|
|
2714 |
- couponCode
|
|
|
2715 |
- transactionId
|
|
|
2716 |
- userId
|
|
|
2717 |
"""
|
|
|
2718 |
|
|
|
2719 |
thrift_spec = (
|
|
|
2720 |
None, # 0
|
|
|
2721 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
2722 |
(2, TType.I64, 'transactionId', None, None, ), # 2
|
|
|
2723 |
(3, TType.I64, 'userId', None, None, ), # 3
|
|
|
2724 |
)
|
|
|
2725 |
|
|
|
2726 |
def __init__(self, couponCode=None, transactionId=None, userId=None,):
|
|
|
2727 |
self.couponCode = couponCode
|
|
|
2728 |
self.transactionId = transactionId
|
|
|
2729 |
self.userId = userId
|
|
|
2730 |
|
|
|
2731 |
def read(self, iprot):
|
|
|
2732 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2733 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2734 |
return
|
|
|
2735 |
iprot.readStructBegin()
|
|
|
2736 |
while True:
|
|
|
2737 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2738 |
if ftype == TType.STOP:
|
|
|
2739 |
break
|
|
|
2740 |
if fid == 1:
|
|
|
2741 |
if ftype == TType.STRING:
|
|
|
2742 |
self.couponCode = iprot.readString();
|
|
|
2743 |
else:
|
|
|
2744 |
iprot.skip(ftype)
|
|
|
2745 |
elif fid == 2:
|
|
|
2746 |
if ftype == TType.I64:
|
|
|
2747 |
self.transactionId = iprot.readI64();
|
|
|
2748 |
else:
|
|
|
2749 |
iprot.skip(ftype)
|
|
|
2750 |
elif fid == 3:
|
|
|
2751 |
if ftype == TType.I64:
|
|
|
2752 |
self.userId = iprot.readI64();
|
|
|
2753 |
else:
|
|
|
2754 |
iprot.skip(ftype)
|
|
|
2755 |
else:
|
|
|
2756 |
iprot.skip(ftype)
|
|
|
2757 |
iprot.readFieldEnd()
|
|
|
2758 |
iprot.readStructEnd()
|
|
|
2759 |
|
|
|
2760 |
def write(self, oprot):
|
|
|
2761 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2762 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2763 |
return
|
|
|
2764 |
oprot.writeStructBegin('trackCouponUsage_args')
|
| 3431 |
rajveer |
2765 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
2766 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
2767 |
oprot.writeString(self.couponCode)
|
|
|
2768 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2769 |
if self.transactionId is not None:
|
| 1976 |
varun.gupt |
2770 |
oprot.writeFieldBegin('transactionId', TType.I64, 2)
|
|
|
2771 |
oprot.writeI64(self.transactionId)
|
|
|
2772 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2773 |
if self.userId is not None:
|
| 1976 |
varun.gupt |
2774 |
oprot.writeFieldBegin('userId', TType.I64, 3)
|
|
|
2775 |
oprot.writeI64(self.userId)
|
|
|
2776 |
oprot.writeFieldEnd()
|
|
|
2777 |
oprot.writeFieldStop()
|
|
|
2778 |
oprot.writeStructEnd()
|
|
|
2779 |
|
| 3431 |
rajveer |
2780 |
def validate(self):
|
|
|
2781 |
return
|
|
|
2782 |
|
|
|
2783 |
|
| 1976 |
varun.gupt |
2784 |
def __repr__(self):
|
|
|
2785 |
L = ['%s=%r' % (key, value)
|
|
|
2786 |
for key, value in self.__dict__.iteritems()]
|
|
|
2787 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2788 |
|
|
|
2789 |
def __eq__(self, other):
|
|
|
2790 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2791 |
|
|
|
2792 |
def __ne__(self, other):
|
|
|
2793 |
return not (self == other)
|
|
|
2794 |
|
|
|
2795 |
class trackCouponUsage_result:
|
|
|
2796 |
"""
|
|
|
2797 |
Attributes:
|
|
|
2798 |
- pex
|
|
|
2799 |
"""
|
|
|
2800 |
|
|
|
2801 |
thrift_spec = (
|
|
|
2802 |
None, # 0
|
|
|
2803 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2804 |
)
|
|
|
2805 |
|
|
|
2806 |
def __init__(self, pex=None,):
|
|
|
2807 |
self.pex = pex
|
|
|
2808 |
|
|
|
2809 |
def read(self, iprot):
|
|
|
2810 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2811 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2812 |
return
|
|
|
2813 |
iprot.readStructBegin()
|
|
|
2814 |
while True:
|
|
|
2815 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2816 |
if ftype == TType.STOP:
|
|
|
2817 |
break
|
|
|
2818 |
if fid == 1:
|
|
|
2819 |
if ftype == TType.STRUCT:
|
|
|
2820 |
self.pex = PromotionException()
|
|
|
2821 |
self.pex.read(iprot)
|
|
|
2822 |
else:
|
|
|
2823 |
iprot.skip(ftype)
|
|
|
2824 |
else:
|
|
|
2825 |
iprot.skip(ftype)
|
|
|
2826 |
iprot.readFieldEnd()
|
|
|
2827 |
iprot.readStructEnd()
|
|
|
2828 |
|
|
|
2829 |
def write(self, oprot):
|
|
|
2830 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2831 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2832 |
return
|
|
|
2833 |
oprot.writeStructBegin('trackCouponUsage_result')
|
| 3431 |
rajveer |
2834 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
2835 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2836 |
self.pex.write(oprot)
|
|
|
2837 |
oprot.writeFieldEnd()
|
|
|
2838 |
oprot.writeFieldStop()
|
|
|
2839 |
oprot.writeStructEnd()
|
|
|
2840 |
|
| 3431 |
rajveer |
2841 |
def validate(self):
|
|
|
2842 |
return
|
|
|
2843 |
|
|
|
2844 |
|
| 1976 |
varun.gupt |
2845 |
def __repr__(self):
|
|
|
2846 |
L = ['%s=%r' % (key, value)
|
|
|
2847 |
for key, value in self.__dict__.iteritems()]
|
|
|
2848 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2849 |
|
|
|
2850 |
def __eq__(self, other):
|
|
|
2851 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2852 |
|
|
|
2853 |
def __ne__(self, other):
|
|
|
2854 |
return not (self == other)
|
|
|
2855 |
|
|
|
2856 |
class getCouponUsageCountByUser_args:
|
|
|
2857 |
"""
|
|
|
2858 |
Attributes:
|
|
|
2859 |
- couponCode
|
|
|
2860 |
- userId
|
|
|
2861 |
"""
|
|
|
2862 |
|
|
|
2863 |
thrift_spec = (
|
|
|
2864 |
None, # 0
|
|
|
2865 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
2866 |
(2, TType.I64, 'userId', None, None, ), # 2
|
|
|
2867 |
)
|
|
|
2868 |
|
|
|
2869 |
def __init__(self, couponCode=None, userId=None,):
|
|
|
2870 |
self.couponCode = couponCode
|
|
|
2871 |
self.userId = userId
|
|
|
2872 |
|
|
|
2873 |
def read(self, iprot):
|
|
|
2874 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2875 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2876 |
return
|
|
|
2877 |
iprot.readStructBegin()
|
|
|
2878 |
while True:
|
|
|
2879 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2880 |
if ftype == TType.STOP:
|
|
|
2881 |
break
|
|
|
2882 |
if fid == 1:
|
|
|
2883 |
if ftype == TType.STRING:
|
|
|
2884 |
self.couponCode = iprot.readString();
|
|
|
2885 |
else:
|
|
|
2886 |
iprot.skip(ftype)
|
|
|
2887 |
elif fid == 2:
|
|
|
2888 |
if ftype == TType.I64:
|
|
|
2889 |
self.userId = iprot.readI64();
|
|
|
2890 |
else:
|
|
|
2891 |
iprot.skip(ftype)
|
|
|
2892 |
else:
|
|
|
2893 |
iprot.skip(ftype)
|
|
|
2894 |
iprot.readFieldEnd()
|
|
|
2895 |
iprot.readStructEnd()
|
|
|
2896 |
|
|
|
2897 |
def write(self, oprot):
|
|
|
2898 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2899 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2900 |
return
|
|
|
2901 |
oprot.writeStructBegin('getCouponUsageCountByUser_args')
|
| 3431 |
rajveer |
2902 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
2903 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
2904 |
oprot.writeString(self.couponCode)
|
|
|
2905 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2906 |
if self.userId is not None:
|
| 1976 |
varun.gupt |
2907 |
oprot.writeFieldBegin('userId', TType.I64, 2)
|
|
|
2908 |
oprot.writeI64(self.userId)
|
|
|
2909 |
oprot.writeFieldEnd()
|
|
|
2910 |
oprot.writeFieldStop()
|
|
|
2911 |
oprot.writeStructEnd()
|
|
|
2912 |
|
| 3431 |
rajveer |
2913 |
def validate(self):
|
|
|
2914 |
return
|
|
|
2915 |
|
|
|
2916 |
|
| 1976 |
varun.gupt |
2917 |
def __repr__(self):
|
|
|
2918 |
L = ['%s=%r' % (key, value)
|
|
|
2919 |
for key, value in self.__dict__.iteritems()]
|
|
|
2920 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2921 |
|
|
|
2922 |
def __eq__(self, other):
|
|
|
2923 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2924 |
|
|
|
2925 |
def __ne__(self, other):
|
|
|
2926 |
return not (self == other)
|
|
|
2927 |
|
|
|
2928 |
class getCouponUsageCountByUser_result:
|
|
|
2929 |
"""
|
|
|
2930 |
Attributes:
|
|
|
2931 |
- success
|
|
|
2932 |
- pex
|
|
|
2933 |
"""
|
|
|
2934 |
|
|
|
2935 |
thrift_spec = (
|
|
|
2936 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
2937 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
2938 |
)
|
|
|
2939 |
|
|
|
2940 |
def __init__(self, success=None, pex=None,):
|
|
|
2941 |
self.success = success
|
|
|
2942 |
self.pex = pex
|
|
|
2943 |
|
|
|
2944 |
def read(self, iprot):
|
|
|
2945 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2946 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
2947 |
return
|
|
|
2948 |
iprot.readStructBegin()
|
|
|
2949 |
while True:
|
|
|
2950 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
2951 |
if ftype == TType.STOP:
|
|
|
2952 |
break
|
|
|
2953 |
if fid == 0:
|
|
|
2954 |
if ftype == TType.I64:
|
|
|
2955 |
self.success = iprot.readI64();
|
|
|
2956 |
else:
|
|
|
2957 |
iprot.skip(ftype)
|
|
|
2958 |
elif fid == 1:
|
|
|
2959 |
if ftype == TType.STRUCT:
|
|
|
2960 |
self.pex = PromotionException()
|
|
|
2961 |
self.pex.read(iprot)
|
|
|
2962 |
else:
|
|
|
2963 |
iprot.skip(ftype)
|
|
|
2964 |
else:
|
|
|
2965 |
iprot.skip(ftype)
|
|
|
2966 |
iprot.readFieldEnd()
|
|
|
2967 |
iprot.readStructEnd()
|
|
|
2968 |
|
|
|
2969 |
def write(self, oprot):
|
|
|
2970 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
2971 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
2972 |
return
|
|
|
2973 |
oprot.writeStructBegin('getCouponUsageCountByUser_result')
|
| 3431 |
rajveer |
2974 |
if self.success is not None:
|
| 1976 |
varun.gupt |
2975 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
2976 |
oprot.writeI64(self.success)
|
|
|
2977 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
2978 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
2979 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
2980 |
self.pex.write(oprot)
|
|
|
2981 |
oprot.writeFieldEnd()
|
|
|
2982 |
oprot.writeFieldStop()
|
|
|
2983 |
oprot.writeStructEnd()
|
|
|
2984 |
|
| 3431 |
rajveer |
2985 |
def validate(self):
|
|
|
2986 |
return
|
|
|
2987 |
|
|
|
2988 |
|
| 1976 |
varun.gupt |
2989 |
def __repr__(self):
|
|
|
2990 |
L = ['%s=%r' % (key, value)
|
|
|
2991 |
for key, value in self.__dict__.iteritems()]
|
|
|
2992 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
2993 |
|
|
|
2994 |
def __eq__(self, other):
|
|
|
2995 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
2996 |
|
|
|
2997 |
def __ne__(self, other):
|
|
|
2998 |
return not (self == other)
|
|
|
2999 |
|
| 6497 |
amit.gupta |
3000 |
class getActiveCodes_args:
|
|
|
3001 |
"""
|
|
|
3002 |
Attributes:
|
|
|
3003 |
- promotionId
|
|
|
3004 |
"""
|
| 1976 |
varun.gupt |
3005 |
|
| 3385 |
varun.gupt |
3006 |
thrift_spec = (
|
| 6497 |
amit.gupta |
3007 |
None, # 0
|
|
|
3008 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
| 3385 |
varun.gupt |
3009 |
)
|
|
|
3010 |
|
| 6497 |
amit.gupta |
3011 |
def __init__(self, promotionId=None,):
|
|
|
3012 |
self.promotionId = promotionId
|
|
|
3013 |
|
| 3385 |
varun.gupt |
3014 |
def read(self, iprot):
|
|
|
3015 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3016 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3017 |
return
|
|
|
3018 |
iprot.readStructBegin()
|
|
|
3019 |
while True:
|
|
|
3020 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3021 |
if ftype == TType.STOP:
|
|
|
3022 |
break
|
| 6497 |
amit.gupta |
3023 |
if fid == 1:
|
|
|
3024 |
if ftype == TType.I64:
|
|
|
3025 |
self.promotionId = iprot.readI64();
|
|
|
3026 |
else:
|
|
|
3027 |
iprot.skip(ftype)
|
| 3385 |
varun.gupt |
3028 |
else:
|
|
|
3029 |
iprot.skip(ftype)
|
|
|
3030 |
iprot.readFieldEnd()
|
|
|
3031 |
iprot.readStructEnd()
|
|
|
3032 |
|
|
|
3033 |
def write(self, oprot):
|
|
|
3034 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3035 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3036 |
return
|
| 6497 |
amit.gupta |
3037 |
oprot.writeStructBegin('getActiveCodes_args')
|
|
|
3038 |
if self.promotionId is not None:
|
|
|
3039 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
3040 |
oprot.writeI64(self.promotionId)
|
|
|
3041 |
oprot.writeFieldEnd()
|
| 3385 |
varun.gupt |
3042 |
oprot.writeFieldStop()
|
|
|
3043 |
oprot.writeStructEnd()
|
|
|
3044 |
|
| 3431 |
rajveer |
3045 |
def validate(self):
|
|
|
3046 |
return
|
|
|
3047 |
|
|
|
3048 |
|
| 3385 |
varun.gupt |
3049 |
def __repr__(self):
|
|
|
3050 |
L = ['%s=%r' % (key, value)
|
|
|
3051 |
for key, value in self.__dict__.iteritems()]
|
|
|
3052 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3053 |
|
|
|
3054 |
def __eq__(self, other):
|
|
|
3055 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3056 |
|
|
|
3057 |
def __ne__(self, other):
|
|
|
3058 |
return not (self == other)
|
|
|
3059 |
|
| 6497 |
amit.gupta |
3060 |
class getActiveCodes_result:
|
| 3385 |
varun.gupt |
3061 |
"""
|
|
|
3062 |
Attributes:
|
|
|
3063 |
- success
|
|
|
3064 |
- pex
|
|
|
3065 |
"""
|
|
|
3066 |
|
|
|
3067 |
thrift_spec = (
|
|
|
3068 |
(0, TType.LIST, 'success', (TType.STRUCT,(Coupon, Coupon.thrift_spec)), None, ), # 0
|
|
|
3069 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3070 |
)
|
|
|
3071 |
|
|
|
3072 |
def __init__(self, success=None, pex=None,):
|
|
|
3073 |
self.success = success
|
|
|
3074 |
self.pex = pex
|
|
|
3075 |
|
|
|
3076 |
def read(self, iprot):
|
|
|
3077 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3078 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3079 |
return
|
|
|
3080 |
iprot.readStructBegin()
|
|
|
3081 |
while True:
|
|
|
3082 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3083 |
if ftype == TType.STOP:
|
|
|
3084 |
break
|
|
|
3085 |
if fid == 0:
|
|
|
3086 |
if ftype == TType.LIST:
|
|
|
3087 |
self.success = []
|
| 6736 |
amit.gupta |
3088 |
(_etype49, _size46) = iprot.readListBegin()
|
|
|
3089 |
for _i50 in xrange(_size46):
|
|
|
3090 |
_elem51 = Coupon()
|
|
|
3091 |
_elem51.read(iprot)
|
|
|
3092 |
self.success.append(_elem51)
|
| 3385 |
varun.gupt |
3093 |
iprot.readListEnd()
|
|
|
3094 |
else:
|
|
|
3095 |
iprot.skip(ftype)
|
|
|
3096 |
elif fid == 1:
|
|
|
3097 |
if ftype == TType.STRUCT:
|
|
|
3098 |
self.pex = PromotionException()
|
|
|
3099 |
self.pex.read(iprot)
|
|
|
3100 |
else:
|
|
|
3101 |
iprot.skip(ftype)
|
|
|
3102 |
else:
|
|
|
3103 |
iprot.skip(ftype)
|
|
|
3104 |
iprot.readFieldEnd()
|
|
|
3105 |
iprot.readStructEnd()
|
|
|
3106 |
|
|
|
3107 |
def write(self, oprot):
|
|
|
3108 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3109 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3110 |
return
|
| 6497 |
amit.gupta |
3111 |
oprot.writeStructBegin('getActiveCodes_result')
|
| 3431 |
rajveer |
3112 |
if self.success is not None:
|
| 3385 |
varun.gupt |
3113 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
3114 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 6736 |
amit.gupta |
3115 |
for iter52 in self.success:
|
|
|
3116 |
iter52.write(oprot)
|
| 3385 |
varun.gupt |
3117 |
oprot.writeListEnd()
|
|
|
3118 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
3119 |
if self.pex is not None:
|
| 3385 |
varun.gupt |
3120 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3121 |
self.pex.write(oprot)
|
|
|
3122 |
oprot.writeFieldEnd()
|
|
|
3123 |
oprot.writeFieldStop()
|
|
|
3124 |
oprot.writeStructEnd()
|
|
|
3125 |
|
| 3431 |
rajveer |
3126 |
def validate(self):
|
|
|
3127 |
return
|
|
|
3128 |
|
|
|
3129 |
|
| 3385 |
varun.gupt |
3130 |
def __repr__(self):
|
|
|
3131 |
L = ['%s=%r' % (key, value)
|
|
|
3132 |
for key, value in self.__dict__.iteritems()]
|
|
|
3133 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3134 |
|
|
|
3135 |
def __eq__(self, other):
|
|
|
3136 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3137 |
|
|
|
3138 |
def __ne__(self, other):
|
|
|
3139 |
return not (self == other)
|
|
|
3140 |
|
| 6497 |
amit.gupta |
3141 |
class deleteCoupon_args:
|
|
|
3142 |
"""
|
|
|
3143 |
Attributes:
|
|
|
3144 |
- couponCode
|
|
|
3145 |
"""
|
|
|
3146 |
|
|
|
3147 |
thrift_spec = (
|
|
|
3148 |
None, # 0
|
|
|
3149 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
3150 |
)
|
|
|
3151 |
|
|
|
3152 |
def __init__(self, couponCode=None,):
|
|
|
3153 |
self.couponCode = couponCode
|
|
|
3154 |
|
|
|
3155 |
def read(self, iprot):
|
|
|
3156 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3157 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3158 |
return
|
|
|
3159 |
iprot.readStructBegin()
|
|
|
3160 |
while True:
|
|
|
3161 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3162 |
if ftype == TType.STOP:
|
|
|
3163 |
break
|
|
|
3164 |
if fid == 1:
|
|
|
3165 |
if ftype == TType.STRING:
|
|
|
3166 |
self.couponCode = iprot.readString();
|
|
|
3167 |
else:
|
|
|
3168 |
iprot.skip(ftype)
|
|
|
3169 |
else:
|
|
|
3170 |
iprot.skip(ftype)
|
|
|
3171 |
iprot.readFieldEnd()
|
|
|
3172 |
iprot.readStructEnd()
|
|
|
3173 |
|
|
|
3174 |
def write(self, oprot):
|
|
|
3175 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3176 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3177 |
return
|
|
|
3178 |
oprot.writeStructBegin('deleteCoupon_args')
|
|
|
3179 |
if self.couponCode is not None:
|
|
|
3180 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
3181 |
oprot.writeString(self.couponCode)
|
|
|
3182 |
oprot.writeFieldEnd()
|
|
|
3183 |
oprot.writeFieldStop()
|
|
|
3184 |
oprot.writeStructEnd()
|
|
|
3185 |
|
|
|
3186 |
def validate(self):
|
|
|
3187 |
return
|
|
|
3188 |
|
|
|
3189 |
|
|
|
3190 |
def __repr__(self):
|
|
|
3191 |
L = ['%s=%r' % (key, value)
|
|
|
3192 |
for key, value in self.__dict__.iteritems()]
|
|
|
3193 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3194 |
|
|
|
3195 |
def __eq__(self, other):
|
|
|
3196 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3197 |
|
|
|
3198 |
def __ne__(self, other):
|
|
|
3199 |
return not (self == other)
|
|
|
3200 |
|
|
|
3201 |
class deleteCoupon_result:
|
|
|
3202 |
"""
|
|
|
3203 |
Attributes:
|
|
|
3204 |
- pex
|
|
|
3205 |
"""
|
|
|
3206 |
|
|
|
3207 |
thrift_spec = (
|
|
|
3208 |
None, # 0
|
|
|
3209 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3210 |
)
|
|
|
3211 |
|
|
|
3212 |
def __init__(self, pex=None,):
|
|
|
3213 |
self.pex = pex
|
|
|
3214 |
|
|
|
3215 |
def read(self, iprot):
|
|
|
3216 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3217 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3218 |
return
|
|
|
3219 |
iprot.readStructBegin()
|
|
|
3220 |
while True:
|
|
|
3221 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3222 |
if ftype == TType.STOP:
|
|
|
3223 |
break
|
|
|
3224 |
if fid == 1:
|
|
|
3225 |
if ftype == TType.STRUCT:
|
|
|
3226 |
self.pex = PromotionException()
|
|
|
3227 |
self.pex.read(iprot)
|
|
|
3228 |
else:
|
|
|
3229 |
iprot.skip(ftype)
|
|
|
3230 |
else:
|
|
|
3231 |
iprot.skip(ftype)
|
|
|
3232 |
iprot.readFieldEnd()
|
|
|
3233 |
iprot.readStructEnd()
|
|
|
3234 |
|
|
|
3235 |
def write(self, oprot):
|
|
|
3236 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3237 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3238 |
return
|
|
|
3239 |
oprot.writeStructBegin('deleteCoupon_result')
|
|
|
3240 |
if self.pex is not None:
|
|
|
3241 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3242 |
self.pex.write(oprot)
|
|
|
3243 |
oprot.writeFieldEnd()
|
|
|
3244 |
oprot.writeFieldStop()
|
|
|
3245 |
oprot.writeStructEnd()
|
|
|
3246 |
|
|
|
3247 |
def validate(self):
|
|
|
3248 |
return
|
|
|
3249 |
|
|
|
3250 |
|
|
|
3251 |
def __repr__(self):
|
|
|
3252 |
L = ['%s=%r' % (key, value)
|
|
|
3253 |
for key, value in self.__dict__.iteritems()]
|
|
|
3254 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3255 |
|
|
|
3256 |
def __eq__(self, other):
|
|
|
3257 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3258 |
|
|
|
3259 |
def __ne__(self, other):
|
|
|
3260 |
return not (self == other)
|
|
|
3261 |
|
|
|
3262 |
class getActiveCoupons_args:
|
|
|
3263 |
|
|
|
3264 |
thrift_spec = (
|
|
|
3265 |
)
|
|
|
3266 |
|
|
|
3267 |
def read(self, iprot):
|
|
|
3268 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3269 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3270 |
return
|
|
|
3271 |
iprot.readStructBegin()
|
|
|
3272 |
while True:
|
|
|
3273 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3274 |
if ftype == TType.STOP:
|
|
|
3275 |
break
|
|
|
3276 |
else:
|
|
|
3277 |
iprot.skip(ftype)
|
|
|
3278 |
iprot.readFieldEnd()
|
|
|
3279 |
iprot.readStructEnd()
|
|
|
3280 |
|
|
|
3281 |
def write(self, oprot):
|
|
|
3282 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3283 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3284 |
return
|
|
|
3285 |
oprot.writeStructBegin('getActiveCoupons_args')
|
|
|
3286 |
oprot.writeFieldStop()
|
|
|
3287 |
oprot.writeStructEnd()
|
|
|
3288 |
|
|
|
3289 |
def validate(self):
|
|
|
3290 |
return
|
|
|
3291 |
|
|
|
3292 |
|
|
|
3293 |
def __repr__(self):
|
|
|
3294 |
L = ['%s=%r' % (key, value)
|
|
|
3295 |
for key, value in self.__dict__.iteritems()]
|
|
|
3296 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3297 |
|
|
|
3298 |
def __eq__(self, other):
|
|
|
3299 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3300 |
|
|
|
3301 |
def __ne__(self, other):
|
|
|
3302 |
return not (self == other)
|
|
|
3303 |
|
|
|
3304 |
class getActiveCoupons_result:
|
|
|
3305 |
"""
|
|
|
3306 |
Attributes:
|
|
|
3307 |
- success
|
|
|
3308 |
- pex
|
|
|
3309 |
"""
|
|
|
3310 |
|
|
|
3311 |
thrift_spec = (
|
|
|
3312 |
(0, TType.LIST, 'success', (TType.STRUCT,(Coupon, Coupon.thrift_spec)), None, ), # 0
|
|
|
3313 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3314 |
)
|
|
|
3315 |
|
|
|
3316 |
def __init__(self, success=None, pex=None,):
|
|
|
3317 |
self.success = success
|
|
|
3318 |
self.pex = pex
|
|
|
3319 |
|
|
|
3320 |
def read(self, iprot):
|
|
|
3321 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3322 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3323 |
return
|
|
|
3324 |
iprot.readStructBegin()
|
|
|
3325 |
while True:
|
|
|
3326 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3327 |
if ftype == TType.STOP:
|
|
|
3328 |
break
|
|
|
3329 |
if fid == 0:
|
|
|
3330 |
if ftype == TType.LIST:
|
|
|
3331 |
self.success = []
|
| 6736 |
amit.gupta |
3332 |
(_etype56, _size53) = iprot.readListBegin()
|
|
|
3333 |
for _i57 in xrange(_size53):
|
|
|
3334 |
_elem58 = Coupon()
|
|
|
3335 |
_elem58.read(iprot)
|
|
|
3336 |
self.success.append(_elem58)
|
| 6497 |
amit.gupta |
3337 |
iprot.readListEnd()
|
|
|
3338 |
else:
|
|
|
3339 |
iprot.skip(ftype)
|
|
|
3340 |
elif fid == 1:
|
|
|
3341 |
if ftype == TType.STRUCT:
|
|
|
3342 |
self.pex = PromotionException()
|
|
|
3343 |
self.pex.read(iprot)
|
|
|
3344 |
else:
|
|
|
3345 |
iprot.skip(ftype)
|
|
|
3346 |
else:
|
|
|
3347 |
iprot.skip(ftype)
|
|
|
3348 |
iprot.readFieldEnd()
|
|
|
3349 |
iprot.readStructEnd()
|
|
|
3350 |
|
|
|
3351 |
def write(self, oprot):
|
|
|
3352 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3353 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3354 |
return
|
|
|
3355 |
oprot.writeStructBegin('getActiveCoupons_result')
|
|
|
3356 |
if self.success is not None:
|
|
|
3357 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
3358 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 6736 |
amit.gupta |
3359 |
for iter59 in self.success:
|
|
|
3360 |
iter59.write(oprot)
|
| 6497 |
amit.gupta |
3361 |
oprot.writeListEnd()
|
|
|
3362 |
oprot.writeFieldEnd()
|
|
|
3363 |
if self.pex is not None:
|
|
|
3364 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3365 |
self.pex.write(oprot)
|
|
|
3366 |
oprot.writeFieldEnd()
|
|
|
3367 |
oprot.writeFieldStop()
|
|
|
3368 |
oprot.writeStructEnd()
|
|
|
3369 |
|
|
|
3370 |
def validate(self):
|
|
|
3371 |
return
|
|
|
3372 |
|
|
|
3373 |
|
|
|
3374 |
def __repr__(self):
|
|
|
3375 |
L = ['%s=%r' % (key, value)
|
|
|
3376 |
for key, value in self.__dict__.iteritems()]
|
|
|
3377 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3378 |
|
|
|
3379 |
def __eq__(self, other):
|
|
|
3380 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3381 |
|
|
|
3382 |
def __ne__(self, other):
|
|
|
3383 |
return not (self == other)
|
|
|
3384 |
|
| 6250 |
amit.gupta |
3385 |
class createCoupon_args:
|
|
|
3386 |
"""
|
|
|
3387 |
Attributes:
|
|
|
3388 |
- promotionId
|
| 6730 |
anupam.sin |
3389 |
- couponCode
|
| 6679 |
anupam.sin |
3390 |
- arguments
|
| 6356 |
amit.gupta |
3391 |
- isCod
|
| 6561 |
amit.gupta |
3392 |
- prefix
|
| 6250 |
amit.gupta |
3393 |
"""
|
|
|
3394 |
|
|
|
3395 |
thrift_spec = (
|
|
|
3396 |
None, # 0
|
|
|
3397 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
| 6730 |
anupam.sin |
3398 |
(2, TType.STRING, 'couponCode', None, None, ), # 2
|
|
|
3399 |
(3, TType.STRING, 'arguments', None, None, ), # 3
|
|
|
3400 |
(4, TType.BOOL, 'isCod', None, None, ), # 4
|
|
|
3401 |
(5, TType.STRING, 'prefix', None, None, ), # 5
|
| 6250 |
amit.gupta |
3402 |
)
|
|
|
3403 |
|
| 6730 |
anupam.sin |
3404 |
def __init__(self, promotionId=None, couponCode=None, arguments=None, isCod=None, prefix=None,):
|
| 6250 |
amit.gupta |
3405 |
self.promotionId = promotionId
|
| 6730 |
anupam.sin |
3406 |
self.couponCode = couponCode
|
| 6679 |
anupam.sin |
3407 |
self.arguments = arguments
|
| 6356 |
amit.gupta |
3408 |
self.isCod = isCod
|
| 6561 |
amit.gupta |
3409 |
self.prefix = prefix
|
| 6250 |
amit.gupta |
3410 |
|
|
|
3411 |
def read(self, iprot):
|
|
|
3412 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3413 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3414 |
return
|
|
|
3415 |
iprot.readStructBegin()
|
|
|
3416 |
while True:
|
|
|
3417 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3418 |
if ftype == TType.STOP:
|
|
|
3419 |
break
|
|
|
3420 |
if fid == 1:
|
|
|
3421 |
if ftype == TType.I64:
|
|
|
3422 |
self.promotionId = iprot.readI64();
|
|
|
3423 |
else:
|
|
|
3424 |
iprot.skip(ftype)
|
|
|
3425 |
elif fid == 2:
|
| 6679 |
anupam.sin |
3426 |
if ftype == TType.STRING:
|
| 6730 |
anupam.sin |
3427 |
self.couponCode = iprot.readString();
|
|
|
3428 |
else:
|
|
|
3429 |
iprot.skip(ftype)
|
|
|
3430 |
elif fid == 3:
|
|
|
3431 |
if ftype == TType.STRING:
|
| 6679 |
anupam.sin |
3432 |
self.arguments = iprot.readString();
|
| 6250 |
amit.gupta |
3433 |
else:
|
|
|
3434 |
iprot.skip(ftype)
|
| 6730 |
anupam.sin |
3435 |
elif fid == 4:
|
| 6356 |
amit.gupta |
3436 |
if ftype == TType.BOOL:
|
|
|
3437 |
self.isCod = iprot.readBool();
|
|
|
3438 |
else:
|
|
|
3439 |
iprot.skip(ftype)
|
| 6730 |
anupam.sin |
3440 |
elif fid == 5:
|
| 6561 |
amit.gupta |
3441 |
if ftype == TType.STRING:
|
|
|
3442 |
self.prefix = iprot.readString();
|
|
|
3443 |
else:
|
|
|
3444 |
iprot.skip(ftype)
|
| 6250 |
amit.gupta |
3445 |
else:
|
|
|
3446 |
iprot.skip(ftype)
|
|
|
3447 |
iprot.readFieldEnd()
|
|
|
3448 |
iprot.readStructEnd()
|
|
|
3449 |
|
|
|
3450 |
def write(self, oprot):
|
|
|
3451 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3452 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3453 |
return
|
|
|
3454 |
oprot.writeStructBegin('createCoupon_args')
|
|
|
3455 |
if self.promotionId is not None:
|
|
|
3456 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
3457 |
oprot.writeI64(self.promotionId)
|
|
|
3458 |
oprot.writeFieldEnd()
|
| 6730 |
anupam.sin |
3459 |
if self.couponCode is not None:
|
|
|
3460 |
oprot.writeFieldBegin('couponCode', TType.STRING, 2)
|
|
|
3461 |
oprot.writeString(self.couponCode)
|
|
|
3462 |
oprot.writeFieldEnd()
|
| 6679 |
anupam.sin |
3463 |
if self.arguments is not None:
|
| 6730 |
anupam.sin |
3464 |
oprot.writeFieldBegin('arguments', TType.STRING, 3)
|
| 6679 |
anupam.sin |
3465 |
oprot.writeString(self.arguments)
|
| 6250 |
amit.gupta |
3466 |
oprot.writeFieldEnd()
|
| 6356 |
amit.gupta |
3467 |
if self.isCod is not None:
|
| 6730 |
anupam.sin |
3468 |
oprot.writeFieldBegin('isCod', TType.BOOL, 4)
|
| 6356 |
amit.gupta |
3469 |
oprot.writeBool(self.isCod)
|
|
|
3470 |
oprot.writeFieldEnd()
|
| 6561 |
amit.gupta |
3471 |
if self.prefix is not None:
|
| 6730 |
anupam.sin |
3472 |
oprot.writeFieldBegin('prefix', TType.STRING, 5)
|
| 6561 |
amit.gupta |
3473 |
oprot.writeString(self.prefix)
|
|
|
3474 |
oprot.writeFieldEnd()
|
| 6250 |
amit.gupta |
3475 |
oprot.writeFieldStop()
|
|
|
3476 |
oprot.writeStructEnd()
|
|
|
3477 |
|
|
|
3478 |
def validate(self):
|
|
|
3479 |
return
|
|
|
3480 |
|
|
|
3481 |
|
|
|
3482 |
def __repr__(self):
|
|
|
3483 |
L = ['%s=%r' % (key, value)
|
|
|
3484 |
for key, value in self.__dict__.iteritems()]
|
|
|
3485 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3486 |
|
|
|
3487 |
def __eq__(self, other):
|
|
|
3488 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3489 |
|
|
|
3490 |
def __ne__(self, other):
|
|
|
3491 |
return not (self == other)
|
|
|
3492 |
|
|
|
3493 |
class createCoupon_result:
|
|
|
3494 |
"""
|
|
|
3495 |
Attributes:
|
|
|
3496 |
- success
|
|
|
3497 |
- pex
|
|
|
3498 |
"""
|
|
|
3499 |
|
|
|
3500 |
thrift_spec = (
|
|
|
3501 |
(0, TType.STRING, 'success', None, None, ), # 0
|
|
|
3502 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3503 |
)
|
|
|
3504 |
|
|
|
3505 |
def __init__(self, success=None, pex=None,):
|
|
|
3506 |
self.success = success
|
|
|
3507 |
self.pex = pex
|
|
|
3508 |
|
|
|
3509 |
def read(self, iprot):
|
|
|
3510 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3511 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3512 |
return
|
|
|
3513 |
iprot.readStructBegin()
|
|
|
3514 |
while True:
|
|
|
3515 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3516 |
if ftype == TType.STOP:
|
|
|
3517 |
break
|
|
|
3518 |
if fid == 0:
|
|
|
3519 |
if ftype == TType.STRING:
|
|
|
3520 |
self.success = iprot.readString();
|
|
|
3521 |
else:
|
|
|
3522 |
iprot.skip(ftype)
|
|
|
3523 |
elif fid == 1:
|
|
|
3524 |
if ftype == TType.STRUCT:
|
|
|
3525 |
self.pex = PromotionException()
|
|
|
3526 |
self.pex.read(iprot)
|
|
|
3527 |
else:
|
|
|
3528 |
iprot.skip(ftype)
|
|
|
3529 |
else:
|
|
|
3530 |
iprot.skip(ftype)
|
|
|
3531 |
iprot.readFieldEnd()
|
|
|
3532 |
iprot.readStructEnd()
|
|
|
3533 |
|
|
|
3534 |
def write(self, oprot):
|
|
|
3535 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3536 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3537 |
return
|
|
|
3538 |
oprot.writeStructBegin('createCoupon_result')
|
|
|
3539 |
if self.success is not None:
|
|
|
3540 |
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
|
3541 |
oprot.writeString(self.success)
|
|
|
3542 |
oprot.writeFieldEnd()
|
|
|
3543 |
if self.pex is not None:
|
|
|
3544 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3545 |
self.pex.write(oprot)
|
|
|
3546 |
oprot.writeFieldEnd()
|
|
|
3547 |
oprot.writeFieldStop()
|
|
|
3548 |
oprot.writeStructEnd()
|
|
|
3549 |
|
|
|
3550 |
def validate(self):
|
|
|
3551 |
return
|
|
|
3552 |
|
|
|
3553 |
|
|
|
3554 |
def __repr__(self):
|
|
|
3555 |
L = ['%s=%r' % (key, value)
|
|
|
3556 |
for key, value in self.__dict__.iteritems()]
|
|
|
3557 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3558 |
|
|
|
3559 |
def __eq__(self, other):
|
|
|
3560 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3561 |
|
|
|
3562 |
def __ne__(self, other):
|
|
|
3563 |
return not (self == other)
|
|
|
3564 |
|
| 3385 |
varun.gupt |
3565 |
class getSuccessfulPaymentCountForCoupon_args:
|
|
|
3566 |
"""
|
|
|
3567 |
Attributes:
|
|
|
3568 |
- couponCode
|
|
|
3569 |
"""
|
|
|
3570 |
|
|
|
3571 |
thrift_spec = (
|
|
|
3572 |
None, # 0
|
|
|
3573 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
3574 |
)
|
|
|
3575 |
|
|
|
3576 |
def __init__(self, couponCode=None,):
|
|
|
3577 |
self.couponCode = couponCode
|
|
|
3578 |
|
|
|
3579 |
def read(self, iprot):
|
|
|
3580 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3581 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3582 |
return
|
|
|
3583 |
iprot.readStructBegin()
|
|
|
3584 |
while True:
|
|
|
3585 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3586 |
if ftype == TType.STOP:
|
|
|
3587 |
break
|
|
|
3588 |
if fid == 1:
|
|
|
3589 |
if ftype == TType.STRING:
|
|
|
3590 |
self.couponCode = iprot.readString();
|
|
|
3591 |
else:
|
|
|
3592 |
iprot.skip(ftype)
|
|
|
3593 |
else:
|
|
|
3594 |
iprot.skip(ftype)
|
|
|
3595 |
iprot.readFieldEnd()
|
|
|
3596 |
iprot.readStructEnd()
|
|
|
3597 |
|
|
|
3598 |
def write(self, oprot):
|
|
|
3599 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3600 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3601 |
return
|
|
|
3602 |
oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_args')
|
| 3431 |
rajveer |
3603 |
if self.couponCode is not None:
|
| 3385 |
varun.gupt |
3604 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
3605 |
oprot.writeString(self.couponCode)
|
|
|
3606 |
oprot.writeFieldEnd()
|
|
|
3607 |
oprot.writeFieldStop()
|
|
|
3608 |
oprot.writeStructEnd()
|
|
|
3609 |
|
| 3431 |
rajveer |
3610 |
def validate(self):
|
|
|
3611 |
return
|
|
|
3612 |
|
|
|
3613 |
|
| 3385 |
varun.gupt |
3614 |
def __repr__(self):
|
|
|
3615 |
L = ['%s=%r' % (key, value)
|
|
|
3616 |
for key, value in self.__dict__.iteritems()]
|
|
|
3617 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3618 |
|
|
|
3619 |
def __eq__(self, other):
|
|
|
3620 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3621 |
|
|
|
3622 |
def __ne__(self, other):
|
|
|
3623 |
return not (self == other)
|
|
|
3624 |
|
|
|
3625 |
class getSuccessfulPaymentCountForCoupon_result:
|
|
|
3626 |
"""
|
|
|
3627 |
Attributes:
|
|
|
3628 |
- success
|
|
|
3629 |
- pex
|
|
|
3630 |
"""
|
|
|
3631 |
|
|
|
3632 |
thrift_spec = (
|
|
|
3633 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
3634 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3635 |
)
|
|
|
3636 |
|
|
|
3637 |
def __init__(self, success=None, pex=None,):
|
|
|
3638 |
self.success = success
|
|
|
3639 |
self.pex = pex
|
|
|
3640 |
|
|
|
3641 |
def read(self, iprot):
|
|
|
3642 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3643 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3644 |
return
|
|
|
3645 |
iprot.readStructBegin()
|
|
|
3646 |
while True:
|
|
|
3647 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3648 |
if ftype == TType.STOP:
|
|
|
3649 |
break
|
|
|
3650 |
if fid == 0:
|
|
|
3651 |
if ftype == TType.I64:
|
|
|
3652 |
self.success = iprot.readI64();
|
|
|
3653 |
else:
|
|
|
3654 |
iprot.skip(ftype)
|
|
|
3655 |
elif fid == 1:
|
|
|
3656 |
if ftype == TType.STRUCT:
|
|
|
3657 |
self.pex = PromotionException()
|
|
|
3658 |
self.pex.read(iprot)
|
|
|
3659 |
else:
|
|
|
3660 |
iprot.skip(ftype)
|
|
|
3661 |
else:
|
|
|
3662 |
iprot.skip(ftype)
|
|
|
3663 |
iprot.readFieldEnd()
|
|
|
3664 |
iprot.readStructEnd()
|
|
|
3665 |
|
|
|
3666 |
def write(self, oprot):
|
|
|
3667 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3668 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3669 |
return
|
|
|
3670 |
oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_result')
|
| 3431 |
rajveer |
3671 |
if self.success is not None:
|
| 3385 |
varun.gupt |
3672 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
3673 |
oprot.writeI64(self.success)
|
|
|
3674 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
3675 |
if self.pex is not None:
|
| 3385 |
varun.gupt |
3676 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3677 |
self.pex.write(oprot)
|
|
|
3678 |
oprot.writeFieldEnd()
|
|
|
3679 |
oprot.writeFieldStop()
|
|
|
3680 |
oprot.writeStructEnd()
|
|
|
3681 |
|
| 3431 |
rajveer |
3682 |
def validate(self):
|
|
|
3683 |
return
|
|
|
3684 |
|
|
|
3685 |
|
| 3385 |
varun.gupt |
3686 |
def __repr__(self):
|
|
|
3687 |
L = ['%s=%r' % (key, value)
|
|
|
3688 |
for key, value in self.__dict__.iteritems()]
|
|
|
3689 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3690 |
|
|
|
3691 |
def __eq__(self, other):
|
|
|
3692 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3693 |
|
|
|
3694 |
def __ne__(self, other):
|
|
|
3695 |
return not (self == other)
|
|
|
3696 |
|
|
|
3697 |
class getRuleDocString_args:
|
|
|
3698 |
"""
|
|
|
3699 |
Attributes:
|
|
|
3700 |
- ruleName
|
|
|
3701 |
"""
|
|
|
3702 |
|
|
|
3703 |
thrift_spec = (
|
|
|
3704 |
None, # 0
|
|
|
3705 |
(1, TType.STRING, 'ruleName', None, None, ), # 1
|
|
|
3706 |
)
|
|
|
3707 |
|
|
|
3708 |
def __init__(self, ruleName=None,):
|
|
|
3709 |
self.ruleName = ruleName
|
|
|
3710 |
|
|
|
3711 |
def read(self, iprot):
|
|
|
3712 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3713 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3714 |
return
|
|
|
3715 |
iprot.readStructBegin()
|
|
|
3716 |
while True:
|
|
|
3717 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3718 |
if ftype == TType.STOP:
|
|
|
3719 |
break
|
|
|
3720 |
if fid == 1:
|
|
|
3721 |
if ftype == TType.STRING:
|
|
|
3722 |
self.ruleName = iprot.readString();
|
|
|
3723 |
else:
|
|
|
3724 |
iprot.skip(ftype)
|
|
|
3725 |
else:
|
|
|
3726 |
iprot.skip(ftype)
|
|
|
3727 |
iprot.readFieldEnd()
|
|
|
3728 |
iprot.readStructEnd()
|
|
|
3729 |
|
|
|
3730 |
def write(self, oprot):
|
|
|
3731 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3732 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3733 |
return
|
|
|
3734 |
oprot.writeStructBegin('getRuleDocString_args')
|
| 3431 |
rajveer |
3735 |
if self.ruleName is not None:
|
| 3385 |
varun.gupt |
3736 |
oprot.writeFieldBegin('ruleName', TType.STRING, 1)
|
|
|
3737 |
oprot.writeString(self.ruleName)
|
|
|
3738 |
oprot.writeFieldEnd()
|
|
|
3739 |
oprot.writeFieldStop()
|
|
|
3740 |
oprot.writeStructEnd()
|
|
|
3741 |
|
| 3431 |
rajveer |
3742 |
def validate(self):
|
|
|
3743 |
return
|
|
|
3744 |
|
|
|
3745 |
|
| 3385 |
varun.gupt |
3746 |
def __repr__(self):
|
|
|
3747 |
L = ['%s=%r' % (key, value)
|
|
|
3748 |
for key, value in self.__dict__.iteritems()]
|
|
|
3749 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3750 |
|
|
|
3751 |
def __eq__(self, other):
|
|
|
3752 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3753 |
|
|
|
3754 |
def __ne__(self, other):
|
|
|
3755 |
return not (self == other)
|
|
|
3756 |
|
|
|
3757 |
class getRuleDocString_result:
|
|
|
3758 |
"""
|
|
|
3759 |
Attributes:
|
|
|
3760 |
- success
|
|
|
3761 |
"""
|
|
|
3762 |
|
|
|
3763 |
thrift_spec = (
|
|
|
3764 |
(0, TType.STRING, 'success', None, None, ), # 0
|
|
|
3765 |
)
|
|
|
3766 |
|
|
|
3767 |
def __init__(self, success=None,):
|
|
|
3768 |
self.success = success
|
|
|
3769 |
|
|
|
3770 |
def read(self, iprot):
|
|
|
3771 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3772 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3773 |
return
|
|
|
3774 |
iprot.readStructBegin()
|
|
|
3775 |
while True:
|
|
|
3776 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3777 |
if ftype == TType.STOP:
|
|
|
3778 |
break
|
|
|
3779 |
if fid == 0:
|
|
|
3780 |
if ftype == TType.STRING:
|
|
|
3781 |
self.success = iprot.readString();
|
|
|
3782 |
else:
|
|
|
3783 |
iprot.skip(ftype)
|
|
|
3784 |
else:
|
|
|
3785 |
iprot.skip(ftype)
|
|
|
3786 |
iprot.readFieldEnd()
|
|
|
3787 |
iprot.readStructEnd()
|
|
|
3788 |
|
|
|
3789 |
def write(self, oprot):
|
|
|
3790 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3791 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3792 |
return
|
|
|
3793 |
oprot.writeStructBegin('getRuleDocString_result')
|
| 3431 |
rajveer |
3794 |
if self.success is not None:
|
| 3385 |
varun.gupt |
3795 |
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
|
3796 |
oprot.writeString(self.success)
|
|
|
3797 |
oprot.writeFieldEnd()
|
|
|
3798 |
oprot.writeFieldStop()
|
|
|
3799 |
oprot.writeStructEnd()
|
|
|
3800 |
|
| 3431 |
rajveer |
3801 |
def validate(self):
|
|
|
3802 |
return
|
|
|
3803 |
|
|
|
3804 |
|
| 3385 |
varun.gupt |
3805 |
def __repr__(self):
|
|
|
3806 |
L = ['%s=%r' % (key, value)
|
|
|
3807 |
for key, value in self.__dict__.iteritems()]
|
|
|
3808 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3809 |
|
|
|
3810 |
def __eq__(self, other):
|
|
|
3811 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3812 |
|
|
|
3813 |
def __ne__(self, other):
|
|
|
3814 |
return not (self == other)
|
| 4189 |
varun.gupt |
3815 |
|
|
|
3816 |
class getItemDiscountMap_args:
|
|
|
3817 |
"""
|
|
|
3818 |
Attributes:
|
|
|
3819 |
- itemIds
|
|
|
3820 |
"""
|
|
|
3821 |
|
|
|
3822 |
thrift_spec = (
|
|
|
3823 |
None, # 0
|
|
|
3824 |
(1, TType.LIST, 'itemIds', (TType.I64,None), None, ), # 1
|
|
|
3825 |
)
|
|
|
3826 |
|
|
|
3827 |
def __init__(self, itemIds=None,):
|
|
|
3828 |
self.itemIds = itemIds
|
|
|
3829 |
|
|
|
3830 |
def read(self, iprot):
|
|
|
3831 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3832 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3833 |
return
|
|
|
3834 |
iprot.readStructBegin()
|
|
|
3835 |
while True:
|
|
|
3836 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3837 |
if ftype == TType.STOP:
|
|
|
3838 |
break
|
|
|
3839 |
if fid == 1:
|
|
|
3840 |
if ftype == TType.LIST:
|
|
|
3841 |
self.itemIds = []
|
| 6736 |
amit.gupta |
3842 |
(_etype63, _size60) = iprot.readListBegin()
|
|
|
3843 |
for _i64 in xrange(_size60):
|
|
|
3844 |
_elem65 = iprot.readI64();
|
|
|
3845 |
self.itemIds.append(_elem65)
|
| 4189 |
varun.gupt |
3846 |
iprot.readListEnd()
|
|
|
3847 |
else:
|
|
|
3848 |
iprot.skip(ftype)
|
|
|
3849 |
else:
|
|
|
3850 |
iprot.skip(ftype)
|
|
|
3851 |
iprot.readFieldEnd()
|
|
|
3852 |
iprot.readStructEnd()
|
|
|
3853 |
|
|
|
3854 |
def write(self, oprot):
|
|
|
3855 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3856 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3857 |
return
|
|
|
3858 |
oprot.writeStructBegin('getItemDiscountMap_args')
|
|
|
3859 |
if self.itemIds is not None:
|
|
|
3860 |
oprot.writeFieldBegin('itemIds', TType.LIST, 1)
|
|
|
3861 |
oprot.writeListBegin(TType.I64, len(self.itemIds))
|
| 6736 |
amit.gupta |
3862 |
for iter66 in self.itemIds:
|
|
|
3863 |
oprot.writeI64(iter66)
|
| 4189 |
varun.gupt |
3864 |
oprot.writeListEnd()
|
|
|
3865 |
oprot.writeFieldEnd()
|
|
|
3866 |
oprot.writeFieldStop()
|
|
|
3867 |
oprot.writeStructEnd()
|
|
|
3868 |
|
|
|
3869 |
def validate(self):
|
|
|
3870 |
return
|
|
|
3871 |
|
|
|
3872 |
|
|
|
3873 |
def __repr__(self):
|
|
|
3874 |
L = ['%s=%r' % (key, value)
|
|
|
3875 |
for key, value in self.__dict__.iteritems()]
|
|
|
3876 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3877 |
|
|
|
3878 |
def __eq__(self, other):
|
|
|
3879 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3880 |
|
|
|
3881 |
def __ne__(self, other):
|
|
|
3882 |
return not (self == other)
|
|
|
3883 |
|
|
|
3884 |
class getItemDiscountMap_result:
|
|
|
3885 |
"""
|
|
|
3886 |
Attributes:
|
|
|
3887 |
- success
|
|
|
3888 |
- pex
|
|
|
3889 |
"""
|
|
|
3890 |
|
|
|
3891 |
thrift_spec = (
|
|
|
3892 |
(0, TType.LIST, 'success', (TType.STRUCT,(ItemCouponDiscount, ItemCouponDiscount.thrift_spec)), None, ), # 0
|
|
|
3893 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
3894 |
)
|
|
|
3895 |
|
|
|
3896 |
def __init__(self, success=None, pex=None,):
|
|
|
3897 |
self.success = success
|
|
|
3898 |
self.pex = pex
|
|
|
3899 |
|
|
|
3900 |
def read(self, iprot):
|
|
|
3901 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3902 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3903 |
return
|
|
|
3904 |
iprot.readStructBegin()
|
|
|
3905 |
while True:
|
|
|
3906 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3907 |
if ftype == TType.STOP:
|
|
|
3908 |
break
|
|
|
3909 |
if fid == 0:
|
|
|
3910 |
if ftype == TType.LIST:
|
|
|
3911 |
self.success = []
|
| 6736 |
amit.gupta |
3912 |
(_etype70, _size67) = iprot.readListBegin()
|
|
|
3913 |
for _i71 in xrange(_size67):
|
|
|
3914 |
_elem72 = ItemCouponDiscount()
|
|
|
3915 |
_elem72.read(iprot)
|
|
|
3916 |
self.success.append(_elem72)
|
| 4189 |
varun.gupt |
3917 |
iprot.readListEnd()
|
|
|
3918 |
else:
|
|
|
3919 |
iprot.skip(ftype)
|
|
|
3920 |
elif fid == 1:
|
|
|
3921 |
if ftype == TType.STRUCT:
|
|
|
3922 |
self.pex = PromotionException()
|
|
|
3923 |
self.pex.read(iprot)
|
|
|
3924 |
else:
|
|
|
3925 |
iprot.skip(ftype)
|
|
|
3926 |
else:
|
|
|
3927 |
iprot.skip(ftype)
|
|
|
3928 |
iprot.readFieldEnd()
|
|
|
3929 |
iprot.readStructEnd()
|
|
|
3930 |
|
|
|
3931 |
def write(self, oprot):
|
|
|
3932 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3933 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
3934 |
return
|
|
|
3935 |
oprot.writeStructBegin('getItemDiscountMap_result')
|
|
|
3936 |
if self.success is not None:
|
|
|
3937 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
3938 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 6736 |
amit.gupta |
3939 |
for iter73 in self.success:
|
|
|
3940 |
iter73.write(oprot)
|
| 4189 |
varun.gupt |
3941 |
oprot.writeListEnd()
|
|
|
3942 |
oprot.writeFieldEnd()
|
|
|
3943 |
if self.pex is not None:
|
|
|
3944 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
3945 |
self.pex.write(oprot)
|
|
|
3946 |
oprot.writeFieldEnd()
|
|
|
3947 |
oprot.writeFieldStop()
|
|
|
3948 |
oprot.writeStructEnd()
|
|
|
3949 |
|
|
|
3950 |
def validate(self):
|
|
|
3951 |
return
|
|
|
3952 |
|
|
|
3953 |
|
|
|
3954 |
def __repr__(self):
|
|
|
3955 |
L = ['%s=%r' % (key, value)
|
|
|
3956 |
for key, value in self.__dict__.iteritems()]
|
|
|
3957 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
3958 |
|
|
|
3959 |
def __eq__(self, other):
|
|
|
3960 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
3961 |
|
|
|
3962 |
def __ne__(self, other):
|
|
|
3963 |
return not (self == other)
|
| 4494 |
varun.gupt |
3964 |
|
|
|
3965 |
class getDiscountsForEntity_args:
|
|
|
3966 |
"""
|
|
|
3967 |
Attributes:
|
|
|
3968 |
- entityId
|
|
|
3969 |
"""
|
|
|
3970 |
|
|
|
3971 |
thrift_spec = (
|
|
|
3972 |
None, # 0
|
|
|
3973 |
(1, TType.I64, 'entityId', None, None, ), # 1
|
|
|
3974 |
)
|
|
|
3975 |
|
|
|
3976 |
def __init__(self, entityId=None,):
|
|
|
3977 |
self.entityId = entityId
|
|
|
3978 |
|
|
|
3979 |
def read(self, iprot):
|
|
|
3980 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
3981 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
3982 |
return
|
|
|
3983 |
iprot.readStructBegin()
|
|
|
3984 |
while True:
|
|
|
3985 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
3986 |
if ftype == TType.STOP:
|
|
|
3987 |
break
|
|
|
3988 |
if fid == 1:
|
|
|
3989 |
if ftype == TType.I64:
|
|
|
3990 |
self.entityId = iprot.readI64();
|
|
|
3991 |
else:
|
|
|
3992 |
iprot.skip(ftype)
|
|
|
3993 |
else:
|
|
|
3994 |
iprot.skip(ftype)
|
|
|
3995 |
iprot.readFieldEnd()
|
|
|
3996 |
iprot.readStructEnd()
|
|
|
3997 |
|
|
|
3998 |
def write(self, oprot):
|
|
|
3999 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4000 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4001 |
return
|
|
|
4002 |
oprot.writeStructBegin('getDiscountsForEntity_args')
|
|
|
4003 |
if self.entityId is not None:
|
|
|
4004 |
oprot.writeFieldBegin('entityId', TType.I64, 1)
|
|
|
4005 |
oprot.writeI64(self.entityId)
|
|
|
4006 |
oprot.writeFieldEnd()
|
|
|
4007 |
oprot.writeFieldStop()
|
|
|
4008 |
oprot.writeStructEnd()
|
|
|
4009 |
|
|
|
4010 |
def validate(self):
|
|
|
4011 |
return
|
|
|
4012 |
|
|
|
4013 |
|
|
|
4014 |
def __repr__(self):
|
|
|
4015 |
L = ['%s=%r' % (key, value)
|
|
|
4016 |
for key, value in self.__dict__.iteritems()]
|
|
|
4017 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4018 |
|
|
|
4019 |
def __eq__(self, other):
|
|
|
4020 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4021 |
|
|
|
4022 |
def __ne__(self, other):
|
|
|
4023 |
return not (self == other)
|
|
|
4024 |
|
|
|
4025 |
class getDiscountsForEntity_result:
|
|
|
4026 |
"""
|
|
|
4027 |
Attributes:
|
|
|
4028 |
- success
|
|
|
4029 |
"""
|
|
|
4030 |
|
|
|
4031 |
thrift_spec = (
|
|
|
4032 |
(0, TType.MAP, 'success', (TType.STRING,None,TType.DOUBLE,None), None, ), # 0
|
|
|
4033 |
)
|
|
|
4034 |
|
|
|
4035 |
def __init__(self, success=None,):
|
|
|
4036 |
self.success = success
|
|
|
4037 |
|
|
|
4038 |
def read(self, iprot):
|
|
|
4039 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4040 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4041 |
return
|
|
|
4042 |
iprot.readStructBegin()
|
|
|
4043 |
while True:
|
|
|
4044 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4045 |
if ftype == TType.STOP:
|
|
|
4046 |
break
|
|
|
4047 |
if fid == 0:
|
|
|
4048 |
if ftype == TType.MAP:
|
|
|
4049 |
self.success = {}
|
| 6736 |
amit.gupta |
4050 |
(_ktype75, _vtype76, _size74 ) = iprot.readMapBegin()
|
|
|
4051 |
for _i78 in xrange(_size74):
|
|
|
4052 |
_key79 = iprot.readString();
|
|
|
4053 |
_val80 = iprot.readDouble();
|
|
|
4054 |
self.success[_key79] = _val80
|
| 4494 |
varun.gupt |
4055 |
iprot.readMapEnd()
|
|
|
4056 |
else:
|
|
|
4057 |
iprot.skip(ftype)
|
|
|
4058 |
else:
|
|
|
4059 |
iprot.skip(ftype)
|
|
|
4060 |
iprot.readFieldEnd()
|
|
|
4061 |
iprot.readStructEnd()
|
|
|
4062 |
|
|
|
4063 |
def write(self, oprot):
|
|
|
4064 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4065 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4066 |
return
|
|
|
4067 |
oprot.writeStructBegin('getDiscountsForEntity_result')
|
|
|
4068 |
if self.success is not None:
|
|
|
4069 |
oprot.writeFieldBegin('success', TType.MAP, 0)
|
|
|
4070 |
oprot.writeMapBegin(TType.STRING, TType.DOUBLE, len(self.success))
|
| 6736 |
amit.gupta |
4071 |
for kiter81,viter82 in self.success.items():
|
|
|
4072 |
oprot.writeString(kiter81)
|
|
|
4073 |
oprot.writeDouble(viter82)
|
| 4494 |
varun.gupt |
4074 |
oprot.writeMapEnd()
|
|
|
4075 |
oprot.writeFieldEnd()
|
|
|
4076 |
oprot.writeFieldStop()
|
|
|
4077 |
oprot.writeStructEnd()
|
|
|
4078 |
|
|
|
4079 |
def validate(self):
|
|
|
4080 |
return
|
|
|
4081 |
|
|
|
4082 |
|
|
|
4083 |
def __repr__(self):
|
|
|
4084 |
L = ['%s=%r' % (key, value)
|
|
|
4085 |
for key, value in self.__dict__.iteritems()]
|
|
|
4086 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4087 |
|
|
|
4088 |
def __eq__(self, other):
|
|
|
4089 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4090 |
|
|
|
4091 |
def __ne__(self, other):
|
|
|
4092 |
return not (self == other)
|
| 5469 |
rajveer |
4093 |
|
|
|
4094 |
class addVoucher_args:
|
|
|
4095 |
"""
|
|
|
4096 |
Attributes:
|
|
|
4097 |
- voucher
|
|
|
4098 |
"""
|
|
|
4099 |
|
|
|
4100 |
thrift_spec = (
|
|
|
4101 |
None, # 0
|
|
|
4102 |
(1, TType.STRUCT, 'voucher', (Voucher, Voucher.thrift_spec), None, ), # 1
|
|
|
4103 |
)
|
|
|
4104 |
|
|
|
4105 |
def __init__(self, voucher=None,):
|
|
|
4106 |
self.voucher = voucher
|
|
|
4107 |
|
|
|
4108 |
def read(self, iprot):
|
|
|
4109 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4110 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4111 |
return
|
|
|
4112 |
iprot.readStructBegin()
|
|
|
4113 |
while True:
|
|
|
4114 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4115 |
if ftype == TType.STOP:
|
|
|
4116 |
break
|
|
|
4117 |
if fid == 1:
|
|
|
4118 |
if ftype == TType.STRUCT:
|
|
|
4119 |
self.voucher = Voucher()
|
|
|
4120 |
self.voucher.read(iprot)
|
|
|
4121 |
else:
|
|
|
4122 |
iprot.skip(ftype)
|
|
|
4123 |
else:
|
|
|
4124 |
iprot.skip(ftype)
|
|
|
4125 |
iprot.readFieldEnd()
|
|
|
4126 |
iprot.readStructEnd()
|
|
|
4127 |
|
|
|
4128 |
def write(self, oprot):
|
|
|
4129 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4130 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4131 |
return
|
|
|
4132 |
oprot.writeStructBegin('addVoucher_args')
|
|
|
4133 |
if self.voucher is not None:
|
|
|
4134 |
oprot.writeFieldBegin('voucher', TType.STRUCT, 1)
|
|
|
4135 |
self.voucher.write(oprot)
|
|
|
4136 |
oprot.writeFieldEnd()
|
|
|
4137 |
oprot.writeFieldStop()
|
|
|
4138 |
oprot.writeStructEnd()
|
|
|
4139 |
|
|
|
4140 |
def validate(self):
|
|
|
4141 |
return
|
|
|
4142 |
|
|
|
4143 |
|
|
|
4144 |
def __repr__(self):
|
|
|
4145 |
L = ['%s=%r' % (key, value)
|
|
|
4146 |
for key, value in self.__dict__.iteritems()]
|
|
|
4147 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4148 |
|
|
|
4149 |
def __eq__(self, other):
|
|
|
4150 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4151 |
|
|
|
4152 |
def __ne__(self, other):
|
|
|
4153 |
return not (self == other)
|
|
|
4154 |
|
|
|
4155 |
class addVoucher_result:
|
|
|
4156 |
|
|
|
4157 |
thrift_spec = (
|
|
|
4158 |
)
|
|
|
4159 |
|
|
|
4160 |
def read(self, iprot):
|
|
|
4161 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4162 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4163 |
return
|
|
|
4164 |
iprot.readStructBegin()
|
|
|
4165 |
while True:
|
|
|
4166 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4167 |
if ftype == TType.STOP:
|
|
|
4168 |
break
|
|
|
4169 |
else:
|
|
|
4170 |
iprot.skip(ftype)
|
|
|
4171 |
iprot.readFieldEnd()
|
|
|
4172 |
iprot.readStructEnd()
|
|
|
4173 |
|
|
|
4174 |
def write(self, oprot):
|
|
|
4175 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4176 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4177 |
return
|
|
|
4178 |
oprot.writeStructBegin('addVoucher_result')
|
|
|
4179 |
oprot.writeFieldStop()
|
|
|
4180 |
oprot.writeStructEnd()
|
|
|
4181 |
|
|
|
4182 |
def validate(self):
|
|
|
4183 |
return
|
|
|
4184 |
|
|
|
4185 |
|
|
|
4186 |
def __repr__(self):
|
|
|
4187 |
L = ['%s=%r' % (key, value)
|
|
|
4188 |
for key, value in self.__dict__.iteritems()]
|
|
|
4189 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4190 |
|
|
|
4191 |
def __eq__(self, other):
|
|
|
4192 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4193 |
|
|
|
4194 |
def __ne__(self, other):
|
|
|
4195 |
return not (self == other)
|
|
|
4196 |
|
|
|
4197 |
class assignVoucher_args:
|
|
|
4198 |
"""
|
|
|
4199 |
Attributes:
|
|
|
4200 |
- userId
|
|
|
4201 |
- userEmail
|
|
|
4202 |
- voucherType
|
|
|
4203 |
- amount
|
|
|
4204 |
"""
|
|
|
4205 |
|
|
|
4206 |
thrift_spec = (
|
|
|
4207 |
None, # 0
|
|
|
4208 |
(1, TType.I64, 'userId', None, None, ), # 1
|
|
|
4209 |
(2, TType.STRING, 'userEmail', None, None, ), # 2
|
|
|
4210 |
(3, TType.I32, 'voucherType', None, None, ), # 3
|
|
|
4211 |
(4, TType.I64, 'amount', None, None, ), # 4
|
|
|
4212 |
)
|
|
|
4213 |
|
|
|
4214 |
def __init__(self, userId=None, userEmail=None, voucherType=None, amount=None,):
|
|
|
4215 |
self.userId = userId
|
|
|
4216 |
self.userEmail = userEmail
|
|
|
4217 |
self.voucherType = voucherType
|
|
|
4218 |
self.amount = amount
|
|
|
4219 |
|
|
|
4220 |
def read(self, iprot):
|
|
|
4221 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4222 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4223 |
return
|
|
|
4224 |
iprot.readStructBegin()
|
|
|
4225 |
while True:
|
|
|
4226 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4227 |
if ftype == TType.STOP:
|
|
|
4228 |
break
|
|
|
4229 |
if fid == 1:
|
|
|
4230 |
if ftype == TType.I64:
|
|
|
4231 |
self.userId = iprot.readI64();
|
|
|
4232 |
else:
|
|
|
4233 |
iprot.skip(ftype)
|
|
|
4234 |
elif fid == 2:
|
|
|
4235 |
if ftype == TType.STRING:
|
|
|
4236 |
self.userEmail = iprot.readString();
|
|
|
4237 |
else:
|
|
|
4238 |
iprot.skip(ftype)
|
|
|
4239 |
elif fid == 3:
|
|
|
4240 |
if ftype == TType.I32:
|
|
|
4241 |
self.voucherType = iprot.readI32();
|
|
|
4242 |
else:
|
|
|
4243 |
iprot.skip(ftype)
|
|
|
4244 |
elif fid == 4:
|
|
|
4245 |
if ftype == TType.I64:
|
|
|
4246 |
self.amount = iprot.readI64();
|
|
|
4247 |
else:
|
|
|
4248 |
iprot.skip(ftype)
|
|
|
4249 |
else:
|
|
|
4250 |
iprot.skip(ftype)
|
|
|
4251 |
iprot.readFieldEnd()
|
|
|
4252 |
iprot.readStructEnd()
|
|
|
4253 |
|
|
|
4254 |
def write(self, oprot):
|
|
|
4255 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4256 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4257 |
return
|
|
|
4258 |
oprot.writeStructBegin('assignVoucher_args')
|
|
|
4259 |
if self.userId is not None:
|
|
|
4260 |
oprot.writeFieldBegin('userId', TType.I64, 1)
|
|
|
4261 |
oprot.writeI64(self.userId)
|
|
|
4262 |
oprot.writeFieldEnd()
|
|
|
4263 |
if self.userEmail is not None:
|
|
|
4264 |
oprot.writeFieldBegin('userEmail', TType.STRING, 2)
|
|
|
4265 |
oprot.writeString(self.userEmail)
|
|
|
4266 |
oprot.writeFieldEnd()
|
|
|
4267 |
if self.voucherType is not None:
|
|
|
4268 |
oprot.writeFieldBegin('voucherType', TType.I32, 3)
|
|
|
4269 |
oprot.writeI32(self.voucherType)
|
|
|
4270 |
oprot.writeFieldEnd()
|
|
|
4271 |
if self.amount is not None:
|
|
|
4272 |
oprot.writeFieldBegin('amount', TType.I64, 4)
|
|
|
4273 |
oprot.writeI64(self.amount)
|
|
|
4274 |
oprot.writeFieldEnd()
|
|
|
4275 |
oprot.writeFieldStop()
|
|
|
4276 |
oprot.writeStructEnd()
|
|
|
4277 |
|
|
|
4278 |
def validate(self):
|
|
|
4279 |
return
|
|
|
4280 |
|
|
|
4281 |
|
|
|
4282 |
def __repr__(self):
|
|
|
4283 |
L = ['%s=%r' % (key, value)
|
|
|
4284 |
for key, value in self.__dict__.iteritems()]
|
|
|
4285 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4286 |
|
|
|
4287 |
def __eq__(self, other):
|
|
|
4288 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4289 |
|
|
|
4290 |
def __ne__(self, other):
|
|
|
4291 |
return not (self == other)
|
|
|
4292 |
|
|
|
4293 |
class assignVoucher_result:
|
|
|
4294 |
"""
|
|
|
4295 |
Attributes:
|
|
|
4296 |
- success
|
|
|
4297 |
"""
|
|
|
4298 |
|
|
|
4299 |
thrift_spec = (
|
|
|
4300 |
(0, TType.STRUCT, 'success', (Voucher, Voucher.thrift_spec), None, ), # 0
|
|
|
4301 |
)
|
|
|
4302 |
|
|
|
4303 |
def __init__(self, success=None,):
|
|
|
4304 |
self.success = success
|
|
|
4305 |
|
|
|
4306 |
def read(self, iprot):
|
|
|
4307 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4308 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4309 |
return
|
|
|
4310 |
iprot.readStructBegin()
|
|
|
4311 |
while True:
|
|
|
4312 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4313 |
if ftype == TType.STOP:
|
|
|
4314 |
break
|
|
|
4315 |
if fid == 0:
|
|
|
4316 |
if ftype == TType.STRUCT:
|
|
|
4317 |
self.success = Voucher()
|
|
|
4318 |
self.success.read(iprot)
|
|
|
4319 |
else:
|
|
|
4320 |
iprot.skip(ftype)
|
|
|
4321 |
else:
|
|
|
4322 |
iprot.skip(ftype)
|
|
|
4323 |
iprot.readFieldEnd()
|
|
|
4324 |
iprot.readStructEnd()
|
|
|
4325 |
|
|
|
4326 |
def write(self, oprot):
|
|
|
4327 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4328 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4329 |
return
|
|
|
4330 |
oprot.writeStructBegin('assignVoucher_result')
|
|
|
4331 |
if self.success is not None:
|
|
|
4332 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
4333 |
self.success.write(oprot)
|
|
|
4334 |
oprot.writeFieldEnd()
|
|
|
4335 |
oprot.writeFieldStop()
|
|
|
4336 |
oprot.writeStructEnd()
|
|
|
4337 |
|
|
|
4338 |
def validate(self):
|
|
|
4339 |
return
|
|
|
4340 |
|
|
|
4341 |
|
|
|
4342 |
def __repr__(self):
|
|
|
4343 |
L = ['%s=%r' % (key, value)
|
|
|
4344 |
for key, value in self.__dict__.iteritems()]
|
|
|
4345 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4346 |
|
|
|
4347 |
def __eq__(self, other):
|
|
|
4348 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4349 |
|
|
|
4350 |
def __ne__(self, other):
|
|
|
4351 |
return not (self == other)
|
|
|
4352 |
|
|
|
4353 |
class markVoucherAsRedeemed_args:
|
|
|
4354 |
"""
|
|
|
4355 |
Attributes:
|
|
|
4356 |
- voucherCode
|
|
|
4357 |
- redeemedOn
|
|
|
4358 |
"""
|
|
|
4359 |
|
|
|
4360 |
thrift_spec = (
|
|
|
4361 |
None, # 0
|
|
|
4362 |
(1, TType.STRING, 'voucherCode', None, None, ), # 1
|
|
|
4363 |
(2, TType.I64, 'redeemedOn', None, None, ), # 2
|
|
|
4364 |
)
|
|
|
4365 |
|
|
|
4366 |
def __init__(self, voucherCode=None, redeemedOn=None,):
|
|
|
4367 |
self.voucherCode = voucherCode
|
|
|
4368 |
self.redeemedOn = redeemedOn
|
|
|
4369 |
|
|
|
4370 |
def read(self, iprot):
|
|
|
4371 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4372 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4373 |
return
|
|
|
4374 |
iprot.readStructBegin()
|
|
|
4375 |
while True:
|
|
|
4376 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4377 |
if ftype == TType.STOP:
|
|
|
4378 |
break
|
|
|
4379 |
if fid == 1:
|
|
|
4380 |
if ftype == TType.STRING:
|
|
|
4381 |
self.voucherCode = iprot.readString();
|
|
|
4382 |
else:
|
|
|
4383 |
iprot.skip(ftype)
|
|
|
4384 |
elif fid == 2:
|
|
|
4385 |
if ftype == TType.I64:
|
|
|
4386 |
self.redeemedOn = iprot.readI64();
|
|
|
4387 |
else:
|
|
|
4388 |
iprot.skip(ftype)
|
|
|
4389 |
else:
|
|
|
4390 |
iprot.skip(ftype)
|
|
|
4391 |
iprot.readFieldEnd()
|
|
|
4392 |
iprot.readStructEnd()
|
|
|
4393 |
|
|
|
4394 |
def write(self, oprot):
|
|
|
4395 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4396 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4397 |
return
|
|
|
4398 |
oprot.writeStructBegin('markVoucherAsRedeemed_args')
|
|
|
4399 |
if self.voucherCode is not None:
|
|
|
4400 |
oprot.writeFieldBegin('voucherCode', TType.STRING, 1)
|
|
|
4401 |
oprot.writeString(self.voucherCode)
|
|
|
4402 |
oprot.writeFieldEnd()
|
|
|
4403 |
if self.redeemedOn is not None:
|
|
|
4404 |
oprot.writeFieldBegin('redeemedOn', TType.I64, 2)
|
|
|
4405 |
oprot.writeI64(self.redeemedOn)
|
|
|
4406 |
oprot.writeFieldEnd()
|
|
|
4407 |
oprot.writeFieldStop()
|
|
|
4408 |
oprot.writeStructEnd()
|
|
|
4409 |
|
|
|
4410 |
def validate(self):
|
|
|
4411 |
return
|
|
|
4412 |
|
|
|
4413 |
|
|
|
4414 |
def __repr__(self):
|
|
|
4415 |
L = ['%s=%r' % (key, value)
|
|
|
4416 |
for key, value in self.__dict__.iteritems()]
|
|
|
4417 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4418 |
|
|
|
4419 |
def __eq__(self, other):
|
|
|
4420 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4421 |
|
|
|
4422 |
def __ne__(self, other):
|
|
|
4423 |
return not (self == other)
|
|
|
4424 |
|
|
|
4425 |
class markVoucherAsRedeemed_result:
|
|
|
4426 |
"""
|
|
|
4427 |
Attributes:
|
|
|
4428 |
- success
|
|
|
4429 |
"""
|
|
|
4430 |
|
|
|
4431 |
thrift_spec = (
|
|
|
4432 |
(0, TType.BOOL, 'success', None, None, ), # 0
|
|
|
4433 |
)
|
|
|
4434 |
|
|
|
4435 |
def __init__(self, success=None,):
|
|
|
4436 |
self.success = success
|
|
|
4437 |
|
|
|
4438 |
def read(self, iprot):
|
|
|
4439 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4440 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
4441 |
return
|
|
|
4442 |
iprot.readStructBegin()
|
|
|
4443 |
while True:
|
|
|
4444 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
4445 |
if ftype == TType.STOP:
|
|
|
4446 |
break
|
|
|
4447 |
if fid == 0:
|
|
|
4448 |
if ftype == TType.BOOL:
|
|
|
4449 |
self.success = iprot.readBool();
|
|
|
4450 |
else:
|
|
|
4451 |
iprot.skip(ftype)
|
|
|
4452 |
else:
|
|
|
4453 |
iprot.skip(ftype)
|
|
|
4454 |
iprot.readFieldEnd()
|
|
|
4455 |
iprot.readStructEnd()
|
|
|
4456 |
|
|
|
4457 |
def write(self, oprot):
|
|
|
4458 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
4459 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
4460 |
return
|
|
|
4461 |
oprot.writeStructBegin('markVoucherAsRedeemed_result')
|
|
|
4462 |
if self.success is not None:
|
|
|
4463 |
oprot.writeFieldBegin('success', TType.BOOL, 0)
|
|
|
4464 |
oprot.writeBool(self.success)
|
|
|
4465 |
oprot.writeFieldEnd()
|
|
|
4466 |
oprot.writeFieldStop()
|
|
|
4467 |
oprot.writeStructEnd()
|
|
|
4468 |
|
|
|
4469 |
def validate(self):
|
|
|
4470 |
return
|
|
|
4471 |
|
|
|
4472 |
|
|
|
4473 |
def __repr__(self):
|
|
|
4474 |
L = ['%s=%r' % (key, value)
|
|
|
4475 |
for key, value in self.__dict__.iteritems()]
|
|
|
4476 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
4477 |
|
|
|
4478 |
def __eq__(self, other):
|
|
|
4479 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
4480 |
|
|
|
4481 |
def __ne__(self, other):
|
|
|
4482 |
return not (self == other)
|