| 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 |
|
|
|
33 |
def getAllPromotions(self, ):
|
|
|
34 |
pass
|
|
|
35 |
|
|
|
36 |
def getPromotionById(self, promotionId):
|
|
|
37 |
"""
|
|
|
38 |
Parameters:
|
|
|
39 |
- promotionId
|
|
|
40 |
"""
|
|
|
41 |
pass
|
|
|
42 |
|
|
|
43 |
def generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
44 |
"""
|
|
|
45 |
Parameters:
|
|
|
46 |
- promotionId
|
|
|
47 |
- couponCode
|
|
|
48 |
"""
|
|
|
49 |
pass
|
|
|
50 |
|
|
|
51 |
def applyCoupon(self, couponCode, cartId):
|
|
|
52 |
"""
|
|
|
53 |
Parameters:
|
|
|
54 |
- couponCode
|
|
|
55 |
- cartId
|
|
|
56 |
"""
|
|
|
57 |
pass
|
|
|
58 |
|
|
|
59 |
def trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
60 |
"""
|
|
|
61 |
Parameters:
|
|
|
62 |
- couponCode
|
|
|
63 |
- transactionId
|
|
|
64 |
- userId
|
|
|
65 |
"""
|
|
|
66 |
pass
|
|
|
67 |
|
|
|
68 |
def getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
69 |
"""
|
|
|
70 |
Parameters:
|
|
|
71 |
- couponCode
|
|
|
72 |
- userId
|
|
|
73 |
"""
|
|
|
74 |
pass
|
|
|
75 |
|
| 3385 |
varun.gupt |
76 |
def getActiveCoupons(self, ):
|
|
|
77 |
"""
|
|
|
78 |
Returns a list of active coupons
|
|
|
79 |
"""
|
|
|
80 |
pass
|
| 1976 |
varun.gupt |
81 |
|
| 3385 |
varun.gupt |
82 |
def getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
83 |
"""
|
|
|
84 |
Returns the count of successful payments done using a given coupon
|
| 3431 |
rajveer |
85 |
|
| 3385 |
varun.gupt |
86 |
Parameters:
|
|
|
87 |
- couponCode
|
|
|
88 |
"""
|
|
|
89 |
pass
|
|
|
90 |
|
|
|
91 |
def getRuleDocString(self, ruleName):
|
|
|
92 |
"""
|
|
|
93 |
Returns the doc string of the rule module
|
| 3431 |
rajveer |
94 |
|
| 3385 |
varun.gupt |
95 |
Parameters:
|
|
|
96 |
- ruleName
|
|
|
97 |
"""
|
|
|
98 |
pass
|
|
|
99 |
|
|
|
100 |
|
| 3376 |
rajveer |
101 |
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
|
| 1976 |
varun.gupt |
102 |
"""
|
|
|
103 |
Promotion Service
|
|
|
104 |
"""
|
|
|
105 |
def __init__(self, iprot, oprot=None):
|
| 3376 |
rajveer |
106 |
shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
|
| 1976 |
varun.gupt |
107 |
|
|
|
108 |
def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
|
|
|
109 |
"""
|
|
|
110 |
Parameters:
|
|
|
111 |
- name
|
|
|
112 |
- ruleExecutionSrc
|
|
|
113 |
- startOn
|
|
|
114 |
- endOn
|
|
|
115 |
"""
|
|
|
116 |
self.send_createPromotion(name, ruleExecutionSrc, startOn, endOn)
|
|
|
117 |
self.recv_createPromotion()
|
|
|
118 |
|
|
|
119 |
def send_createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
|
|
|
120 |
self._oprot.writeMessageBegin('createPromotion', TMessageType.CALL, self._seqid)
|
|
|
121 |
args = createPromotion_args()
|
|
|
122 |
args.name = name
|
|
|
123 |
args.ruleExecutionSrc = ruleExecutionSrc
|
|
|
124 |
args.startOn = startOn
|
|
|
125 |
args.endOn = endOn
|
|
|
126 |
args.write(self._oprot)
|
|
|
127 |
self._oprot.writeMessageEnd()
|
|
|
128 |
self._oprot.trans.flush()
|
|
|
129 |
|
|
|
130 |
def recv_createPromotion(self, ):
|
|
|
131 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
132 |
if mtype == TMessageType.EXCEPTION:
|
|
|
133 |
x = TApplicationException()
|
|
|
134 |
x.read(self._iprot)
|
|
|
135 |
self._iprot.readMessageEnd()
|
|
|
136 |
raise x
|
|
|
137 |
result = createPromotion_result()
|
|
|
138 |
result.read(self._iprot)
|
|
|
139 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
140 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
141 |
raise result.pex
|
|
|
142 |
return
|
|
|
143 |
|
|
|
144 |
def getAllPromotions(self, ):
|
|
|
145 |
self.send_getAllPromotions()
|
|
|
146 |
return self.recv_getAllPromotions()
|
|
|
147 |
|
|
|
148 |
def send_getAllPromotions(self, ):
|
|
|
149 |
self._oprot.writeMessageBegin('getAllPromotions', TMessageType.CALL, self._seqid)
|
|
|
150 |
args = getAllPromotions_args()
|
|
|
151 |
args.write(self._oprot)
|
|
|
152 |
self._oprot.writeMessageEnd()
|
|
|
153 |
self._oprot.trans.flush()
|
|
|
154 |
|
|
|
155 |
def recv_getAllPromotions(self, ):
|
|
|
156 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
157 |
if mtype == TMessageType.EXCEPTION:
|
|
|
158 |
x = TApplicationException()
|
|
|
159 |
x.read(self._iprot)
|
|
|
160 |
self._iprot.readMessageEnd()
|
|
|
161 |
raise x
|
|
|
162 |
result = getAllPromotions_result()
|
|
|
163 |
result.read(self._iprot)
|
|
|
164 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
165 |
if result.success is not None:
|
| 1976 |
varun.gupt |
166 |
return result.success
|
| 3431 |
rajveer |
167 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
168 |
raise result.pex
|
|
|
169 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
|
|
|
170 |
|
|
|
171 |
def getPromotionById(self, promotionId):
|
|
|
172 |
"""
|
|
|
173 |
Parameters:
|
|
|
174 |
- promotionId
|
|
|
175 |
"""
|
|
|
176 |
self.send_getPromotionById(promotionId)
|
|
|
177 |
return self.recv_getPromotionById()
|
|
|
178 |
|
|
|
179 |
def send_getPromotionById(self, promotionId):
|
|
|
180 |
self._oprot.writeMessageBegin('getPromotionById', TMessageType.CALL, self._seqid)
|
|
|
181 |
args = getPromotionById_args()
|
|
|
182 |
args.promotionId = promotionId
|
|
|
183 |
args.write(self._oprot)
|
|
|
184 |
self._oprot.writeMessageEnd()
|
|
|
185 |
self._oprot.trans.flush()
|
|
|
186 |
|
|
|
187 |
def recv_getPromotionById(self, ):
|
|
|
188 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
189 |
if mtype == TMessageType.EXCEPTION:
|
|
|
190 |
x = TApplicationException()
|
|
|
191 |
x.read(self._iprot)
|
|
|
192 |
self._iprot.readMessageEnd()
|
|
|
193 |
raise x
|
|
|
194 |
result = getPromotionById_result()
|
|
|
195 |
result.read(self._iprot)
|
|
|
196 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
197 |
if result.success is not None:
|
| 1976 |
varun.gupt |
198 |
return result.success
|
| 3431 |
rajveer |
199 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
200 |
raise result.pex
|
|
|
201 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
|
|
|
202 |
|
|
|
203 |
def generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
204 |
"""
|
|
|
205 |
Parameters:
|
|
|
206 |
- promotionId
|
|
|
207 |
- couponCode
|
|
|
208 |
"""
|
|
|
209 |
self.send_generateCouponsForPromotion(promotionId, couponCode)
|
|
|
210 |
self.recv_generateCouponsForPromotion()
|
|
|
211 |
|
|
|
212 |
def send_generateCouponsForPromotion(self, promotionId, couponCode):
|
|
|
213 |
self._oprot.writeMessageBegin('generateCouponsForPromotion', TMessageType.CALL, self._seqid)
|
|
|
214 |
args = generateCouponsForPromotion_args()
|
|
|
215 |
args.promotionId = promotionId
|
|
|
216 |
args.couponCode = couponCode
|
|
|
217 |
args.write(self._oprot)
|
|
|
218 |
self._oprot.writeMessageEnd()
|
|
|
219 |
self._oprot.trans.flush()
|
|
|
220 |
|
|
|
221 |
def recv_generateCouponsForPromotion(self, ):
|
|
|
222 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
223 |
if mtype == TMessageType.EXCEPTION:
|
|
|
224 |
x = TApplicationException()
|
|
|
225 |
x.read(self._iprot)
|
|
|
226 |
self._iprot.readMessageEnd()
|
|
|
227 |
raise x
|
|
|
228 |
result = generateCouponsForPromotion_result()
|
|
|
229 |
result.read(self._iprot)
|
|
|
230 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
231 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
232 |
raise result.pex
|
|
|
233 |
return
|
|
|
234 |
|
|
|
235 |
def applyCoupon(self, couponCode, cartId):
|
|
|
236 |
"""
|
|
|
237 |
Parameters:
|
|
|
238 |
- couponCode
|
|
|
239 |
- cartId
|
|
|
240 |
"""
|
|
|
241 |
self.send_applyCoupon(couponCode, cartId)
|
|
|
242 |
return self.recv_applyCoupon()
|
|
|
243 |
|
|
|
244 |
def send_applyCoupon(self, couponCode, cartId):
|
|
|
245 |
self._oprot.writeMessageBegin('applyCoupon', TMessageType.CALL, self._seqid)
|
|
|
246 |
args = applyCoupon_args()
|
|
|
247 |
args.couponCode = couponCode
|
|
|
248 |
args.cartId = cartId
|
|
|
249 |
args.write(self._oprot)
|
|
|
250 |
self._oprot.writeMessageEnd()
|
|
|
251 |
self._oprot.trans.flush()
|
|
|
252 |
|
|
|
253 |
def recv_applyCoupon(self, ):
|
|
|
254 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
255 |
if mtype == TMessageType.EXCEPTION:
|
|
|
256 |
x = TApplicationException()
|
|
|
257 |
x.read(self._iprot)
|
|
|
258 |
self._iprot.readMessageEnd()
|
|
|
259 |
raise x
|
|
|
260 |
result = applyCoupon_result()
|
|
|
261 |
result.read(self._iprot)
|
|
|
262 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
263 |
if result.success is not None:
|
| 1976 |
varun.gupt |
264 |
return result.success
|
| 3431 |
rajveer |
265 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
266 |
raise result.pex
|
|
|
267 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
|
|
|
268 |
|
|
|
269 |
def trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
270 |
"""
|
|
|
271 |
Parameters:
|
|
|
272 |
- couponCode
|
|
|
273 |
- transactionId
|
|
|
274 |
- userId
|
|
|
275 |
"""
|
|
|
276 |
self.send_trackCouponUsage(couponCode, transactionId, userId)
|
|
|
277 |
self.recv_trackCouponUsage()
|
|
|
278 |
|
|
|
279 |
def send_trackCouponUsage(self, couponCode, transactionId, userId):
|
|
|
280 |
self._oprot.writeMessageBegin('trackCouponUsage', TMessageType.CALL, self._seqid)
|
|
|
281 |
args = trackCouponUsage_args()
|
|
|
282 |
args.couponCode = couponCode
|
|
|
283 |
args.transactionId = transactionId
|
|
|
284 |
args.userId = userId
|
|
|
285 |
args.write(self._oprot)
|
|
|
286 |
self._oprot.writeMessageEnd()
|
|
|
287 |
self._oprot.trans.flush()
|
|
|
288 |
|
|
|
289 |
def recv_trackCouponUsage(self, ):
|
|
|
290 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
291 |
if mtype == TMessageType.EXCEPTION:
|
|
|
292 |
x = TApplicationException()
|
|
|
293 |
x.read(self._iprot)
|
|
|
294 |
self._iprot.readMessageEnd()
|
|
|
295 |
raise x
|
|
|
296 |
result = trackCouponUsage_result()
|
|
|
297 |
result.read(self._iprot)
|
|
|
298 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
299 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
300 |
raise result.pex
|
|
|
301 |
return
|
|
|
302 |
|
|
|
303 |
def getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
304 |
"""
|
|
|
305 |
Parameters:
|
|
|
306 |
- couponCode
|
|
|
307 |
- userId
|
|
|
308 |
"""
|
|
|
309 |
self.send_getCouponUsageCountByUser(couponCode, userId)
|
|
|
310 |
return self.recv_getCouponUsageCountByUser()
|
|
|
311 |
|
|
|
312 |
def send_getCouponUsageCountByUser(self, couponCode, userId):
|
|
|
313 |
self._oprot.writeMessageBegin('getCouponUsageCountByUser', TMessageType.CALL, self._seqid)
|
|
|
314 |
args = getCouponUsageCountByUser_args()
|
|
|
315 |
args.couponCode = couponCode
|
|
|
316 |
args.userId = userId
|
|
|
317 |
args.write(self._oprot)
|
|
|
318 |
self._oprot.writeMessageEnd()
|
|
|
319 |
self._oprot.trans.flush()
|
|
|
320 |
|
|
|
321 |
def recv_getCouponUsageCountByUser(self, ):
|
|
|
322 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
323 |
if mtype == TMessageType.EXCEPTION:
|
|
|
324 |
x = TApplicationException()
|
|
|
325 |
x.read(self._iprot)
|
|
|
326 |
self._iprot.readMessageEnd()
|
|
|
327 |
raise x
|
|
|
328 |
result = getCouponUsageCountByUser_result()
|
|
|
329 |
result.read(self._iprot)
|
|
|
330 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
331 |
if result.success is not None:
|
| 1976 |
varun.gupt |
332 |
return result.success
|
| 3431 |
rajveer |
333 |
if result.pex is not None:
|
| 1976 |
varun.gupt |
334 |
raise result.pex
|
|
|
335 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
|
|
|
336 |
|
| 3385 |
varun.gupt |
337 |
def getActiveCoupons(self, ):
|
|
|
338 |
"""
|
|
|
339 |
Returns a list of active coupons
|
|
|
340 |
"""
|
|
|
341 |
self.send_getActiveCoupons()
|
|
|
342 |
return self.recv_getActiveCoupons()
|
| 1976 |
varun.gupt |
343 |
|
| 3385 |
varun.gupt |
344 |
def send_getActiveCoupons(self, ):
|
|
|
345 |
self._oprot.writeMessageBegin('getActiveCoupons', TMessageType.CALL, self._seqid)
|
|
|
346 |
args = getActiveCoupons_args()
|
|
|
347 |
args.write(self._oprot)
|
|
|
348 |
self._oprot.writeMessageEnd()
|
|
|
349 |
self._oprot.trans.flush()
|
|
|
350 |
|
|
|
351 |
def recv_getActiveCoupons(self, ):
|
|
|
352 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
353 |
if mtype == TMessageType.EXCEPTION:
|
|
|
354 |
x = TApplicationException()
|
|
|
355 |
x.read(self._iprot)
|
|
|
356 |
self._iprot.readMessageEnd()
|
|
|
357 |
raise x
|
|
|
358 |
result = getActiveCoupons_result()
|
|
|
359 |
result.read(self._iprot)
|
|
|
360 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
361 |
if result.success is not None:
|
| 3385 |
varun.gupt |
362 |
return result.success
|
| 3431 |
rajveer |
363 |
if result.pex is not None:
|
| 3385 |
varun.gupt |
364 |
raise result.pex
|
|
|
365 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
|
|
|
366 |
|
|
|
367 |
def getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
368 |
"""
|
|
|
369 |
Returns the count of successful payments done using a given coupon
|
| 3431 |
rajveer |
370 |
|
| 3385 |
varun.gupt |
371 |
Parameters:
|
|
|
372 |
- couponCode
|
|
|
373 |
"""
|
|
|
374 |
self.send_getSuccessfulPaymentCountForCoupon(couponCode)
|
|
|
375 |
return self.recv_getSuccessfulPaymentCountForCoupon()
|
|
|
376 |
|
|
|
377 |
def send_getSuccessfulPaymentCountForCoupon(self, couponCode):
|
|
|
378 |
self._oprot.writeMessageBegin('getSuccessfulPaymentCountForCoupon', TMessageType.CALL, self._seqid)
|
|
|
379 |
args = getSuccessfulPaymentCountForCoupon_args()
|
|
|
380 |
args.couponCode = couponCode
|
|
|
381 |
args.write(self._oprot)
|
|
|
382 |
self._oprot.writeMessageEnd()
|
|
|
383 |
self._oprot.trans.flush()
|
|
|
384 |
|
|
|
385 |
def recv_getSuccessfulPaymentCountForCoupon(self, ):
|
|
|
386 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
387 |
if mtype == TMessageType.EXCEPTION:
|
|
|
388 |
x = TApplicationException()
|
|
|
389 |
x.read(self._iprot)
|
|
|
390 |
self._iprot.readMessageEnd()
|
|
|
391 |
raise x
|
|
|
392 |
result = getSuccessfulPaymentCountForCoupon_result()
|
|
|
393 |
result.read(self._iprot)
|
|
|
394 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
395 |
if result.success is not None:
|
| 3385 |
varun.gupt |
396 |
return result.success
|
| 3431 |
rajveer |
397 |
if result.pex is not None:
|
| 3385 |
varun.gupt |
398 |
raise result.pex
|
|
|
399 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
|
|
|
400 |
|
|
|
401 |
def getRuleDocString(self, ruleName):
|
|
|
402 |
"""
|
|
|
403 |
Returns the doc string of the rule module
|
| 3431 |
rajveer |
404 |
|
| 3385 |
varun.gupt |
405 |
Parameters:
|
|
|
406 |
- ruleName
|
|
|
407 |
"""
|
|
|
408 |
self.send_getRuleDocString(ruleName)
|
|
|
409 |
return self.recv_getRuleDocString()
|
|
|
410 |
|
|
|
411 |
def send_getRuleDocString(self, ruleName):
|
|
|
412 |
self._oprot.writeMessageBegin('getRuleDocString', TMessageType.CALL, self._seqid)
|
|
|
413 |
args = getRuleDocString_args()
|
|
|
414 |
args.ruleName = ruleName
|
|
|
415 |
args.write(self._oprot)
|
|
|
416 |
self._oprot.writeMessageEnd()
|
|
|
417 |
self._oprot.trans.flush()
|
|
|
418 |
|
|
|
419 |
def recv_getRuleDocString(self, ):
|
|
|
420 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
421 |
if mtype == TMessageType.EXCEPTION:
|
|
|
422 |
x = TApplicationException()
|
|
|
423 |
x.read(self._iprot)
|
|
|
424 |
self._iprot.readMessageEnd()
|
|
|
425 |
raise x
|
|
|
426 |
result = getRuleDocString_result()
|
|
|
427 |
result.read(self._iprot)
|
|
|
428 |
self._iprot.readMessageEnd()
|
| 3431 |
rajveer |
429 |
if result.success is not None:
|
| 3385 |
varun.gupt |
430 |
return result.success
|
|
|
431 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
|
|
|
432 |
|
|
|
433 |
|
| 3376 |
rajveer |
434 |
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
|
| 1976 |
varun.gupt |
435 |
def __init__(self, handler):
|
| 3376 |
rajveer |
436 |
shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
|
| 1976 |
varun.gupt |
437 |
self._processMap["createPromotion"] = Processor.process_createPromotion
|
|
|
438 |
self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
|
|
|
439 |
self._processMap["getPromotionById"] = Processor.process_getPromotionById
|
|
|
440 |
self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
|
|
|
441 |
self._processMap["applyCoupon"] = Processor.process_applyCoupon
|
|
|
442 |
self._processMap["trackCouponUsage"] = Processor.process_trackCouponUsage
|
|
|
443 |
self._processMap["getCouponUsageCountByUser"] = Processor.process_getCouponUsageCountByUser
|
| 3385 |
varun.gupt |
444 |
self._processMap["getActiveCoupons"] = Processor.process_getActiveCoupons
|
|
|
445 |
self._processMap["getSuccessfulPaymentCountForCoupon"] = Processor.process_getSuccessfulPaymentCountForCoupon
|
|
|
446 |
self._processMap["getRuleDocString"] = Processor.process_getRuleDocString
|
| 1976 |
varun.gupt |
447 |
|
|
|
448 |
def process(self, iprot, oprot):
|
|
|
449 |
(name, type, seqid) = iprot.readMessageBegin()
|
|
|
450 |
if name not in self._processMap:
|
|
|
451 |
iprot.skip(TType.STRUCT)
|
|
|
452 |
iprot.readMessageEnd()
|
|
|
453 |
x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
|
|
|
454 |
oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
|
|
|
455 |
x.write(oprot)
|
|
|
456 |
oprot.writeMessageEnd()
|
|
|
457 |
oprot.trans.flush()
|
|
|
458 |
return
|
|
|
459 |
else:
|
|
|
460 |
self._processMap[name](self, seqid, iprot, oprot)
|
|
|
461 |
return True
|
|
|
462 |
|
|
|
463 |
def process_createPromotion(self, seqid, iprot, oprot):
|
|
|
464 |
args = createPromotion_args()
|
|
|
465 |
args.read(iprot)
|
|
|
466 |
iprot.readMessageEnd()
|
|
|
467 |
result = createPromotion_result()
|
|
|
468 |
try:
|
|
|
469 |
self._handler.createPromotion(args.name, args.ruleExecutionSrc, args.startOn, args.endOn)
|
|
|
470 |
except PromotionException, pex:
|
|
|
471 |
result.pex = pex
|
|
|
472 |
oprot.writeMessageBegin("createPromotion", TMessageType.REPLY, seqid)
|
|
|
473 |
result.write(oprot)
|
|
|
474 |
oprot.writeMessageEnd()
|
|
|
475 |
oprot.trans.flush()
|
|
|
476 |
|
|
|
477 |
def process_getAllPromotions(self, seqid, iprot, oprot):
|
|
|
478 |
args = getAllPromotions_args()
|
|
|
479 |
args.read(iprot)
|
|
|
480 |
iprot.readMessageEnd()
|
|
|
481 |
result = getAllPromotions_result()
|
|
|
482 |
try:
|
|
|
483 |
result.success = self._handler.getAllPromotions()
|
|
|
484 |
except PromotionException, pex:
|
|
|
485 |
result.pex = pex
|
|
|
486 |
oprot.writeMessageBegin("getAllPromotions", TMessageType.REPLY, seqid)
|
|
|
487 |
result.write(oprot)
|
|
|
488 |
oprot.writeMessageEnd()
|
|
|
489 |
oprot.trans.flush()
|
|
|
490 |
|
|
|
491 |
def process_getPromotionById(self, seqid, iprot, oprot):
|
|
|
492 |
args = getPromotionById_args()
|
|
|
493 |
args.read(iprot)
|
|
|
494 |
iprot.readMessageEnd()
|
|
|
495 |
result = getPromotionById_result()
|
|
|
496 |
try:
|
|
|
497 |
result.success = self._handler.getPromotionById(args.promotionId)
|
|
|
498 |
except PromotionException, pex:
|
|
|
499 |
result.pex = pex
|
|
|
500 |
oprot.writeMessageBegin("getPromotionById", TMessageType.REPLY, seqid)
|
|
|
501 |
result.write(oprot)
|
|
|
502 |
oprot.writeMessageEnd()
|
|
|
503 |
oprot.trans.flush()
|
|
|
504 |
|
|
|
505 |
def process_generateCouponsForPromotion(self, seqid, iprot, oprot):
|
|
|
506 |
args = generateCouponsForPromotion_args()
|
|
|
507 |
args.read(iprot)
|
|
|
508 |
iprot.readMessageEnd()
|
|
|
509 |
result = generateCouponsForPromotion_result()
|
|
|
510 |
try:
|
|
|
511 |
self._handler.generateCouponsForPromotion(args.promotionId, args.couponCode)
|
|
|
512 |
except PromotionException, pex:
|
|
|
513 |
result.pex = pex
|
|
|
514 |
oprot.writeMessageBegin("generateCouponsForPromotion", TMessageType.REPLY, seqid)
|
|
|
515 |
result.write(oprot)
|
|
|
516 |
oprot.writeMessageEnd()
|
|
|
517 |
oprot.trans.flush()
|
|
|
518 |
|
|
|
519 |
def process_applyCoupon(self, seqid, iprot, oprot):
|
|
|
520 |
args = applyCoupon_args()
|
|
|
521 |
args.read(iprot)
|
|
|
522 |
iprot.readMessageEnd()
|
|
|
523 |
result = applyCoupon_result()
|
|
|
524 |
try:
|
|
|
525 |
result.success = self._handler.applyCoupon(args.couponCode, args.cartId)
|
|
|
526 |
except PromotionException, pex:
|
|
|
527 |
result.pex = pex
|
|
|
528 |
oprot.writeMessageBegin("applyCoupon", TMessageType.REPLY, seqid)
|
|
|
529 |
result.write(oprot)
|
|
|
530 |
oprot.writeMessageEnd()
|
|
|
531 |
oprot.trans.flush()
|
|
|
532 |
|
|
|
533 |
def process_trackCouponUsage(self, seqid, iprot, oprot):
|
|
|
534 |
args = trackCouponUsage_args()
|
|
|
535 |
args.read(iprot)
|
|
|
536 |
iprot.readMessageEnd()
|
|
|
537 |
result = trackCouponUsage_result()
|
|
|
538 |
try:
|
|
|
539 |
self._handler.trackCouponUsage(args.couponCode, args.transactionId, args.userId)
|
|
|
540 |
except PromotionException, pex:
|
|
|
541 |
result.pex = pex
|
|
|
542 |
oprot.writeMessageBegin("trackCouponUsage", TMessageType.REPLY, seqid)
|
|
|
543 |
result.write(oprot)
|
|
|
544 |
oprot.writeMessageEnd()
|
|
|
545 |
oprot.trans.flush()
|
|
|
546 |
|
|
|
547 |
def process_getCouponUsageCountByUser(self, seqid, iprot, oprot):
|
|
|
548 |
args = getCouponUsageCountByUser_args()
|
|
|
549 |
args.read(iprot)
|
|
|
550 |
iprot.readMessageEnd()
|
|
|
551 |
result = getCouponUsageCountByUser_result()
|
|
|
552 |
try:
|
|
|
553 |
result.success = self._handler.getCouponUsageCountByUser(args.couponCode, args.userId)
|
|
|
554 |
except PromotionException, pex:
|
|
|
555 |
result.pex = pex
|
|
|
556 |
oprot.writeMessageBegin("getCouponUsageCountByUser", TMessageType.REPLY, seqid)
|
|
|
557 |
result.write(oprot)
|
|
|
558 |
oprot.writeMessageEnd()
|
|
|
559 |
oprot.trans.flush()
|
|
|
560 |
|
| 3385 |
varun.gupt |
561 |
def process_getActiveCoupons(self, seqid, iprot, oprot):
|
|
|
562 |
args = getActiveCoupons_args()
|
|
|
563 |
args.read(iprot)
|
|
|
564 |
iprot.readMessageEnd()
|
|
|
565 |
result = getActiveCoupons_result()
|
|
|
566 |
try:
|
|
|
567 |
result.success = self._handler.getActiveCoupons()
|
|
|
568 |
except PromotionException, pex:
|
|
|
569 |
result.pex = pex
|
|
|
570 |
oprot.writeMessageBegin("getActiveCoupons", TMessageType.REPLY, seqid)
|
|
|
571 |
result.write(oprot)
|
|
|
572 |
oprot.writeMessageEnd()
|
|
|
573 |
oprot.trans.flush()
|
| 1976 |
varun.gupt |
574 |
|
| 3385 |
varun.gupt |
575 |
def process_getSuccessfulPaymentCountForCoupon(self, seqid, iprot, oprot):
|
|
|
576 |
args = getSuccessfulPaymentCountForCoupon_args()
|
|
|
577 |
args.read(iprot)
|
|
|
578 |
iprot.readMessageEnd()
|
|
|
579 |
result = getSuccessfulPaymentCountForCoupon_result()
|
|
|
580 |
try:
|
|
|
581 |
result.success = self._handler.getSuccessfulPaymentCountForCoupon(args.couponCode)
|
|
|
582 |
except PromotionException, pex:
|
|
|
583 |
result.pex = pex
|
|
|
584 |
oprot.writeMessageBegin("getSuccessfulPaymentCountForCoupon", TMessageType.REPLY, seqid)
|
|
|
585 |
result.write(oprot)
|
|
|
586 |
oprot.writeMessageEnd()
|
|
|
587 |
oprot.trans.flush()
|
|
|
588 |
|
|
|
589 |
def process_getRuleDocString(self, seqid, iprot, oprot):
|
|
|
590 |
args = getRuleDocString_args()
|
|
|
591 |
args.read(iprot)
|
|
|
592 |
iprot.readMessageEnd()
|
|
|
593 |
result = getRuleDocString_result()
|
|
|
594 |
result.success = self._handler.getRuleDocString(args.ruleName)
|
|
|
595 |
oprot.writeMessageBegin("getRuleDocString", TMessageType.REPLY, seqid)
|
|
|
596 |
result.write(oprot)
|
|
|
597 |
oprot.writeMessageEnd()
|
|
|
598 |
oprot.trans.flush()
|
|
|
599 |
|
|
|
600 |
|
| 1976 |
varun.gupt |
601 |
# HELPER FUNCTIONS AND STRUCTURES
|
|
|
602 |
|
|
|
603 |
class createPromotion_args:
|
|
|
604 |
"""
|
|
|
605 |
Attributes:
|
|
|
606 |
- name
|
|
|
607 |
- ruleExecutionSrc
|
|
|
608 |
- startOn
|
|
|
609 |
- endOn
|
|
|
610 |
"""
|
|
|
611 |
|
|
|
612 |
thrift_spec = (
|
|
|
613 |
None, # 0
|
|
|
614 |
(1, TType.STRING, 'name', None, None, ), # 1
|
|
|
615 |
(2, TType.STRING, 'ruleExecutionSrc', None, None, ), # 2
|
|
|
616 |
(3, TType.I64, 'startOn', None, None, ), # 3
|
|
|
617 |
(4, TType.I64, 'endOn', None, None, ), # 4
|
|
|
618 |
)
|
|
|
619 |
|
|
|
620 |
def __init__(self, name=None, ruleExecutionSrc=None, startOn=None, endOn=None,):
|
|
|
621 |
self.name = name
|
|
|
622 |
self.ruleExecutionSrc = ruleExecutionSrc
|
|
|
623 |
self.startOn = startOn
|
|
|
624 |
self.endOn = endOn
|
|
|
625 |
|
|
|
626 |
def read(self, iprot):
|
|
|
627 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
628 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
629 |
return
|
|
|
630 |
iprot.readStructBegin()
|
|
|
631 |
while True:
|
|
|
632 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
633 |
if ftype == TType.STOP:
|
|
|
634 |
break
|
|
|
635 |
if fid == 1:
|
|
|
636 |
if ftype == TType.STRING:
|
|
|
637 |
self.name = iprot.readString();
|
|
|
638 |
else:
|
|
|
639 |
iprot.skip(ftype)
|
|
|
640 |
elif fid == 2:
|
|
|
641 |
if ftype == TType.STRING:
|
|
|
642 |
self.ruleExecutionSrc = iprot.readString();
|
|
|
643 |
else:
|
|
|
644 |
iprot.skip(ftype)
|
|
|
645 |
elif fid == 3:
|
|
|
646 |
if ftype == TType.I64:
|
|
|
647 |
self.startOn = iprot.readI64();
|
|
|
648 |
else:
|
|
|
649 |
iprot.skip(ftype)
|
|
|
650 |
elif fid == 4:
|
|
|
651 |
if ftype == TType.I64:
|
|
|
652 |
self.endOn = iprot.readI64();
|
|
|
653 |
else:
|
|
|
654 |
iprot.skip(ftype)
|
|
|
655 |
else:
|
|
|
656 |
iprot.skip(ftype)
|
|
|
657 |
iprot.readFieldEnd()
|
|
|
658 |
iprot.readStructEnd()
|
|
|
659 |
|
|
|
660 |
def write(self, oprot):
|
|
|
661 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
662 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
663 |
return
|
|
|
664 |
oprot.writeStructBegin('createPromotion_args')
|
| 3431 |
rajveer |
665 |
if self.name is not None:
|
| 1976 |
varun.gupt |
666 |
oprot.writeFieldBegin('name', TType.STRING, 1)
|
|
|
667 |
oprot.writeString(self.name)
|
|
|
668 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
669 |
if self.ruleExecutionSrc is not None:
|
| 1976 |
varun.gupt |
670 |
oprot.writeFieldBegin('ruleExecutionSrc', TType.STRING, 2)
|
|
|
671 |
oprot.writeString(self.ruleExecutionSrc)
|
|
|
672 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
673 |
if self.startOn is not None:
|
| 1976 |
varun.gupt |
674 |
oprot.writeFieldBegin('startOn', TType.I64, 3)
|
|
|
675 |
oprot.writeI64(self.startOn)
|
|
|
676 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
677 |
if self.endOn is not None:
|
| 1976 |
varun.gupt |
678 |
oprot.writeFieldBegin('endOn', TType.I64, 4)
|
|
|
679 |
oprot.writeI64(self.endOn)
|
|
|
680 |
oprot.writeFieldEnd()
|
|
|
681 |
oprot.writeFieldStop()
|
|
|
682 |
oprot.writeStructEnd()
|
|
|
683 |
|
| 3431 |
rajveer |
684 |
def validate(self):
|
|
|
685 |
return
|
|
|
686 |
|
|
|
687 |
|
| 1976 |
varun.gupt |
688 |
def __repr__(self):
|
|
|
689 |
L = ['%s=%r' % (key, value)
|
|
|
690 |
for key, value in self.__dict__.iteritems()]
|
|
|
691 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
692 |
|
|
|
693 |
def __eq__(self, other):
|
|
|
694 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
695 |
|
|
|
696 |
def __ne__(self, other):
|
|
|
697 |
return not (self == other)
|
|
|
698 |
|
|
|
699 |
class createPromotion_result:
|
|
|
700 |
"""
|
|
|
701 |
Attributes:
|
|
|
702 |
- pex
|
|
|
703 |
"""
|
|
|
704 |
|
|
|
705 |
thrift_spec = (
|
|
|
706 |
None, # 0
|
|
|
707 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
708 |
)
|
|
|
709 |
|
|
|
710 |
def __init__(self, pex=None,):
|
|
|
711 |
self.pex = pex
|
|
|
712 |
|
|
|
713 |
def read(self, iprot):
|
|
|
714 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
715 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
716 |
return
|
|
|
717 |
iprot.readStructBegin()
|
|
|
718 |
while True:
|
|
|
719 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
720 |
if ftype == TType.STOP:
|
|
|
721 |
break
|
|
|
722 |
if fid == 1:
|
|
|
723 |
if ftype == TType.STRUCT:
|
|
|
724 |
self.pex = PromotionException()
|
|
|
725 |
self.pex.read(iprot)
|
|
|
726 |
else:
|
|
|
727 |
iprot.skip(ftype)
|
|
|
728 |
else:
|
|
|
729 |
iprot.skip(ftype)
|
|
|
730 |
iprot.readFieldEnd()
|
|
|
731 |
iprot.readStructEnd()
|
|
|
732 |
|
|
|
733 |
def write(self, oprot):
|
|
|
734 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
735 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
736 |
return
|
|
|
737 |
oprot.writeStructBegin('createPromotion_result')
|
| 3431 |
rajveer |
738 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
739 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
740 |
self.pex.write(oprot)
|
|
|
741 |
oprot.writeFieldEnd()
|
|
|
742 |
oprot.writeFieldStop()
|
|
|
743 |
oprot.writeStructEnd()
|
|
|
744 |
|
| 3431 |
rajveer |
745 |
def validate(self):
|
|
|
746 |
return
|
|
|
747 |
|
|
|
748 |
|
| 1976 |
varun.gupt |
749 |
def __repr__(self):
|
|
|
750 |
L = ['%s=%r' % (key, value)
|
|
|
751 |
for key, value in self.__dict__.iteritems()]
|
|
|
752 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
753 |
|
|
|
754 |
def __eq__(self, other):
|
|
|
755 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
756 |
|
|
|
757 |
def __ne__(self, other):
|
|
|
758 |
return not (self == other)
|
|
|
759 |
|
|
|
760 |
class getAllPromotions_args:
|
|
|
761 |
|
|
|
762 |
thrift_spec = (
|
|
|
763 |
)
|
|
|
764 |
|
|
|
765 |
def read(self, iprot):
|
|
|
766 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
767 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
768 |
return
|
|
|
769 |
iprot.readStructBegin()
|
|
|
770 |
while True:
|
|
|
771 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
772 |
if ftype == TType.STOP:
|
|
|
773 |
break
|
|
|
774 |
else:
|
|
|
775 |
iprot.skip(ftype)
|
|
|
776 |
iprot.readFieldEnd()
|
|
|
777 |
iprot.readStructEnd()
|
|
|
778 |
|
|
|
779 |
def write(self, oprot):
|
|
|
780 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
781 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
782 |
return
|
|
|
783 |
oprot.writeStructBegin('getAllPromotions_args')
|
|
|
784 |
oprot.writeFieldStop()
|
|
|
785 |
oprot.writeStructEnd()
|
|
|
786 |
|
| 3431 |
rajveer |
787 |
def validate(self):
|
|
|
788 |
return
|
|
|
789 |
|
|
|
790 |
|
| 1976 |
varun.gupt |
791 |
def __repr__(self):
|
|
|
792 |
L = ['%s=%r' % (key, value)
|
|
|
793 |
for key, value in self.__dict__.iteritems()]
|
|
|
794 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
795 |
|
|
|
796 |
def __eq__(self, other):
|
|
|
797 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
798 |
|
|
|
799 |
def __ne__(self, other):
|
|
|
800 |
return not (self == other)
|
|
|
801 |
|
|
|
802 |
class getAllPromotions_result:
|
|
|
803 |
"""
|
|
|
804 |
Attributes:
|
|
|
805 |
- success
|
|
|
806 |
- pex
|
|
|
807 |
"""
|
|
|
808 |
|
|
|
809 |
thrift_spec = (
|
|
|
810 |
(0, TType.LIST, 'success', (TType.STRUCT,(Promotion, Promotion.thrift_spec)), None, ), # 0
|
|
|
811 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
812 |
)
|
|
|
813 |
|
|
|
814 |
def __init__(self, success=None, pex=None,):
|
|
|
815 |
self.success = success
|
|
|
816 |
self.pex = pex
|
|
|
817 |
|
|
|
818 |
def read(self, iprot):
|
|
|
819 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
820 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
821 |
return
|
|
|
822 |
iprot.readStructBegin()
|
|
|
823 |
while True:
|
|
|
824 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
825 |
if ftype == TType.STOP:
|
|
|
826 |
break
|
|
|
827 |
if fid == 0:
|
|
|
828 |
if ftype == TType.LIST:
|
|
|
829 |
self.success = []
|
| 2981 |
rajveer |
830 |
(_etype24, _size21) = iprot.readListBegin()
|
|
|
831 |
for _i25 in xrange(_size21):
|
|
|
832 |
_elem26 = Promotion()
|
|
|
833 |
_elem26.read(iprot)
|
|
|
834 |
self.success.append(_elem26)
|
| 1976 |
varun.gupt |
835 |
iprot.readListEnd()
|
|
|
836 |
else:
|
|
|
837 |
iprot.skip(ftype)
|
|
|
838 |
elif fid == 1:
|
|
|
839 |
if ftype == TType.STRUCT:
|
|
|
840 |
self.pex = PromotionException()
|
|
|
841 |
self.pex.read(iprot)
|
|
|
842 |
else:
|
|
|
843 |
iprot.skip(ftype)
|
|
|
844 |
else:
|
|
|
845 |
iprot.skip(ftype)
|
|
|
846 |
iprot.readFieldEnd()
|
|
|
847 |
iprot.readStructEnd()
|
|
|
848 |
|
|
|
849 |
def write(self, oprot):
|
|
|
850 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
851 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
852 |
return
|
|
|
853 |
oprot.writeStructBegin('getAllPromotions_result')
|
| 3431 |
rajveer |
854 |
if self.success is not None:
|
| 1976 |
varun.gupt |
855 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
856 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
| 2981 |
rajveer |
857 |
for iter27 in self.success:
|
|
|
858 |
iter27.write(oprot)
|
| 1976 |
varun.gupt |
859 |
oprot.writeListEnd()
|
|
|
860 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
861 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
862 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
863 |
self.pex.write(oprot)
|
|
|
864 |
oprot.writeFieldEnd()
|
|
|
865 |
oprot.writeFieldStop()
|
|
|
866 |
oprot.writeStructEnd()
|
|
|
867 |
|
| 3431 |
rajveer |
868 |
def validate(self):
|
|
|
869 |
return
|
|
|
870 |
|
|
|
871 |
|
| 1976 |
varun.gupt |
872 |
def __repr__(self):
|
|
|
873 |
L = ['%s=%r' % (key, value)
|
|
|
874 |
for key, value in self.__dict__.iteritems()]
|
|
|
875 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
876 |
|
|
|
877 |
def __eq__(self, other):
|
|
|
878 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
879 |
|
|
|
880 |
def __ne__(self, other):
|
|
|
881 |
return not (self == other)
|
|
|
882 |
|
|
|
883 |
class getPromotionById_args:
|
|
|
884 |
"""
|
|
|
885 |
Attributes:
|
|
|
886 |
- promotionId
|
|
|
887 |
"""
|
|
|
888 |
|
|
|
889 |
thrift_spec = (
|
|
|
890 |
None, # 0
|
|
|
891 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
|
|
892 |
)
|
|
|
893 |
|
|
|
894 |
def __init__(self, promotionId=None,):
|
|
|
895 |
self.promotionId = promotionId
|
|
|
896 |
|
|
|
897 |
def read(self, iprot):
|
|
|
898 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
899 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
900 |
return
|
|
|
901 |
iprot.readStructBegin()
|
|
|
902 |
while True:
|
|
|
903 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
904 |
if ftype == TType.STOP:
|
|
|
905 |
break
|
|
|
906 |
if fid == 1:
|
|
|
907 |
if ftype == TType.I64:
|
|
|
908 |
self.promotionId = iprot.readI64();
|
|
|
909 |
else:
|
|
|
910 |
iprot.skip(ftype)
|
|
|
911 |
else:
|
|
|
912 |
iprot.skip(ftype)
|
|
|
913 |
iprot.readFieldEnd()
|
|
|
914 |
iprot.readStructEnd()
|
|
|
915 |
|
|
|
916 |
def write(self, oprot):
|
|
|
917 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
918 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
919 |
return
|
|
|
920 |
oprot.writeStructBegin('getPromotionById_args')
|
| 3431 |
rajveer |
921 |
if self.promotionId is not None:
|
| 1976 |
varun.gupt |
922 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
923 |
oprot.writeI64(self.promotionId)
|
|
|
924 |
oprot.writeFieldEnd()
|
|
|
925 |
oprot.writeFieldStop()
|
|
|
926 |
oprot.writeStructEnd()
|
|
|
927 |
|
| 3431 |
rajveer |
928 |
def validate(self):
|
|
|
929 |
return
|
|
|
930 |
|
|
|
931 |
|
| 1976 |
varun.gupt |
932 |
def __repr__(self):
|
|
|
933 |
L = ['%s=%r' % (key, value)
|
|
|
934 |
for key, value in self.__dict__.iteritems()]
|
|
|
935 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
936 |
|
|
|
937 |
def __eq__(self, other):
|
|
|
938 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
939 |
|
|
|
940 |
def __ne__(self, other):
|
|
|
941 |
return not (self == other)
|
|
|
942 |
|
|
|
943 |
class getPromotionById_result:
|
|
|
944 |
"""
|
|
|
945 |
Attributes:
|
|
|
946 |
- success
|
|
|
947 |
- pex
|
|
|
948 |
"""
|
|
|
949 |
|
|
|
950 |
thrift_spec = (
|
|
|
951 |
(0, TType.STRUCT, 'success', (Promotion, Promotion.thrift_spec), None, ), # 0
|
|
|
952 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
953 |
)
|
|
|
954 |
|
|
|
955 |
def __init__(self, success=None, pex=None,):
|
|
|
956 |
self.success = success
|
|
|
957 |
self.pex = pex
|
|
|
958 |
|
|
|
959 |
def read(self, iprot):
|
|
|
960 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
961 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
962 |
return
|
|
|
963 |
iprot.readStructBegin()
|
|
|
964 |
while True:
|
|
|
965 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
966 |
if ftype == TType.STOP:
|
|
|
967 |
break
|
|
|
968 |
if fid == 0:
|
|
|
969 |
if ftype == TType.STRUCT:
|
|
|
970 |
self.success = Promotion()
|
|
|
971 |
self.success.read(iprot)
|
|
|
972 |
else:
|
|
|
973 |
iprot.skip(ftype)
|
|
|
974 |
elif fid == 1:
|
|
|
975 |
if ftype == TType.STRUCT:
|
|
|
976 |
self.pex = PromotionException()
|
|
|
977 |
self.pex.read(iprot)
|
|
|
978 |
else:
|
|
|
979 |
iprot.skip(ftype)
|
|
|
980 |
else:
|
|
|
981 |
iprot.skip(ftype)
|
|
|
982 |
iprot.readFieldEnd()
|
|
|
983 |
iprot.readStructEnd()
|
|
|
984 |
|
|
|
985 |
def write(self, oprot):
|
|
|
986 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
987 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
988 |
return
|
|
|
989 |
oprot.writeStructBegin('getPromotionById_result')
|
| 3431 |
rajveer |
990 |
if self.success is not None:
|
| 1976 |
varun.gupt |
991 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
992 |
self.success.write(oprot)
|
|
|
993 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
994 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
995 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
996 |
self.pex.write(oprot)
|
|
|
997 |
oprot.writeFieldEnd()
|
|
|
998 |
oprot.writeFieldStop()
|
|
|
999 |
oprot.writeStructEnd()
|
|
|
1000 |
|
| 3431 |
rajveer |
1001 |
def validate(self):
|
|
|
1002 |
return
|
|
|
1003 |
|
|
|
1004 |
|
| 1976 |
varun.gupt |
1005 |
def __repr__(self):
|
|
|
1006 |
L = ['%s=%r' % (key, value)
|
|
|
1007 |
for key, value in self.__dict__.iteritems()]
|
|
|
1008 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1009 |
|
|
|
1010 |
def __eq__(self, other):
|
|
|
1011 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1012 |
|
|
|
1013 |
def __ne__(self, other):
|
|
|
1014 |
return not (self == other)
|
|
|
1015 |
|
|
|
1016 |
class generateCouponsForPromotion_args:
|
|
|
1017 |
"""
|
|
|
1018 |
Attributes:
|
|
|
1019 |
- promotionId
|
|
|
1020 |
- couponCode
|
|
|
1021 |
"""
|
|
|
1022 |
|
|
|
1023 |
thrift_spec = (
|
|
|
1024 |
None, # 0
|
|
|
1025 |
(1, TType.I64, 'promotionId', None, None, ), # 1
|
|
|
1026 |
(2, TType.STRING, 'couponCode', None, None, ), # 2
|
|
|
1027 |
)
|
|
|
1028 |
|
|
|
1029 |
def __init__(self, promotionId=None, couponCode=None,):
|
|
|
1030 |
self.promotionId = promotionId
|
|
|
1031 |
self.couponCode = couponCode
|
|
|
1032 |
|
|
|
1033 |
def read(self, iprot):
|
|
|
1034 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1035 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1036 |
return
|
|
|
1037 |
iprot.readStructBegin()
|
|
|
1038 |
while True:
|
|
|
1039 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1040 |
if ftype == TType.STOP:
|
|
|
1041 |
break
|
|
|
1042 |
if fid == 1:
|
|
|
1043 |
if ftype == TType.I64:
|
|
|
1044 |
self.promotionId = iprot.readI64();
|
|
|
1045 |
else:
|
|
|
1046 |
iprot.skip(ftype)
|
|
|
1047 |
elif fid == 2:
|
|
|
1048 |
if ftype == TType.STRING:
|
|
|
1049 |
self.couponCode = iprot.readString();
|
|
|
1050 |
else:
|
|
|
1051 |
iprot.skip(ftype)
|
|
|
1052 |
else:
|
|
|
1053 |
iprot.skip(ftype)
|
|
|
1054 |
iprot.readFieldEnd()
|
|
|
1055 |
iprot.readStructEnd()
|
|
|
1056 |
|
|
|
1057 |
def write(self, oprot):
|
|
|
1058 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1059 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1060 |
return
|
|
|
1061 |
oprot.writeStructBegin('generateCouponsForPromotion_args')
|
| 3431 |
rajveer |
1062 |
if self.promotionId is not None:
|
| 1976 |
varun.gupt |
1063 |
oprot.writeFieldBegin('promotionId', TType.I64, 1)
|
|
|
1064 |
oprot.writeI64(self.promotionId)
|
|
|
1065 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1066 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
1067 |
oprot.writeFieldBegin('couponCode', TType.STRING, 2)
|
|
|
1068 |
oprot.writeString(self.couponCode)
|
|
|
1069 |
oprot.writeFieldEnd()
|
|
|
1070 |
oprot.writeFieldStop()
|
|
|
1071 |
oprot.writeStructEnd()
|
|
|
1072 |
|
| 3431 |
rajveer |
1073 |
def validate(self):
|
|
|
1074 |
return
|
|
|
1075 |
|
|
|
1076 |
|
| 1976 |
varun.gupt |
1077 |
def __repr__(self):
|
|
|
1078 |
L = ['%s=%r' % (key, value)
|
|
|
1079 |
for key, value in self.__dict__.iteritems()]
|
|
|
1080 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1081 |
|
|
|
1082 |
def __eq__(self, other):
|
|
|
1083 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1084 |
|
|
|
1085 |
def __ne__(self, other):
|
|
|
1086 |
return not (self == other)
|
|
|
1087 |
|
|
|
1088 |
class generateCouponsForPromotion_result:
|
|
|
1089 |
"""
|
|
|
1090 |
Attributes:
|
|
|
1091 |
- pex
|
|
|
1092 |
"""
|
|
|
1093 |
|
|
|
1094 |
thrift_spec = (
|
|
|
1095 |
None, # 0
|
|
|
1096 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1097 |
)
|
|
|
1098 |
|
|
|
1099 |
def __init__(self, pex=None,):
|
|
|
1100 |
self.pex = pex
|
|
|
1101 |
|
|
|
1102 |
def read(self, iprot):
|
|
|
1103 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1104 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1105 |
return
|
|
|
1106 |
iprot.readStructBegin()
|
|
|
1107 |
while True:
|
|
|
1108 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1109 |
if ftype == TType.STOP:
|
|
|
1110 |
break
|
|
|
1111 |
if fid == 1:
|
|
|
1112 |
if ftype == TType.STRUCT:
|
|
|
1113 |
self.pex = PromotionException()
|
|
|
1114 |
self.pex.read(iprot)
|
|
|
1115 |
else:
|
|
|
1116 |
iprot.skip(ftype)
|
|
|
1117 |
else:
|
|
|
1118 |
iprot.skip(ftype)
|
|
|
1119 |
iprot.readFieldEnd()
|
|
|
1120 |
iprot.readStructEnd()
|
|
|
1121 |
|
|
|
1122 |
def write(self, oprot):
|
|
|
1123 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1124 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1125 |
return
|
|
|
1126 |
oprot.writeStructBegin('generateCouponsForPromotion_result')
|
| 3431 |
rajveer |
1127 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1128 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1129 |
self.pex.write(oprot)
|
|
|
1130 |
oprot.writeFieldEnd()
|
|
|
1131 |
oprot.writeFieldStop()
|
|
|
1132 |
oprot.writeStructEnd()
|
|
|
1133 |
|
| 3431 |
rajveer |
1134 |
def validate(self):
|
|
|
1135 |
return
|
|
|
1136 |
|
|
|
1137 |
|
| 1976 |
varun.gupt |
1138 |
def __repr__(self):
|
|
|
1139 |
L = ['%s=%r' % (key, value)
|
|
|
1140 |
for key, value in self.__dict__.iteritems()]
|
|
|
1141 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1142 |
|
|
|
1143 |
def __eq__(self, other):
|
|
|
1144 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1145 |
|
|
|
1146 |
def __ne__(self, other):
|
|
|
1147 |
return not (self == other)
|
|
|
1148 |
|
|
|
1149 |
class applyCoupon_args:
|
|
|
1150 |
"""
|
|
|
1151 |
Attributes:
|
|
|
1152 |
- couponCode
|
|
|
1153 |
- cartId
|
|
|
1154 |
"""
|
|
|
1155 |
|
|
|
1156 |
thrift_spec = (
|
|
|
1157 |
None, # 0
|
|
|
1158 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1159 |
(2, TType.I64, 'cartId', None, None, ), # 2
|
|
|
1160 |
)
|
|
|
1161 |
|
|
|
1162 |
def __init__(self, couponCode=None, cartId=None,):
|
|
|
1163 |
self.couponCode = couponCode
|
|
|
1164 |
self.cartId = cartId
|
|
|
1165 |
|
|
|
1166 |
def read(self, iprot):
|
|
|
1167 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1168 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1169 |
return
|
|
|
1170 |
iprot.readStructBegin()
|
|
|
1171 |
while True:
|
|
|
1172 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1173 |
if ftype == TType.STOP:
|
|
|
1174 |
break
|
|
|
1175 |
if fid == 1:
|
|
|
1176 |
if ftype == TType.STRING:
|
|
|
1177 |
self.couponCode = iprot.readString();
|
|
|
1178 |
else:
|
|
|
1179 |
iprot.skip(ftype)
|
|
|
1180 |
elif fid == 2:
|
|
|
1181 |
if ftype == TType.I64:
|
|
|
1182 |
self.cartId = iprot.readI64();
|
|
|
1183 |
else:
|
|
|
1184 |
iprot.skip(ftype)
|
|
|
1185 |
else:
|
|
|
1186 |
iprot.skip(ftype)
|
|
|
1187 |
iprot.readFieldEnd()
|
|
|
1188 |
iprot.readStructEnd()
|
|
|
1189 |
|
|
|
1190 |
def write(self, oprot):
|
|
|
1191 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1192 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1193 |
return
|
|
|
1194 |
oprot.writeStructBegin('applyCoupon_args')
|
| 3431 |
rajveer |
1195 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
1196 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1197 |
oprot.writeString(self.couponCode)
|
|
|
1198 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1199 |
if self.cartId is not None:
|
| 1976 |
varun.gupt |
1200 |
oprot.writeFieldBegin('cartId', TType.I64, 2)
|
|
|
1201 |
oprot.writeI64(self.cartId)
|
|
|
1202 |
oprot.writeFieldEnd()
|
|
|
1203 |
oprot.writeFieldStop()
|
|
|
1204 |
oprot.writeStructEnd()
|
|
|
1205 |
|
| 3431 |
rajveer |
1206 |
def validate(self):
|
|
|
1207 |
return
|
|
|
1208 |
|
|
|
1209 |
|
| 1976 |
varun.gupt |
1210 |
def __repr__(self):
|
|
|
1211 |
L = ['%s=%r' % (key, value)
|
|
|
1212 |
for key, value in self.__dict__.iteritems()]
|
|
|
1213 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1214 |
|
|
|
1215 |
def __eq__(self, other):
|
|
|
1216 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1217 |
|
|
|
1218 |
def __ne__(self, other):
|
|
|
1219 |
return not (self == other)
|
|
|
1220 |
|
|
|
1221 |
class applyCoupon_result:
|
|
|
1222 |
"""
|
|
|
1223 |
Attributes:
|
|
|
1224 |
- success
|
|
|
1225 |
- pex
|
|
|
1226 |
"""
|
|
|
1227 |
|
|
|
1228 |
thrift_spec = (
|
|
|
1229 |
(0, TType.STRUCT, 'success', (Cart, Cart.thrift_spec), None, ), # 0
|
|
|
1230 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1231 |
)
|
|
|
1232 |
|
|
|
1233 |
def __init__(self, success=None, pex=None,):
|
|
|
1234 |
self.success = success
|
|
|
1235 |
self.pex = pex
|
|
|
1236 |
|
|
|
1237 |
def read(self, iprot):
|
|
|
1238 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1239 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1240 |
return
|
|
|
1241 |
iprot.readStructBegin()
|
|
|
1242 |
while True:
|
|
|
1243 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1244 |
if ftype == TType.STOP:
|
|
|
1245 |
break
|
|
|
1246 |
if fid == 0:
|
|
|
1247 |
if ftype == TType.STRUCT:
|
|
|
1248 |
self.success = Cart()
|
|
|
1249 |
self.success.read(iprot)
|
|
|
1250 |
else:
|
|
|
1251 |
iprot.skip(ftype)
|
|
|
1252 |
elif fid == 1:
|
|
|
1253 |
if ftype == TType.STRUCT:
|
|
|
1254 |
self.pex = PromotionException()
|
|
|
1255 |
self.pex.read(iprot)
|
|
|
1256 |
else:
|
|
|
1257 |
iprot.skip(ftype)
|
|
|
1258 |
else:
|
|
|
1259 |
iprot.skip(ftype)
|
|
|
1260 |
iprot.readFieldEnd()
|
|
|
1261 |
iprot.readStructEnd()
|
|
|
1262 |
|
|
|
1263 |
def write(self, oprot):
|
|
|
1264 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1265 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1266 |
return
|
|
|
1267 |
oprot.writeStructBegin('applyCoupon_result')
|
| 3431 |
rajveer |
1268 |
if self.success is not None:
|
| 1976 |
varun.gupt |
1269 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
1270 |
self.success.write(oprot)
|
|
|
1271 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1272 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1273 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1274 |
self.pex.write(oprot)
|
|
|
1275 |
oprot.writeFieldEnd()
|
|
|
1276 |
oprot.writeFieldStop()
|
|
|
1277 |
oprot.writeStructEnd()
|
|
|
1278 |
|
| 3431 |
rajveer |
1279 |
def validate(self):
|
|
|
1280 |
return
|
|
|
1281 |
|
|
|
1282 |
|
| 1976 |
varun.gupt |
1283 |
def __repr__(self):
|
|
|
1284 |
L = ['%s=%r' % (key, value)
|
|
|
1285 |
for key, value in self.__dict__.iteritems()]
|
|
|
1286 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1287 |
|
|
|
1288 |
def __eq__(self, other):
|
|
|
1289 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1290 |
|
|
|
1291 |
def __ne__(self, other):
|
|
|
1292 |
return not (self == other)
|
|
|
1293 |
|
|
|
1294 |
class trackCouponUsage_args:
|
|
|
1295 |
"""
|
|
|
1296 |
Attributes:
|
|
|
1297 |
- couponCode
|
|
|
1298 |
- transactionId
|
|
|
1299 |
- userId
|
|
|
1300 |
"""
|
|
|
1301 |
|
|
|
1302 |
thrift_spec = (
|
|
|
1303 |
None, # 0
|
|
|
1304 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1305 |
(2, TType.I64, 'transactionId', None, None, ), # 2
|
|
|
1306 |
(3, TType.I64, 'userId', None, None, ), # 3
|
|
|
1307 |
)
|
|
|
1308 |
|
|
|
1309 |
def __init__(self, couponCode=None, transactionId=None, userId=None,):
|
|
|
1310 |
self.couponCode = couponCode
|
|
|
1311 |
self.transactionId = transactionId
|
|
|
1312 |
self.userId = userId
|
|
|
1313 |
|
|
|
1314 |
def read(self, iprot):
|
|
|
1315 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1316 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1317 |
return
|
|
|
1318 |
iprot.readStructBegin()
|
|
|
1319 |
while True:
|
|
|
1320 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1321 |
if ftype == TType.STOP:
|
|
|
1322 |
break
|
|
|
1323 |
if fid == 1:
|
|
|
1324 |
if ftype == TType.STRING:
|
|
|
1325 |
self.couponCode = iprot.readString();
|
|
|
1326 |
else:
|
|
|
1327 |
iprot.skip(ftype)
|
|
|
1328 |
elif fid == 2:
|
|
|
1329 |
if ftype == TType.I64:
|
|
|
1330 |
self.transactionId = iprot.readI64();
|
|
|
1331 |
else:
|
|
|
1332 |
iprot.skip(ftype)
|
|
|
1333 |
elif fid == 3:
|
|
|
1334 |
if ftype == TType.I64:
|
|
|
1335 |
self.userId = iprot.readI64();
|
|
|
1336 |
else:
|
|
|
1337 |
iprot.skip(ftype)
|
|
|
1338 |
else:
|
|
|
1339 |
iprot.skip(ftype)
|
|
|
1340 |
iprot.readFieldEnd()
|
|
|
1341 |
iprot.readStructEnd()
|
|
|
1342 |
|
|
|
1343 |
def write(self, oprot):
|
|
|
1344 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1345 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1346 |
return
|
|
|
1347 |
oprot.writeStructBegin('trackCouponUsage_args')
|
| 3431 |
rajveer |
1348 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
1349 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1350 |
oprot.writeString(self.couponCode)
|
|
|
1351 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1352 |
if self.transactionId is not None:
|
| 1976 |
varun.gupt |
1353 |
oprot.writeFieldBegin('transactionId', TType.I64, 2)
|
|
|
1354 |
oprot.writeI64(self.transactionId)
|
|
|
1355 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1356 |
if self.userId is not None:
|
| 1976 |
varun.gupt |
1357 |
oprot.writeFieldBegin('userId', TType.I64, 3)
|
|
|
1358 |
oprot.writeI64(self.userId)
|
|
|
1359 |
oprot.writeFieldEnd()
|
|
|
1360 |
oprot.writeFieldStop()
|
|
|
1361 |
oprot.writeStructEnd()
|
|
|
1362 |
|
| 3431 |
rajveer |
1363 |
def validate(self):
|
|
|
1364 |
return
|
|
|
1365 |
|
|
|
1366 |
|
| 1976 |
varun.gupt |
1367 |
def __repr__(self):
|
|
|
1368 |
L = ['%s=%r' % (key, value)
|
|
|
1369 |
for key, value in self.__dict__.iteritems()]
|
|
|
1370 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1371 |
|
|
|
1372 |
def __eq__(self, other):
|
|
|
1373 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1374 |
|
|
|
1375 |
def __ne__(self, other):
|
|
|
1376 |
return not (self == other)
|
|
|
1377 |
|
|
|
1378 |
class trackCouponUsage_result:
|
|
|
1379 |
"""
|
|
|
1380 |
Attributes:
|
|
|
1381 |
- pex
|
|
|
1382 |
"""
|
|
|
1383 |
|
|
|
1384 |
thrift_spec = (
|
|
|
1385 |
None, # 0
|
|
|
1386 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1387 |
)
|
|
|
1388 |
|
|
|
1389 |
def __init__(self, pex=None,):
|
|
|
1390 |
self.pex = pex
|
|
|
1391 |
|
|
|
1392 |
def read(self, iprot):
|
|
|
1393 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1394 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1395 |
return
|
|
|
1396 |
iprot.readStructBegin()
|
|
|
1397 |
while True:
|
|
|
1398 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1399 |
if ftype == TType.STOP:
|
|
|
1400 |
break
|
|
|
1401 |
if fid == 1:
|
|
|
1402 |
if ftype == TType.STRUCT:
|
|
|
1403 |
self.pex = PromotionException()
|
|
|
1404 |
self.pex.read(iprot)
|
|
|
1405 |
else:
|
|
|
1406 |
iprot.skip(ftype)
|
|
|
1407 |
else:
|
|
|
1408 |
iprot.skip(ftype)
|
|
|
1409 |
iprot.readFieldEnd()
|
|
|
1410 |
iprot.readStructEnd()
|
|
|
1411 |
|
|
|
1412 |
def write(self, oprot):
|
|
|
1413 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1414 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1415 |
return
|
|
|
1416 |
oprot.writeStructBegin('trackCouponUsage_result')
|
| 3431 |
rajveer |
1417 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1418 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1419 |
self.pex.write(oprot)
|
|
|
1420 |
oprot.writeFieldEnd()
|
|
|
1421 |
oprot.writeFieldStop()
|
|
|
1422 |
oprot.writeStructEnd()
|
|
|
1423 |
|
| 3431 |
rajveer |
1424 |
def validate(self):
|
|
|
1425 |
return
|
|
|
1426 |
|
|
|
1427 |
|
| 1976 |
varun.gupt |
1428 |
def __repr__(self):
|
|
|
1429 |
L = ['%s=%r' % (key, value)
|
|
|
1430 |
for key, value in self.__dict__.iteritems()]
|
|
|
1431 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1432 |
|
|
|
1433 |
def __eq__(self, other):
|
|
|
1434 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1435 |
|
|
|
1436 |
def __ne__(self, other):
|
|
|
1437 |
return not (self == other)
|
|
|
1438 |
|
|
|
1439 |
class getCouponUsageCountByUser_args:
|
|
|
1440 |
"""
|
|
|
1441 |
Attributes:
|
|
|
1442 |
- couponCode
|
|
|
1443 |
- userId
|
|
|
1444 |
"""
|
|
|
1445 |
|
|
|
1446 |
thrift_spec = (
|
|
|
1447 |
None, # 0
|
|
|
1448 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1449 |
(2, TType.I64, 'userId', None, None, ), # 2
|
|
|
1450 |
)
|
|
|
1451 |
|
|
|
1452 |
def __init__(self, couponCode=None, userId=None,):
|
|
|
1453 |
self.couponCode = couponCode
|
|
|
1454 |
self.userId = userId
|
|
|
1455 |
|
|
|
1456 |
def read(self, iprot):
|
|
|
1457 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1458 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1459 |
return
|
|
|
1460 |
iprot.readStructBegin()
|
|
|
1461 |
while True:
|
|
|
1462 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1463 |
if ftype == TType.STOP:
|
|
|
1464 |
break
|
|
|
1465 |
if fid == 1:
|
|
|
1466 |
if ftype == TType.STRING:
|
|
|
1467 |
self.couponCode = iprot.readString();
|
|
|
1468 |
else:
|
|
|
1469 |
iprot.skip(ftype)
|
|
|
1470 |
elif fid == 2:
|
|
|
1471 |
if ftype == TType.I64:
|
|
|
1472 |
self.userId = iprot.readI64();
|
|
|
1473 |
else:
|
|
|
1474 |
iprot.skip(ftype)
|
|
|
1475 |
else:
|
|
|
1476 |
iprot.skip(ftype)
|
|
|
1477 |
iprot.readFieldEnd()
|
|
|
1478 |
iprot.readStructEnd()
|
|
|
1479 |
|
|
|
1480 |
def write(self, oprot):
|
|
|
1481 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1482 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1483 |
return
|
|
|
1484 |
oprot.writeStructBegin('getCouponUsageCountByUser_args')
|
| 3431 |
rajveer |
1485 |
if self.couponCode is not None:
|
| 1976 |
varun.gupt |
1486 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1487 |
oprot.writeString(self.couponCode)
|
|
|
1488 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1489 |
if self.userId is not None:
|
| 1976 |
varun.gupt |
1490 |
oprot.writeFieldBegin('userId', TType.I64, 2)
|
|
|
1491 |
oprot.writeI64(self.userId)
|
|
|
1492 |
oprot.writeFieldEnd()
|
|
|
1493 |
oprot.writeFieldStop()
|
|
|
1494 |
oprot.writeStructEnd()
|
|
|
1495 |
|
| 3431 |
rajveer |
1496 |
def validate(self):
|
|
|
1497 |
return
|
|
|
1498 |
|
|
|
1499 |
|
| 1976 |
varun.gupt |
1500 |
def __repr__(self):
|
|
|
1501 |
L = ['%s=%r' % (key, value)
|
|
|
1502 |
for key, value in self.__dict__.iteritems()]
|
|
|
1503 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1504 |
|
|
|
1505 |
def __eq__(self, other):
|
|
|
1506 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1507 |
|
|
|
1508 |
def __ne__(self, other):
|
|
|
1509 |
return not (self == other)
|
|
|
1510 |
|
|
|
1511 |
class getCouponUsageCountByUser_result:
|
|
|
1512 |
"""
|
|
|
1513 |
Attributes:
|
|
|
1514 |
- success
|
|
|
1515 |
- pex
|
|
|
1516 |
"""
|
|
|
1517 |
|
|
|
1518 |
thrift_spec = (
|
|
|
1519 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
1520 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1521 |
)
|
|
|
1522 |
|
|
|
1523 |
def __init__(self, success=None, pex=None,):
|
|
|
1524 |
self.success = success
|
|
|
1525 |
self.pex = pex
|
|
|
1526 |
|
|
|
1527 |
def read(self, iprot):
|
|
|
1528 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1529 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1530 |
return
|
|
|
1531 |
iprot.readStructBegin()
|
|
|
1532 |
while True:
|
|
|
1533 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1534 |
if ftype == TType.STOP:
|
|
|
1535 |
break
|
|
|
1536 |
if fid == 0:
|
|
|
1537 |
if ftype == TType.I64:
|
|
|
1538 |
self.success = iprot.readI64();
|
|
|
1539 |
else:
|
|
|
1540 |
iprot.skip(ftype)
|
|
|
1541 |
elif fid == 1:
|
|
|
1542 |
if ftype == TType.STRUCT:
|
|
|
1543 |
self.pex = PromotionException()
|
|
|
1544 |
self.pex.read(iprot)
|
|
|
1545 |
else:
|
|
|
1546 |
iprot.skip(ftype)
|
|
|
1547 |
else:
|
|
|
1548 |
iprot.skip(ftype)
|
|
|
1549 |
iprot.readFieldEnd()
|
|
|
1550 |
iprot.readStructEnd()
|
|
|
1551 |
|
|
|
1552 |
def write(self, oprot):
|
|
|
1553 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1554 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1555 |
return
|
|
|
1556 |
oprot.writeStructBegin('getCouponUsageCountByUser_result')
|
| 3431 |
rajveer |
1557 |
if self.success is not None:
|
| 1976 |
varun.gupt |
1558 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
1559 |
oprot.writeI64(self.success)
|
|
|
1560 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1561 |
if self.pex is not None:
|
| 1976 |
varun.gupt |
1562 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1563 |
self.pex.write(oprot)
|
|
|
1564 |
oprot.writeFieldEnd()
|
|
|
1565 |
oprot.writeFieldStop()
|
|
|
1566 |
oprot.writeStructEnd()
|
|
|
1567 |
|
| 3431 |
rajveer |
1568 |
def validate(self):
|
|
|
1569 |
return
|
|
|
1570 |
|
|
|
1571 |
|
| 1976 |
varun.gupt |
1572 |
def __repr__(self):
|
|
|
1573 |
L = ['%s=%r' % (key, value)
|
|
|
1574 |
for key, value in self.__dict__.iteritems()]
|
|
|
1575 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1576 |
|
|
|
1577 |
def __eq__(self, other):
|
|
|
1578 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1579 |
|
|
|
1580 |
def __ne__(self, other):
|
|
|
1581 |
return not (self == other)
|
|
|
1582 |
|
| 3385 |
varun.gupt |
1583 |
class getActiveCoupons_args:
|
| 1976 |
varun.gupt |
1584 |
|
| 3385 |
varun.gupt |
1585 |
thrift_spec = (
|
|
|
1586 |
)
|
|
|
1587 |
|
|
|
1588 |
def read(self, iprot):
|
|
|
1589 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1590 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1591 |
return
|
|
|
1592 |
iprot.readStructBegin()
|
|
|
1593 |
while True:
|
|
|
1594 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1595 |
if ftype == TType.STOP:
|
|
|
1596 |
break
|
|
|
1597 |
else:
|
|
|
1598 |
iprot.skip(ftype)
|
|
|
1599 |
iprot.readFieldEnd()
|
|
|
1600 |
iprot.readStructEnd()
|
|
|
1601 |
|
|
|
1602 |
def write(self, oprot):
|
|
|
1603 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1604 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1605 |
return
|
|
|
1606 |
oprot.writeStructBegin('getActiveCoupons_args')
|
|
|
1607 |
oprot.writeFieldStop()
|
|
|
1608 |
oprot.writeStructEnd()
|
|
|
1609 |
|
| 3431 |
rajveer |
1610 |
def validate(self):
|
|
|
1611 |
return
|
|
|
1612 |
|
|
|
1613 |
|
| 3385 |
varun.gupt |
1614 |
def __repr__(self):
|
|
|
1615 |
L = ['%s=%r' % (key, value)
|
|
|
1616 |
for key, value in self.__dict__.iteritems()]
|
|
|
1617 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1618 |
|
|
|
1619 |
def __eq__(self, other):
|
|
|
1620 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1621 |
|
|
|
1622 |
def __ne__(self, other):
|
|
|
1623 |
return not (self == other)
|
|
|
1624 |
|
|
|
1625 |
class getActiveCoupons_result:
|
|
|
1626 |
"""
|
|
|
1627 |
Attributes:
|
|
|
1628 |
- success
|
|
|
1629 |
- pex
|
|
|
1630 |
"""
|
|
|
1631 |
|
|
|
1632 |
thrift_spec = (
|
|
|
1633 |
(0, TType.LIST, 'success', (TType.STRUCT,(Coupon, Coupon.thrift_spec)), None, ), # 0
|
|
|
1634 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1635 |
)
|
|
|
1636 |
|
|
|
1637 |
def __init__(self, success=None, pex=None,):
|
|
|
1638 |
self.success = success
|
|
|
1639 |
self.pex = pex
|
|
|
1640 |
|
|
|
1641 |
def read(self, iprot):
|
|
|
1642 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1643 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1644 |
return
|
|
|
1645 |
iprot.readStructBegin()
|
|
|
1646 |
while True:
|
|
|
1647 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1648 |
if ftype == TType.STOP:
|
|
|
1649 |
break
|
|
|
1650 |
if fid == 0:
|
|
|
1651 |
if ftype == TType.LIST:
|
|
|
1652 |
self.success = []
|
|
|
1653 |
(_etype31, _size28) = iprot.readListBegin()
|
|
|
1654 |
for _i32 in xrange(_size28):
|
|
|
1655 |
_elem33 = Coupon()
|
|
|
1656 |
_elem33.read(iprot)
|
|
|
1657 |
self.success.append(_elem33)
|
|
|
1658 |
iprot.readListEnd()
|
|
|
1659 |
else:
|
|
|
1660 |
iprot.skip(ftype)
|
|
|
1661 |
elif fid == 1:
|
|
|
1662 |
if ftype == TType.STRUCT:
|
|
|
1663 |
self.pex = PromotionException()
|
|
|
1664 |
self.pex.read(iprot)
|
|
|
1665 |
else:
|
|
|
1666 |
iprot.skip(ftype)
|
|
|
1667 |
else:
|
|
|
1668 |
iprot.skip(ftype)
|
|
|
1669 |
iprot.readFieldEnd()
|
|
|
1670 |
iprot.readStructEnd()
|
|
|
1671 |
|
|
|
1672 |
def write(self, oprot):
|
|
|
1673 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1674 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1675 |
return
|
|
|
1676 |
oprot.writeStructBegin('getActiveCoupons_result')
|
| 3431 |
rajveer |
1677 |
if self.success is not None:
|
| 3385 |
varun.gupt |
1678 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
1679 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
|
|
1680 |
for iter34 in self.success:
|
|
|
1681 |
iter34.write(oprot)
|
|
|
1682 |
oprot.writeListEnd()
|
|
|
1683 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1684 |
if self.pex is not None:
|
| 3385 |
varun.gupt |
1685 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1686 |
self.pex.write(oprot)
|
|
|
1687 |
oprot.writeFieldEnd()
|
|
|
1688 |
oprot.writeFieldStop()
|
|
|
1689 |
oprot.writeStructEnd()
|
|
|
1690 |
|
| 3431 |
rajveer |
1691 |
def validate(self):
|
|
|
1692 |
return
|
|
|
1693 |
|
|
|
1694 |
|
| 3385 |
varun.gupt |
1695 |
def __repr__(self):
|
|
|
1696 |
L = ['%s=%r' % (key, value)
|
|
|
1697 |
for key, value in self.__dict__.iteritems()]
|
|
|
1698 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1699 |
|
|
|
1700 |
def __eq__(self, other):
|
|
|
1701 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1702 |
|
|
|
1703 |
def __ne__(self, other):
|
|
|
1704 |
return not (self == other)
|
|
|
1705 |
|
|
|
1706 |
class getSuccessfulPaymentCountForCoupon_args:
|
|
|
1707 |
"""
|
|
|
1708 |
Attributes:
|
|
|
1709 |
- couponCode
|
|
|
1710 |
"""
|
|
|
1711 |
|
|
|
1712 |
thrift_spec = (
|
|
|
1713 |
None, # 0
|
|
|
1714 |
(1, TType.STRING, 'couponCode', None, None, ), # 1
|
|
|
1715 |
)
|
|
|
1716 |
|
|
|
1717 |
def __init__(self, couponCode=None,):
|
|
|
1718 |
self.couponCode = couponCode
|
|
|
1719 |
|
|
|
1720 |
def read(self, iprot):
|
|
|
1721 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1722 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1723 |
return
|
|
|
1724 |
iprot.readStructBegin()
|
|
|
1725 |
while True:
|
|
|
1726 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1727 |
if ftype == TType.STOP:
|
|
|
1728 |
break
|
|
|
1729 |
if fid == 1:
|
|
|
1730 |
if ftype == TType.STRING:
|
|
|
1731 |
self.couponCode = iprot.readString();
|
|
|
1732 |
else:
|
|
|
1733 |
iprot.skip(ftype)
|
|
|
1734 |
else:
|
|
|
1735 |
iprot.skip(ftype)
|
|
|
1736 |
iprot.readFieldEnd()
|
|
|
1737 |
iprot.readStructEnd()
|
|
|
1738 |
|
|
|
1739 |
def write(self, oprot):
|
|
|
1740 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1741 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1742 |
return
|
|
|
1743 |
oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_args')
|
| 3431 |
rajveer |
1744 |
if self.couponCode is not None:
|
| 3385 |
varun.gupt |
1745 |
oprot.writeFieldBegin('couponCode', TType.STRING, 1)
|
|
|
1746 |
oprot.writeString(self.couponCode)
|
|
|
1747 |
oprot.writeFieldEnd()
|
|
|
1748 |
oprot.writeFieldStop()
|
|
|
1749 |
oprot.writeStructEnd()
|
|
|
1750 |
|
| 3431 |
rajveer |
1751 |
def validate(self):
|
|
|
1752 |
return
|
|
|
1753 |
|
|
|
1754 |
|
| 3385 |
varun.gupt |
1755 |
def __repr__(self):
|
|
|
1756 |
L = ['%s=%r' % (key, value)
|
|
|
1757 |
for key, value in self.__dict__.iteritems()]
|
|
|
1758 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1759 |
|
|
|
1760 |
def __eq__(self, other):
|
|
|
1761 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1762 |
|
|
|
1763 |
def __ne__(self, other):
|
|
|
1764 |
return not (self == other)
|
|
|
1765 |
|
|
|
1766 |
class getSuccessfulPaymentCountForCoupon_result:
|
|
|
1767 |
"""
|
|
|
1768 |
Attributes:
|
|
|
1769 |
- success
|
|
|
1770 |
- pex
|
|
|
1771 |
"""
|
|
|
1772 |
|
|
|
1773 |
thrift_spec = (
|
|
|
1774 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
1775 |
(1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
|
|
|
1776 |
)
|
|
|
1777 |
|
|
|
1778 |
def __init__(self, success=None, pex=None,):
|
|
|
1779 |
self.success = success
|
|
|
1780 |
self.pex = pex
|
|
|
1781 |
|
|
|
1782 |
def read(self, iprot):
|
|
|
1783 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1784 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1785 |
return
|
|
|
1786 |
iprot.readStructBegin()
|
|
|
1787 |
while True:
|
|
|
1788 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1789 |
if ftype == TType.STOP:
|
|
|
1790 |
break
|
|
|
1791 |
if fid == 0:
|
|
|
1792 |
if ftype == TType.I64:
|
|
|
1793 |
self.success = iprot.readI64();
|
|
|
1794 |
else:
|
|
|
1795 |
iprot.skip(ftype)
|
|
|
1796 |
elif fid == 1:
|
|
|
1797 |
if ftype == TType.STRUCT:
|
|
|
1798 |
self.pex = PromotionException()
|
|
|
1799 |
self.pex.read(iprot)
|
|
|
1800 |
else:
|
|
|
1801 |
iprot.skip(ftype)
|
|
|
1802 |
else:
|
|
|
1803 |
iprot.skip(ftype)
|
|
|
1804 |
iprot.readFieldEnd()
|
|
|
1805 |
iprot.readStructEnd()
|
|
|
1806 |
|
|
|
1807 |
def write(self, oprot):
|
|
|
1808 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1809 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1810 |
return
|
|
|
1811 |
oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_result')
|
| 3431 |
rajveer |
1812 |
if self.success is not None:
|
| 3385 |
varun.gupt |
1813 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
1814 |
oprot.writeI64(self.success)
|
|
|
1815 |
oprot.writeFieldEnd()
|
| 3431 |
rajveer |
1816 |
if self.pex is not None:
|
| 3385 |
varun.gupt |
1817 |
oprot.writeFieldBegin('pex', TType.STRUCT, 1)
|
|
|
1818 |
self.pex.write(oprot)
|
|
|
1819 |
oprot.writeFieldEnd()
|
|
|
1820 |
oprot.writeFieldStop()
|
|
|
1821 |
oprot.writeStructEnd()
|
|
|
1822 |
|
| 3431 |
rajveer |
1823 |
def validate(self):
|
|
|
1824 |
return
|
|
|
1825 |
|
|
|
1826 |
|
| 3385 |
varun.gupt |
1827 |
def __repr__(self):
|
|
|
1828 |
L = ['%s=%r' % (key, value)
|
|
|
1829 |
for key, value in self.__dict__.iteritems()]
|
|
|
1830 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1831 |
|
|
|
1832 |
def __eq__(self, other):
|
|
|
1833 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1834 |
|
|
|
1835 |
def __ne__(self, other):
|
|
|
1836 |
return not (self == other)
|
|
|
1837 |
|
|
|
1838 |
class getRuleDocString_args:
|
|
|
1839 |
"""
|
|
|
1840 |
Attributes:
|
|
|
1841 |
- ruleName
|
|
|
1842 |
"""
|
|
|
1843 |
|
|
|
1844 |
thrift_spec = (
|
|
|
1845 |
None, # 0
|
|
|
1846 |
(1, TType.STRING, 'ruleName', None, None, ), # 1
|
|
|
1847 |
)
|
|
|
1848 |
|
|
|
1849 |
def __init__(self, ruleName=None,):
|
|
|
1850 |
self.ruleName = ruleName
|
|
|
1851 |
|
|
|
1852 |
def read(self, iprot):
|
|
|
1853 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1854 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1855 |
return
|
|
|
1856 |
iprot.readStructBegin()
|
|
|
1857 |
while True:
|
|
|
1858 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1859 |
if ftype == TType.STOP:
|
|
|
1860 |
break
|
|
|
1861 |
if fid == 1:
|
|
|
1862 |
if ftype == TType.STRING:
|
|
|
1863 |
self.ruleName = iprot.readString();
|
|
|
1864 |
else:
|
|
|
1865 |
iprot.skip(ftype)
|
|
|
1866 |
else:
|
|
|
1867 |
iprot.skip(ftype)
|
|
|
1868 |
iprot.readFieldEnd()
|
|
|
1869 |
iprot.readStructEnd()
|
|
|
1870 |
|
|
|
1871 |
def write(self, oprot):
|
|
|
1872 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1873 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1874 |
return
|
|
|
1875 |
oprot.writeStructBegin('getRuleDocString_args')
|
| 3431 |
rajveer |
1876 |
if self.ruleName is not None:
|
| 3385 |
varun.gupt |
1877 |
oprot.writeFieldBegin('ruleName', TType.STRING, 1)
|
|
|
1878 |
oprot.writeString(self.ruleName)
|
|
|
1879 |
oprot.writeFieldEnd()
|
|
|
1880 |
oprot.writeFieldStop()
|
|
|
1881 |
oprot.writeStructEnd()
|
|
|
1882 |
|
| 3431 |
rajveer |
1883 |
def validate(self):
|
|
|
1884 |
return
|
|
|
1885 |
|
|
|
1886 |
|
| 3385 |
varun.gupt |
1887 |
def __repr__(self):
|
|
|
1888 |
L = ['%s=%r' % (key, value)
|
|
|
1889 |
for key, value in self.__dict__.iteritems()]
|
|
|
1890 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1891 |
|
|
|
1892 |
def __eq__(self, other):
|
|
|
1893 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1894 |
|
|
|
1895 |
def __ne__(self, other):
|
|
|
1896 |
return not (self == other)
|
|
|
1897 |
|
|
|
1898 |
class getRuleDocString_result:
|
|
|
1899 |
"""
|
|
|
1900 |
Attributes:
|
|
|
1901 |
- success
|
|
|
1902 |
"""
|
|
|
1903 |
|
|
|
1904 |
thrift_spec = (
|
|
|
1905 |
(0, TType.STRING, 'success', None, None, ), # 0
|
|
|
1906 |
)
|
|
|
1907 |
|
|
|
1908 |
def __init__(self, success=None,):
|
|
|
1909 |
self.success = success
|
|
|
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.STRING:
|
|
|
1922 |
self.success = iprot.readString();
|
|
|
1923 |
else:
|
|
|
1924 |
iprot.skip(ftype)
|
|
|
1925 |
else:
|
|
|
1926 |
iprot.skip(ftype)
|
|
|
1927 |
iprot.readFieldEnd()
|
|
|
1928 |
iprot.readStructEnd()
|
|
|
1929 |
|
|
|
1930 |
def write(self, oprot):
|
|
|
1931 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1932 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1933 |
return
|
|
|
1934 |
oprot.writeStructBegin('getRuleDocString_result')
|
| 3431 |
rajveer |
1935 |
if self.success is not None:
|
| 3385 |
varun.gupt |
1936 |
oprot.writeFieldBegin('success', TType.STRING, 0)
|
|
|
1937 |
oprot.writeString(self.success)
|
|
|
1938 |
oprot.writeFieldEnd()
|
|
|
1939 |
oprot.writeFieldStop()
|
|
|
1940 |
oprot.writeStructEnd()
|
|
|
1941 |
|
| 3431 |
rajveer |
1942 |
def validate(self):
|
|
|
1943 |
return
|
|
|
1944 |
|
|
|
1945 |
|
| 3385 |
varun.gupt |
1946 |
def __repr__(self):
|
|
|
1947 |
L = ['%s=%r' % (key, value)
|
|
|
1948 |
for key, value in self.__dict__.iteritems()]
|
|
|
1949 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1950 |
|
|
|
1951 |
def __eq__(self, other):
|
|
|
1952 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1953 |
|
|
|
1954 |
def __ne__(self, other):
|
|
|
1955 |
return not (self == other)
|