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