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