Subversion Repositories SmartDukaan

Rev

Rev 696 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
420 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
19
  def createPayment(self, user_id, cart_id, amount, gateway_id):
20
    """
21
    Parameters:
22
     - user_id
23
     - cart_id
24
     - amount
25
     - gateway_id
26
    """
27
    pass
28
 
29
  def createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):
30
    """
31
    Parameters:
32
     - cart_id
33
     - application_id
34
     - merchant_tx_id
35
     - params
36
    """
37
    pass
38
 
39
  def addCallbackUrl(self, application_id, callback_url, updateIfExisting):
40
    """
41
    Parameters:
42
     - application_id
43
     - callback_url
44
     - updateIfExisting
45
    """
46
    pass
47
 
48
  def getCallbackUrl(self, application_id):
49
    """
50
    Parameters:
51
     - application_id
52
    """
53
    pass
54
 
55
  def getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):
56
    """
57
    Parameters:
58
     - userId
59
     - from_time
60
     - to_time
61
     - status
62
     - gateway_id
63
    """
64
    pass
65
 
66
  def getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):
67
    """
68
    Parameters:
69
     - cartId
70
     - from_time
71
     - to_time
72
     - status
73
     - gateway_id
74
    """
75
    pass
76
 
77
  def getPayments(self, from_time, to_time, status, gateway_id):
78
    """
79
    Parameters:
80
     - from_time
81
     - to_time
82
     - status
83
     - gateway_id
84
    """
85
    pass
86
 
87
  def getPaymentForMerchantId(self, merchant_tx_id):
88
    """
89
    Parameters:
90
     - merchant_tx_id
91
    """
92
    pass
93
 
94
  def changePaymentStatus(self, id, newStatus):
95
    """
96
    Parameters:
97
     - id
98
     - newStatus
99
    """
100
    pass
101
 
102
  def changePaymentRequestStatus(self, request_id, requestStatus):
103
    """
104
    Parameters:
105
     - request_id
106
     - requestStatus
107
    """
108
    pass
109
 
110
  def getPaymentGateways(self, status):
111
    """
112
    Parameters:
113
     - status
114
    """
115
    pass
116
 
117
  def getPaymentGateway(self, id):
118
    """
119
    Parameters:
120
     - id
121
    """
122
    pass
123
 
124
  def changeGatewayStatus(self, id, status):
125
    """
126
    Parameters:
127
     - id
128
     - status
129
    """
130
    pass
131
 
132
  def getPayment(self, id):
133
    """
134
    Parameters:
135
     - id
136
    """
137
    pass
138
 
139
  def addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):
140
    """
141
    Parameters:
142
     - id
143
     - bid
144
     - btxid
145
     - error_code
146
     - session_id
147
     - postdate
148
     - auth_code
149
     - ref_code
150
    """
151
    pass
152
 
153
 
154
class Client(Iface):
155
  def __init__(self, iprot, oprot=None):
156
    self._iprot = self._oprot = iprot
157
    if oprot != None:
158
      self._oprot = oprot
159
    self._seqid = 0
160
 
161
  def createPayment(self, user_id, cart_id, amount, gateway_id):
162
    """
163
    Parameters:
164
     - user_id
165
     - cart_id
166
     - amount
167
     - gateway_id
168
    """
169
    self.send_createPayment(user_id, cart_id, amount, gateway_id)
170
    return self.recv_createPayment()
171
 
172
  def send_createPayment(self, user_id, cart_id, amount, gateway_id):
173
    self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)
174
    args = createPayment_args()
175
    args.user_id = user_id
176
    args.cart_id = cart_id
177
    args.amount = amount
178
    args.gateway_id = gateway_id
179
    args.write(self._oprot)
180
    self._oprot.writeMessageEnd()
181
    self._oprot.trans.flush()
182
 
183
  def recv_createPayment(self, ):
184
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
185
    if mtype == TMessageType.EXCEPTION:
186
      x = TApplicationException()
187
      x.read(self._iprot)
188
      self._iprot.readMessageEnd()
189
      raise x
190
    result = createPayment_result()
191
    result.read(self._iprot)
192
    self._iprot.readMessageEnd()
193
    if result.success != None:
194
      return result.success
195
    if result.pe != None:
196
      raise result.pe
197
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
198
 
199
  def createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):
200
    """
201
    Parameters:
202
     - cart_id
203
     - application_id
204
     - merchant_tx_id
205
     - params
206
    """
207
    self.send_createPaymentRequest(cart_id, application_id, merchant_tx_id, params)
208
    self.recv_createPaymentRequest()
209
 
210
  def send_createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):
211
    self._oprot.writeMessageBegin('createPaymentRequest', TMessageType.CALL, self._seqid)
212
    args = createPaymentRequest_args()
213
    args.cart_id = cart_id
214
    args.application_id = application_id
215
    args.merchant_tx_id = merchant_tx_id
216
    args.params = params
217
    args.write(self._oprot)
218
    self._oprot.writeMessageEnd()
219
    self._oprot.trans.flush()
220
 
221
  def recv_createPaymentRequest(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 = createPaymentRequest_result()
229
    result.read(self._iprot)
230
    self._iprot.readMessageEnd()
231
    if result.pe != None:
232
      raise result.pe
233
    return
234
 
235
  def addCallbackUrl(self, application_id, callback_url, updateIfExisting):
236
    """
237
    Parameters:
238
     - application_id
239
     - callback_url
240
     - updateIfExisting
241
    """
242
    self.send_addCallbackUrl(application_id, callback_url, updateIfExisting)
243
    self.recv_addCallbackUrl()
244
 
245
  def send_addCallbackUrl(self, application_id, callback_url, updateIfExisting):
246
    self._oprot.writeMessageBegin('addCallbackUrl', TMessageType.CALL, self._seqid)
247
    args = addCallbackUrl_args()
248
    args.application_id = application_id
249
    args.callback_url = callback_url
250
    args.updateIfExisting = updateIfExisting
251
    args.write(self._oprot)
252
    self._oprot.writeMessageEnd()
253
    self._oprot.trans.flush()
254
 
255
  def recv_addCallbackUrl(self, ):
256
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
257
    if mtype == TMessageType.EXCEPTION:
258
      x = TApplicationException()
259
      x.read(self._iprot)
260
      self._iprot.readMessageEnd()
261
      raise x
262
    result = addCallbackUrl_result()
263
    result.read(self._iprot)
264
    self._iprot.readMessageEnd()
265
    if result.pe != None:
266
      raise result.pe
267
    return
268
 
269
  def getCallbackUrl(self, application_id):
270
    """
271
    Parameters:
272
     - application_id
273
    """
274
    self.send_getCallbackUrl(application_id)
275
    self.recv_getCallbackUrl()
276
 
277
  def send_getCallbackUrl(self, application_id):
278
    self._oprot.writeMessageBegin('getCallbackUrl', TMessageType.CALL, self._seqid)
279
    args = getCallbackUrl_args()
280
    args.application_id = application_id
281
    args.write(self._oprot)
282
    self._oprot.writeMessageEnd()
283
    self._oprot.trans.flush()
284
 
285
  def recv_getCallbackUrl(self, ):
286
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
287
    if mtype == TMessageType.EXCEPTION:
288
      x = TApplicationException()
289
      x.read(self._iprot)
290
      self._iprot.readMessageEnd()
291
      raise x
292
    result = getCallbackUrl_result()
293
    result.read(self._iprot)
294
    self._iprot.readMessageEnd()
295
    if result.pe != None:
296
      raise result.pe
297
    return
298
 
299
  def getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):
300
    """
301
    Parameters:
302
     - userId
303
     - from_time
304
     - to_time
305
     - status
306
     - gateway_id
307
    """
308
    self.send_getPaymentsForUser(userId, from_time, to_time, status, gateway_id)
309
    return self.recv_getPaymentsForUser()
310
 
311
  def send_getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):
312
    self._oprot.writeMessageBegin('getPaymentsForUser', TMessageType.CALL, self._seqid)
313
    args = getPaymentsForUser_args()
314
    args.userId = userId
315
    args.from_time = from_time
316
    args.to_time = to_time
317
    args.status = status
318
    args.gateway_id = gateway_id
319
    args.write(self._oprot)
320
    self._oprot.writeMessageEnd()
321
    self._oprot.trans.flush()
322
 
323
  def recv_getPaymentsForUser(self, ):
324
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
325
    if mtype == TMessageType.EXCEPTION:
326
      x = TApplicationException()
327
      x.read(self._iprot)
328
      self._iprot.readMessageEnd()
329
      raise x
330
    result = getPaymentsForUser_result()
331
    result.read(self._iprot)
332
    self._iprot.readMessageEnd()
333
    if result.success != None:
334
      return result.success
335
    if result.pe != None:
336
      raise result.pe
337
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
338
 
339
  def getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):
340
    """
341
    Parameters:
342
     - cartId
343
     - from_time
344
     - to_time
345
     - status
346
     - gateway_id
347
    """
348
    self.send_getPaymentsForCart(cartId, from_time, to_time, status, gateway_id)
349
    return self.recv_getPaymentsForCart()
350
 
351
  def send_getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):
352
    self._oprot.writeMessageBegin('getPaymentsForCart', TMessageType.CALL, self._seqid)
353
    args = getPaymentsForCart_args()
354
    args.cartId = cartId
355
    args.from_time = from_time
356
    args.to_time = to_time
357
    args.status = status
358
    args.gateway_id = gateway_id
359
    args.write(self._oprot)
360
    self._oprot.writeMessageEnd()
361
    self._oprot.trans.flush()
362
 
363
  def recv_getPaymentsForCart(self, ):
364
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
365
    if mtype == TMessageType.EXCEPTION:
366
      x = TApplicationException()
367
      x.read(self._iprot)
368
      self._iprot.readMessageEnd()
369
      raise x
370
    result = getPaymentsForCart_result()
371
    result.read(self._iprot)
372
    self._iprot.readMessageEnd()
373
    if result.success != None:
374
      return result.success
375
    if result.pe != None:
376
      raise result.pe
377
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForCart failed: unknown result");
378
 
379
  def getPayments(self, from_time, to_time, status, gateway_id):
380
    """
381
    Parameters:
382
     - from_time
383
     - to_time
384
     - status
385
     - gateway_id
386
    """
387
    self.send_getPayments(from_time, to_time, status, gateway_id)
388
    return self.recv_getPayments()
389
 
390
  def send_getPayments(self, from_time, to_time, status, gateway_id):
391
    self._oprot.writeMessageBegin('getPayments', TMessageType.CALL, self._seqid)
392
    args = getPayments_args()
393
    args.from_time = from_time
394
    args.to_time = to_time
395
    args.status = status
396
    args.gateway_id = gateway_id
397
    args.write(self._oprot)
398
    self._oprot.writeMessageEnd()
399
    self._oprot.trans.flush()
400
 
401
  def recv_getPayments(self, ):
402
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
403
    if mtype == TMessageType.EXCEPTION:
404
      x = TApplicationException()
405
      x.read(self._iprot)
406
      self._iprot.readMessageEnd()
407
      raise x
408
    result = getPayments_result()
409
    result.read(self._iprot)
410
    self._iprot.readMessageEnd()
411
    if result.success != None:
412
      return result.success
413
    if result.pe != None:
414
      raise result.pe
415
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
416
 
417
  def getPaymentForMerchantId(self, merchant_tx_id):
418
    """
419
    Parameters:
420
     - merchant_tx_id
421
    """
422
    self.send_getPaymentForMerchantId(merchant_tx_id)
423
    return self.recv_getPaymentForMerchantId()
424
 
425
  def send_getPaymentForMerchantId(self, merchant_tx_id):
426
    self._oprot.writeMessageBegin('getPaymentForMerchantId', TMessageType.CALL, self._seqid)
427
    args = getPaymentForMerchantId_args()
428
    args.merchant_tx_id = merchant_tx_id
429
    args.write(self._oprot)
430
    self._oprot.writeMessageEnd()
431
    self._oprot.trans.flush()
432
 
433
  def recv_getPaymentForMerchantId(self, ):
434
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
435
    if mtype == TMessageType.EXCEPTION:
436
      x = TApplicationException()
437
      x.read(self._iprot)
438
      self._iprot.readMessageEnd()
439
      raise x
440
    result = getPaymentForMerchantId_result()
441
    result.read(self._iprot)
442
    self._iprot.readMessageEnd()
443
    if result.success != None:
444
      return result.success
445
    if result.pe != None:
446
      raise result.pe
447
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForMerchantId failed: unknown result");
448
 
449
  def changePaymentStatus(self, id, newStatus):
450
    """
451
    Parameters:
452
     - id
453
     - newStatus
454
    """
455
    self.send_changePaymentStatus(id, newStatus)
456
    self.recv_changePaymentStatus()
457
 
458
  def send_changePaymentStatus(self, id, newStatus):
459
    self._oprot.writeMessageBegin('changePaymentStatus', TMessageType.CALL, self._seqid)
460
    args = changePaymentStatus_args()
461
    args.id = id
462
    args.newStatus = newStatus
463
    args.write(self._oprot)
464
    self._oprot.writeMessageEnd()
465
    self._oprot.trans.flush()
466
 
467
  def recv_changePaymentStatus(self, ):
468
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
469
    if mtype == TMessageType.EXCEPTION:
470
      x = TApplicationException()
471
      x.read(self._iprot)
472
      self._iprot.readMessageEnd()
473
      raise x
474
    result = changePaymentStatus_result()
475
    result.read(self._iprot)
476
    self._iprot.readMessageEnd()
477
    if result.pe != None:
478
      raise result.pe
479
    return
480
 
481
  def changePaymentRequestStatus(self, request_id, requestStatus):
482
    """
483
    Parameters:
484
     - request_id
485
     - requestStatus
486
    """
487
    self.send_changePaymentRequestStatus(request_id, requestStatus)
488
    self.recv_changePaymentRequestStatus()
489
 
490
  def send_changePaymentRequestStatus(self, request_id, requestStatus):
491
    self._oprot.writeMessageBegin('changePaymentRequestStatus', TMessageType.CALL, self._seqid)
492
    args = changePaymentRequestStatus_args()
493
    args.request_id = request_id
494
    args.requestStatus = requestStatus
495
    args.write(self._oprot)
496
    self._oprot.writeMessageEnd()
497
    self._oprot.trans.flush()
498
 
499
  def recv_changePaymentRequestStatus(self, ):
500
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
501
    if mtype == TMessageType.EXCEPTION:
502
      x = TApplicationException()
503
      x.read(self._iprot)
504
      self._iprot.readMessageEnd()
505
      raise x
506
    result = changePaymentRequestStatus_result()
507
    result.read(self._iprot)
508
    self._iprot.readMessageEnd()
509
    if result.pe != None:
510
      raise result.pe
511
    return
512
 
513
  def getPaymentGateways(self, status):
514
    """
515
    Parameters:
516
     - status
517
    """
518
    self.send_getPaymentGateways(status)
519
    return self.recv_getPaymentGateways()
520
 
521
  def send_getPaymentGateways(self, status):
522
    self._oprot.writeMessageBegin('getPaymentGateways', TMessageType.CALL, self._seqid)
523
    args = getPaymentGateways_args()
524
    args.status = status
525
    args.write(self._oprot)
526
    self._oprot.writeMessageEnd()
527
    self._oprot.trans.flush()
528
 
529
  def recv_getPaymentGateways(self, ):
530
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
531
    if mtype == TMessageType.EXCEPTION:
532
      x = TApplicationException()
533
      x.read(self._iprot)
534
      self._iprot.readMessageEnd()
535
      raise x
536
    result = getPaymentGateways_result()
537
    result.read(self._iprot)
538
    self._iprot.readMessageEnd()
539
    if result.success != None:
540
      return result.success
541
    if result.pe != None:
542
      raise result.pe
543
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateways failed: unknown result");
544
 
545
  def getPaymentGateway(self, id):
546
    """
547
    Parameters:
548
     - id
549
    """
550
    self.send_getPaymentGateway(id)
551
    return self.recv_getPaymentGateway()
552
 
553
  def send_getPaymentGateway(self, id):
554
    self._oprot.writeMessageBegin('getPaymentGateway', TMessageType.CALL, self._seqid)
555
    args = getPaymentGateway_args()
556
    args.id = id
557
    args.write(self._oprot)
558
    self._oprot.writeMessageEnd()
559
    self._oprot.trans.flush()
560
 
561
  def recv_getPaymentGateway(self, ):
562
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
563
    if mtype == TMessageType.EXCEPTION:
564
      x = TApplicationException()
565
      x.read(self._iprot)
566
      self._iprot.readMessageEnd()
567
      raise x
568
    result = getPaymentGateway_result()
569
    result.read(self._iprot)
570
    self._iprot.readMessageEnd()
571
    if result.success != None:
572
      return result.success
573
    if result.pe != None:
574
      raise result.pe
575
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
576
 
577
  def changeGatewayStatus(self, id, status):
578
    """
579
    Parameters:
580
     - id
581
     - status
582
    """
583
    self.send_changeGatewayStatus(id, status)
584
    self.recv_changeGatewayStatus()
585
 
586
  def send_changeGatewayStatus(self, id, status):
587
    self._oprot.writeMessageBegin('changeGatewayStatus', TMessageType.CALL, self._seqid)
588
    args = changeGatewayStatus_args()
589
    args.id = id
590
    args.status = status
591
    args.write(self._oprot)
592
    self._oprot.writeMessageEnd()
593
    self._oprot.trans.flush()
594
 
595
  def recv_changeGatewayStatus(self, ):
596
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
597
    if mtype == TMessageType.EXCEPTION:
598
      x = TApplicationException()
599
      x.read(self._iprot)
600
      self._iprot.readMessageEnd()
601
      raise x
602
    result = changeGatewayStatus_result()
603
    result.read(self._iprot)
604
    self._iprot.readMessageEnd()
605
    if result.pe != None:
606
      raise result.pe
607
    return
608
 
609
  def getPayment(self, id):
610
    """
611
    Parameters:
612
     - id
613
    """
614
    self.send_getPayment(id)
615
    return self.recv_getPayment()
616
 
617
  def send_getPayment(self, id):
618
    self._oprot.writeMessageBegin('getPayment', TMessageType.CALL, self._seqid)
619
    args = getPayment_args()
620
    args.id = id
621
    args.write(self._oprot)
622
    self._oprot.writeMessageEnd()
623
    self._oprot.trans.flush()
624
 
625
  def recv_getPayment(self, ):
626
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
627
    if mtype == TMessageType.EXCEPTION:
628
      x = TApplicationException()
629
      x.read(self._iprot)
630
      self._iprot.readMessageEnd()
631
      raise x
632
    result = getPayment_result()
633
    result.read(self._iprot)
634
    self._iprot.readMessageEnd()
635
    if result.success != None:
636
      return result.success
637
    if result.pe != None:
638
      raise result.pe
639
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
640
 
641
  def addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):
642
    """
643
    Parameters:
644
     - id
645
     - bid
646
     - btxid
647
     - error_code
648
     - session_id
649
     - postdate
650
     - auth_code
651
     - ref_code
652
    """
653
    self.send_addBankDetails(id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code)
654
    self.recv_addBankDetails()
655
 
656
  def send_addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):
657
    self._oprot.writeMessageBegin('addBankDetails', TMessageType.CALL, self._seqid)
658
    args = addBankDetails_args()
659
    args.id = id
660
    args.bid = bid
661
    args.btxid = btxid
662
    args.error_code = error_code
663
    args.session_id = session_id
664
    args.postdate = postdate
665
    args.auth_code = auth_code
666
    args.ref_code = ref_code
667
    args.write(self._oprot)
668
    self._oprot.writeMessageEnd()
669
    self._oprot.trans.flush()
670
 
671
  def recv_addBankDetails(self, ):
672
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
673
    if mtype == TMessageType.EXCEPTION:
674
      x = TApplicationException()
675
      x.read(self._iprot)
676
      self._iprot.readMessageEnd()
677
      raise x
678
    result = addBankDetails_result()
679
    result.read(self._iprot)
680
    self._iprot.readMessageEnd()
681
    if result.pe != None:
682
      raise result.pe
683
    return
684
 
685
 
686
class Processor(Iface, TProcessor):
687
  def __init__(self, handler):
688
    self._handler = handler
689
    self._processMap = {}
690
    self._processMap["createPayment"] = Processor.process_createPayment
691
    self._processMap["createPaymentRequest"] = Processor.process_createPaymentRequest
692
    self._processMap["addCallbackUrl"] = Processor.process_addCallbackUrl
693
    self._processMap["getCallbackUrl"] = Processor.process_getCallbackUrl
694
    self._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUser
695
    self._processMap["getPaymentsForCart"] = Processor.process_getPaymentsForCart
696
    self._processMap["getPayments"] = Processor.process_getPayments
697
    self._processMap["getPaymentForMerchantId"] = Processor.process_getPaymentForMerchantId
698
    self._processMap["changePaymentStatus"] = Processor.process_changePaymentStatus
699
    self._processMap["changePaymentRequestStatus"] = Processor.process_changePaymentRequestStatus
700
    self._processMap["getPaymentGateways"] = Processor.process_getPaymentGateways
701
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
702
    self._processMap["changeGatewayStatus"] = Processor.process_changeGatewayStatus
703
    self._processMap["getPayment"] = Processor.process_getPayment
704
    self._processMap["addBankDetails"] = Processor.process_addBankDetails
705
 
706
  def process(self, iprot, oprot):
707
    (name, type, seqid) = iprot.readMessageBegin()
708
    if name not in self._processMap:
709
      iprot.skip(TType.STRUCT)
710
      iprot.readMessageEnd()
711
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
712
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
713
      x.write(oprot)
714
      oprot.writeMessageEnd()
715
      oprot.trans.flush()
716
      return
717
    else:
718
      self._processMap[name](self, seqid, iprot, oprot)
719
    return True
720
 
721
  def process_createPayment(self, seqid, iprot, oprot):
722
    args = createPayment_args()
723
    args.read(iprot)
724
    iprot.readMessageEnd()
725
    result = createPayment_result()
726
    try:
727
      result.success = self._handler.createPayment(args.user_id, args.cart_id, args.amount, args.gateway_id)
728
    except PaymentException, pe:
729
      result.pe = pe
730
    oprot.writeMessageBegin("createPayment", TMessageType.REPLY, seqid)
731
    result.write(oprot)
732
    oprot.writeMessageEnd()
733
    oprot.trans.flush()
734
 
735
  def process_createPaymentRequest(self, seqid, iprot, oprot):
736
    args = createPaymentRequest_args()
737
    args.read(iprot)
738
    iprot.readMessageEnd()
739
    result = createPaymentRequest_result()
740
    try:
741
      self._handler.createPaymentRequest(args.cart_id, args.application_id, args.merchant_tx_id, args.params)
742
    except PaymentException, pe:
743
      result.pe = pe
744
    oprot.writeMessageBegin("createPaymentRequest", TMessageType.REPLY, seqid)
745
    result.write(oprot)
746
    oprot.writeMessageEnd()
747
    oprot.trans.flush()
748
 
749
  def process_addCallbackUrl(self, seqid, iprot, oprot):
750
    args = addCallbackUrl_args()
751
    args.read(iprot)
752
    iprot.readMessageEnd()
753
    result = addCallbackUrl_result()
754
    try:
755
      self._handler.addCallbackUrl(args.application_id, args.callback_url, args.updateIfExisting)
756
    except PaymentException, pe:
757
      result.pe = pe
758
    oprot.writeMessageBegin("addCallbackUrl", TMessageType.REPLY, seqid)
759
    result.write(oprot)
760
    oprot.writeMessageEnd()
761
    oprot.trans.flush()
762
 
763
  def process_getCallbackUrl(self, seqid, iprot, oprot):
764
    args = getCallbackUrl_args()
765
    args.read(iprot)
766
    iprot.readMessageEnd()
767
    result = getCallbackUrl_result()
768
    try:
769
      self._handler.getCallbackUrl(args.application_id)
770
    except PaymentException, pe:
771
      result.pe = pe
772
    oprot.writeMessageBegin("getCallbackUrl", TMessageType.REPLY, seqid)
773
    result.write(oprot)
774
    oprot.writeMessageEnd()
775
    oprot.trans.flush()
776
 
777
  def process_getPaymentsForUser(self, seqid, iprot, oprot):
778
    args = getPaymentsForUser_args()
779
    args.read(iprot)
780
    iprot.readMessageEnd()
781
    result = getPaymentsForUser_result()
782
    try:
783
      result.success = self._handler.getPaymentsForUser(args.userId, args.from_time, args.to_time, args.status, args.gateway_id)
784
    except PaymentException, pe:
785
      result.pe = pe
786
    oprot.writeMessageBegin("getPaymentsForUser", TMessageType.REPLY, seqid)
787
    result.write(oprot)
788
    oprot.writeMessageEnd()
789
    oprot.trans.flush()
790
 
791
  def process_getPaymentsForCart(self, seqid, iprot, oprot):
792
    args = getPaymentsForCart_args()
793
    args.read(iprot)
794
    iprot.readMessageEnd()
795
    result = getPaymentsForCart_result()
796
    try:
797
      result.success = self._handler.getPaymentsForCart(args.cartId, args.from_time, args.to_time, args.status, args.gateway_id)
798
    except PaymentException, pe:
799
      result.pe = pe
800
    oprot.writeMessageBegin("getPaymentsForCart", TMessageType.REPLY, seqid)
801
    result.write(oprot)
802
    oprot.writeMessageEnd()
803
    oprot.trans.flush()
804
 
805
  def process_getPayments(self, seqid, iprot, oprot):
806
    args = getPayments_args()
807
    args.read(iprot)
808
    iprot.readMessageEnd()
809
    result = getPayments_result()
810
    try:
811
      result.success = self._handler.getPayments(args.from_time, args.to_time, args.status, args.gateway_id)
812
    except PaymentException, pe:
813
      result.pe = pe
814
    oprot.writeMessageBegin("getPayments", TMessageType.REPLY, seqid)
815
    result.write(oprot)
816
    oprot.writeMessageEnd()
817
    oprot.trans.flush()
818
 
819
  def process_getPaymentForMerchantId(self, seqid, iprot, oprot):
820
    args = getPaymentForMerchantId_args()
821
    args.read(iprot)
822
    iprot.readMessageEnd()
823
    result = getPaymentForMerchantId_result()
824
    try:
825
      result.success = self._handler.getPaymentForMerchantId(args.merchant_tx_id)
826
    except PaymentException, pe:
827
      result.pe = pe
828
    oprot.writeMessageBegin("getPaymentForMerchantId", TMessageType.REPLY, seqid)
829
    result.write(oprot)
830
    oprot.writeMessageEnd()
831
    oprot.trans.flush()
832
 
833
  def process_changePaymentStatus(self, seqid, iprot, oprot):
834
    args = changePaymentStatus_args()
835
    args.read(iprot)
836
    iprot.readMessageEnd()
837
    result = changePaymentStatus_result()
838
    try:
839
      self._handler.changePaymentStatus(args.id, args.newStatus)
840
    except PaymentException, pe:
841
      result.pe = pe
842
    oprot.writeMessageBegin("changePaymentStatus", TMessageType.REPLY, seqid)
843
    result.write(oprot)
844
    oprot.writeMessageEnd()
845
    oprot.trans.flush()
846
 
847
  def process_changePaymentRequestStatus(self, seqid, iprot, oprot):
848
    args = changePaymentRequestStatus_args()
849
    args.read(iprot)
850
    iprot.readMessageEnd()
851
    result = changePaymentRequestStatus_result()
852
    try:
853
      self._handler.changePaymentRequestStatus(args.request_id, args.requestStatus)
854
    except PaymentException, pe:
855
      result.pe = pe
856
    oprot.writeMessageBegin("changePaymentRequestStatus", TMessageType.REPLY, seqid)
857
    result.write(oprot)
858
    oprot.writeMessageEnd()
859
    oprot.trans.flush()
860
 
861
  def process_getPaymentGateways(self, seqid, iprot, oprot):
862
    args = getPaymentGateways_args()
863
    args.read(iprot)
864
    iprot.readMessageEnd()
865
    result = getPaymentGateways_result()
866
    try:
867
      result.success = self._handler.getPaymentGateways(args.status)
868
    except PaymentException, pe:
869
      result.pe = pe
870
    oprot.writeMessageBegin("getPaymentGateways", TMessageType.REPLY, seqid)
871
    result.write(oprot)
872
    oprot.writeMessageEnd()
873
    oprot.trans.flush()
874
 
875
  def process_getPaymentGateway(self, seqid, iprot, oprot):
876
    args = getPaymentGateway_args()
877
    args.read(iprot)
878
    iprot.readMessageEnd()
879
    result = getPaymentGateway_result()
880
    try:
881
      result.success = self._handler.getPaymentGateway(args.id)
882
    except PaymentException, pe:
883
      result.pe = pe
884
    oprot.writeMessageBegin("getPaymentGateway", TMessageType.REPLY, seqid)
885
    result.write(oprot)
886
    oprot.writeMessageEnd()
887
    oprot.trans.flush()
888
 
889
  def process_changeGatewayStatus(self, seqid, iprot, oprot):
890
    args = changeGatewayStatus_args()
891
    args.read(iprot)
892
    iprot.readMessageEnd()
893
    result = changeGatewayStatus_result()
894
    try:
895
      self._handler.changeGatewayStatus(args.id, args.status)
896
    except PaymentException, pe:
897
      result.pe = pe
898
    oprot.writeMessageBegin("changeGatewayStatus", TMessageType.REPLY, seqid)
899
    result.write(oprot)
900
    oprot.writeMessageEnd()
901
    oprot.trans.flush()
902
 
903
  def process_getPayment(self, seqid, iprot, oprot):
904
    args = getPayment_args()
905
    args.read(iprot)
906
    iprot.readMessageEnd()
907
    result = getPayment_result()
908
    try:
909
      result.success = self._handler.getPayment(args.id)
910
    except PaymentException, pe:
911
      result.pe = pe
912
    oprot.writeMessageBegin("getPayment", TMessageType.REPLY, seqid)
913
    result.write(oprot)
914
    oprot.writeMessageEnd()
915
    oprot.trans.flush()
916
 
917
  def process_addBankDetails(self, seqid, iprot, oprot):
918
    args = addBankDetails_args()
919
    args.read(iprot)
920
    iprot.readMessageEnd()
921
    result = addBankDetails_result()
922
    try:
923
      self._handler.addBankDetails(args.id, args.bid, args.btxid, args.error_code, args.session_id, args.postdate, args.auth_code, args.ref_code)
924
    except PaymentException, pe:
925
      result.pe = pe
926
    oprot.writeMessageBegin("addBankDetails", TMessageType.REPLY, seqid)
927
    result.write(oprot)
928
    oprot.writeMessageEnd()
929
    oprot.trans.flush()
930
 
931
 
932
# HELPER FUNCTIONS AND STRUCTURES
933
 
934
class createPayment_args:
935
  """
936
  Attributes:
937
   - user_id
938
   - cart_id
939
   - amount
940
   - gateway_id
941
  """
942
 
943
  thrift_spec = (
944
    None, # 0
945
    (1, TType.I64, 'user_id', None, None, ), # 1
946
    (2, TType.I64, 'cart_id', None, None, ), # 2
947
    (3, TType.DOUBLE, 'amount', None, None, ), # 3
948
    (4, TType.I64, 'gateway_id', None, None, ), # 4
949
  )
950
 
951
  def __init__(self, user_id=None, cart_id=None, amount=None, gateway_id=None,):
952
    self.user_id = user_id
953
    self.cart_id = cart_id
954
    self.amount = amount
955
    self.gateway_id = gateway_id
956
 
957
  def read(self, iprot):
958
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
959
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
960
      return
961
    iprot.readStructBegin()
962
    while True:
963
      (fname, ftype, fid) = iprot.readFieldBegin()
964
      if ftype == TType.STOP:
965
        break
966
      if fid == 1:
967
        if ftype == TType.I64:
968
          self.user_id = iprot.readI64();
969
        else:
970
          iprot.skip(ftype)
971
      elif fid == 2:
972
        if ftype == TType.I64:
973
          self.cart_id = iprot.readI64();
974
        else:
975
          iprot.skip(ftype)
976
      elif fid == 3:
977
        if ftype == TType.DOUBLE:
978
          self.amount = iprot.readDouble();
979
        else:
980
          iprot.skip(ftype)
981
      elif fid == 4:
982
        if ftype == TType.I64:
983
          self.gateway_id = iprot.readI64();
984
        else:
985
          iprot.skip(ftype)
986
      else:
987
        iprot.skip(ftype)
988
      iprot.readFieldEnd()
989
    iprot.readStructEnd()
990
 
991
  def write(self, oprot):
992
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
993
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
994
      return
995
    oprot.writeStructBegin('createPayment_args')
996
    if self.user_id != None:
997
      oprot.writeFieldBegin('user_id', TType.I64, 1)
998
      oprot.writeI64(self.user_id)
999
      oprot.writeFieldEnd()
1000
    if self.cart_id != None:
1001
      oprot.writeFieldBegin('cart_id', TType.I64, 2)
1002
      oprot.writeI64(self.cart_id)
1003
      oprot.writeFieldEnd()
1004
    if self.amount != None:
1005
      oprot.writeFieldBegin('amount', TType.DOUBLE, 3)
1006
      oprot.writeDouble(self.amount)
1007
      oprot.writeFieldEnd()
1008
    if self.gateway_id != None:
1009
      oprot.writeFieldBegin('gateway_id', TType.I64, 4)
1010
      oprot.writeI64(self.gateway_id)
1011
      oprot.writeFieldEnd()
1012
    oprot.writeFieldStop()
1013
    oprot.writeStructEnd()
1014
 
1015
  def __repr__(self):
1016
    L = ['%s=%r' % (key, value)
1017
      for key, value in self.__dict__.iteritems()]
1018
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1019
 
1020
  def __eq__(self, other):
1021
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1022
 
1023
  def __ne__(self, other):
1024
    return not (self == other)
1025
 
1026
class createPayment_result:
1027
  """
1028
  Attributes:
1029
   - success
1030
   - pe
1031
  """
1032
 
1033
  thrift_spec = (
1034
    (0, TType.I64, 'success', None, None, ), # 0
1035
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1036
  )
1037
 
1038
  def __init__(self, success=None, pe=None,):
1039
    self.success = success
1040
    self.pe = pe
1041
 
1042
  def read(self, iprot):
1043
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1044
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1045
      return
1046
    iprot.readStructBegin()
1047
    while True:
1048
      (fname, ftype, fid) = iprot.readFieldBegin()
1049
      if ftype == TType.STOP:
1050
        break
1051
      if fid == 0:
1052
        if ftype == TType.I64:
1053
          self.success = iprot.readI64();
1054
        else:
1055
          iprot.skip(ftype)
1056
      elif fid == 1:
1057
        if ftype == TType.STRUCT:
1058
          self.pe = PaymentException()
1059
          self.pe.read(iprot)
1060
        else:
1061
          iprot.skip(ftype)
1062
      else:
1063
        iprot.skip(ftype)
1064
      iprot.readFieldEnd()
1065
    iprot.readStructEnd()
1066
 
1067
  def write(self, oprot):
1068
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1069
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1070
      return
1071
    oprot.writeStructBegin('createPayment_result')
1072
    if self.success != None:
1073
      oprot.writeFieldBegin('success', TType.I64, 0)
1074
      oprot.writeI64(self.success)
1075
      oprot.writeFieldEnd()
1076
    if self.pe != None:
1077
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1078
      self.pe.write(oprot)
1079
      oprot.writeFieldEnd()
1080
    oprot.writeFieldStop()
1081
    oprot.writeStructEnd()
1082
 
1083
  def __repr__(self):
1084
    L = ['%s=%r' % (key, value)
1085
      for key, value in self.__dict__.iteritems()]
1086
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1087
 
1088
  def __eq__(self, other):
1089
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1090
 
1091
  def __ne__(self, other):
1092
    return not (self == other)
1093
 
1094
class createPaymentRequest_args:
1095
  """
1096
  Attributes:
1097
   - cart_id
1098
   - application_id
1099
   - merchant_tx_id
1100
   - params
1101
  """
1102
 
1103
  thrift_spec = (
1104
    None, # 0
1105
    (1, TType.I64, 'cart_id', None, None, ), # 1
1106
    (2, TType.I64, 'application_id', None, None, ), # 2
1107
    (3, TType.I64, 'merchant_tx_id', None, None, ), # 3
1108
    None, # 4
1109
    (5, TType.LIST, 'params', (TType.STRUCT,(Param, Param.thrift_spec)), None, ), # 5
1110
  )
1111
 
1112
  def __init__(self, cart_id=None, application_id=None, merchant_tx_id=None, params=None,):
1113
    self.cart_id = cart_id
1114
    self.application_id = application_id
1115
    self.merchant_tx_id = merchant_tx_id
1116
    self.params = params
1117
 
1118
  def read(self, iprot):
1119
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1120
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1121
      return
1122
    iprot.readStructBegin()
1123
    while True:
1124
      (fname, ftype, fid) = iprot.readFieldBegin()
1125
      if ftype == TType.STOP:
1126
        break
1127
      if fid == 1:
1128
        if ftype == TType.I64:
1129
          self.cart_id = iprot.readI64();
1130
        else:
1131
          iprot.skip(ftype)
1132
      elif fid == 2:
1133
        if ftype == TType.I64:
1134
          self.application_id = iprot.readI64();
1135
        else:
1136
          iprot.skip(ftype)
1137
      elif fid == 3:
1138
        if ftype == TType.I64:
1139
          self.merchant_tx_id = iprot.readI64();
1140
        else:
1141
          iprot.skip(ftype)
1142
      elif fid == 5:
1143
        if ftype == TType.LIST:
1144
          self.params = []
1145
          (_etype28, _size25) = iprot.readListBegin()
1146
          for _i29 in xrange(_size25):
1147
            _elem30 = Param()
1148
            _elem30.read(iprot)
1149
            self.params.append(_elem30)
1150
          iprot.readListEnd()
1151
        else:
1152
          iprot.skip(ftype)
1153
      else:
1154
        iprot.skip(ftype)
1155
      iprot.readFieldEnd()
1156
    iprot.readStructEnd()
1157
 
1158
  def write(self, oprot):
1159
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1160
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1161
      return
1162
    oprot.writeStructBegin('createPaymentRequest_args')
1163
    if self.cart_id != None:
1164
      oprot.writeFieldBegin('cart_id', TType.I64, 1)
1165
      oprot.writeI64(self.cart_id)
1166
      oprot.writeFieldEnd()
1167
    if self.application_id != None:
1168
      oprot.writeFieldBegin('application_id', TType.I64, 2)
1169
      oprot.writeI64(self.application_id)
1170
      oprot.writeFieldEnd()
1171
    if self.merchant_tx_id != None:
1172
      oprot.writeFieldBegin('merchant_tx_id', TType.I64, 3)
1173
      oprot.writeI64(self.merchant_tx_id)
1174
      oprot.writeFieldEnd()
1175
    if self.params != None:
1176
      oprot.writeFieldBegin('params', TType.LIST, 5)
1177
      oprot.writeListBegin(TType.STRUCT, len(self.params))
1178
      for iter31 in self.params:
1179
        iter31.write(oprot)
1180
      oprot.writeListEnd()
1181
      oprot.writeFieldEnd()
1182
    oprot.writeFieldStop()
1183
    oprot.writeStructEnd()
1184
 
1185
  def __repr__(self):
1186
    L = ['%s=%r' % (key, value)
1187
      for key, value in self.__dict__.iteritems()]
1188
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1189
 
1190
  def __eq__(self, other):
1191
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1192
 
1193
  def __ne__(self, other):
1194
    return not (self == other)
1195
 
1196
class createPaymentRequest_result:
1197
  """
1198
  Attributes:
1199
   - pe
1200
  """
1201
 
1202
  thrift_spec = (
1203
    None, # 0
1204
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1205
  )
1206
 
1207
  def __init__(self, pe=None,):
1208
    self.pe = pe
1209
 
1210
  def read(self, iprot):
1211
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1212
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1213
      return
1214
    iprot.readStructBegin()
1215
    while True:
1216
      (fname, ftype, fid) = iprot.readFieldBegin()
1217
      if ftype == TType.STOP:
1218
        break
1219
      if fid == 1:
1220
        if ftype == TType.STRUCT:
1221
          self.pe = PaymentException()
1222
          self.pe.read(iprot)
1223
        else:
1224
          iprot.skip(ftype)
1225
      else:
1226
        iprot.skip(ftype)
1227
      iprot.readFieldEnd()
1228
    iprot.readStructEnd()
1229
 
1230
  def write(self, oprot):
1231
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1232
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1233
      return
1234
    oprot.writeStructBegin('createPaymentRequest_result')
1235
    if self.pe != None:
1236
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1237
      self.pe.write(oprot)
1238
      oprot.writeFieldEnd()
1239
    oprot.writeFieldStop()
1240
    oprot.writeStructEnd()
1241
 
1242
  def __repr__(self):
1243
    L = ['%s=%r' % (key, value)
1244
      for key, value in self.__dict__.iteritems()]
1245
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1246
 
1247
  def __eq__(self, other):
1248
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1249
 
1250
  def __ne__(self, other):
1251
    return not (self == other)
1252
 
1253
class addCallbackUrl_args:
1254
  """
1255
  Attributes:
1256
   - application_id
1257
   - callback_url
1258
   - updateIfExisting
1259
  """
1260
 
1261
  thrift_spec = (
1262
    None, # 0
1263
    (1, TType.I64, 'application_id', None, None, ), # 1
1264
    (2, TType.STRING, 'callback_url', None, None, ), # 2
1265
    (3, TType.BOOL, 'updateIfExisting', None, None, ), # 3
1266
  )
1267
 
1268
  def __init__(self, application_id=None, callback_url=None, updateIfExisting=None,):
1269
    self.application_id = application_id
1270
    self.callback_url = callback_url
1271
    self.updateIfExisting = updateIfExisting
1272
 
1273
  def read(self, iprot):
1274
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1275
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1276
      return
1277
    iprot.readStructBegin()
1278
    while True:
1279
      (fname, ftype, fid) = iprot.readFieldBegin()
1280
      if ftype == TType.STOP:
1281
        break
1282
      if fid == 1:
1283
        if ftype == TType.I64:
1284
          self.application_id = iprot.readI64();
1285
        else:
1286
          iprot.skip(ftype)
1287
      elif fid == 2:
1288
        if ftype == TType.STRING:
1289
          self.callback_url = iprot.readString();
1290
        else:
1291
          iprot.skip(ftype)
1292
      elif fid == 3:
1293
        if ftype == TType.BOOL:
1294
          self.updateIfExisting = iprot.readBool();
1295
        else:
1296
          iprot.skip(ftype)
1297
      else:
1298
        iprot.skip(ftype)
1299
      iprot.readFieldEnd()
1300
    iprot.readStructEnd()
1301
 
1302
  def write(self, oprot):
1303
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1304
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1305
      return
1306
    oprot.writeStructBegin('addCallbackUrl_args')
1307
    if self.application_id != None:
1308
      oprot.writeFieldBegin('application_id', TType.I64, 1)
1309
      oprot.writeI64(self.application_id)
1310
      oprot.writeFieldEnd()
1311
    if self.callback_url != None:
1312
      oprot.writeFieldBegin('callback_url', TType.STRING, 2)
1313
      oprot.writeString(self.callback_url)
1314
      oprot.writeFieldEnd()
1315
    if self.updateIfExisting != None:
1316
      oprot.writeFieldBegin('updateIfExisting', TType.BOOL, 3)
1317
      oprot.writeBool(self.updateIfExisting)
1318
      oprot.writeFieldEnd()
1319
    oprot.writeFieldStop()
1320
    oprot.writeStructEnd()
1321
 
1322
  def __repr__(self):
1323
    L = ['%s=%r' % (key, value)
1324
      for key, value in self.__dict__.iteritems()]
1325
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1326
 
1327
  def __eq__(self, other):
1328
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1329
 
1330
  def __ne__(self, other):
1331
    return not (self == other)
1332
 
1333
class addCallbackUrl_result:
1334
  """
1335
  Attributes:
1336
   - pe
1337
  """
1338
 
1339
  thrift_spec = (
1340
    None, # 0
1341
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1342
  )
1343
 
1344
  def __init__(self, pe=None,):
1345
    self.pe = pe
1346
 
1347
  def read(self, iprot):
1348
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1349
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1350
      return
1351
    iprot.readStructBegin()
1352
    while True:
1353
      (fname, ftype, fid) = iprot.readFieldBegin()
1354
      if ftype == TType.STOP:
1355
        break
1356
      if fid == 1:
1357
        if ftype == TType.STRUCT:
1358
          self.pe = PaymentException()
1359
          self.pe.read(iprot)
1360
        else:
1361
          iprot.skip(ftype)
1362
      else:
1363
        iprot.skip(ftype)
1364
      iprot.readFieldEnd()
1365
    iprot.readStructEnd()
1366
 
1367
  def write(self, oprot):
1368
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1369
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1370
      return
1371
    oprot.writeStructBegin('addCallbackUrl_result')
1372
    if self.pe != None:
1373
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1374
      self.pe.write(oprot)
1375
      oprot.writeFieldEnd()
1376
    oprot.writeFieldStop()
1377
    oprot.writeStructEnd()
1378
 
1379
  def __repr__(self):
1380
    L = ['%s=%r' % (key, value)
1381
      for key, value in self.__dict__.iteritems()]
1382
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1383
 
1384
  def __eq__(self, other):
1385
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1386
 
1387
  def __ne__(self, other):
1388
    return not (self == other)
1389
 
1390
class getCallbackUrl_args:
1391
  """
1392
  Attributes:
1393
   - application_id
1394
  """
1395
 
1396
  thrift_spec = (
1397
    None, # 0
1398
    (1, TType.I64, 'application_id', None, None, ), # 1
1399
  )
1400
 
1401
  def __init__(self, application_id=None,):
1402
    self.application_id = application_id
1403
 
1404
  def read(self, iprot):
1405
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1406
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1407
      return
1408
    iprot.readStructBegin()
1409
    while True:
1410
      (fname, ftype, fid) = iprot.readFieldBegin()
1411
      if ftype == TType.STOP:
1412
        break
1413
      if fid == 1:
1414
        if ftype == TType.I64:
1415
          self.application_id = iprot.readI64();
1416
        else:
1417
          iprot.skip(ftype)
1418
      else:
1419
        iprot.skip(ftype)
1420
      iprot.readFieldEnd()
1421
    iprot.readStructEnd()
1422
 
1423
  def write(self, oprot):
1424
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1425
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1426
      return
1427
    oprot.writeStructBegin('getCallbackUrl_args')
1428
    if self.application_id != None:
1429
      oprot.writeFieldBegin('application_id', TType.I64, 1)
1430
      oprot.writeI64(self.application_id)
1431
      oprot.writeFieldEnd()
1432
    oprot.writeFieldStop()
1433
    oprot.writeStructEnd()
1434
 
1435
  def __repr__(self):
1436
    L = ['%s=%r' % (key, value)
1437
      for key, value in self.__dict__.iteritems()]
1438
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1439
 
1440
  def __eq__(self, other):
1441
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1442
 
1443
  def __ne__(self, other):
1444
    return not (self == other)
1445
 
1446
class getCallbackUrl_result:
1447
  """
1448
  Attributes:
1449
   - pe
1450
  """
1451
 
1452
  thrift_spec = (
1453
    None, # 0
1454
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1455
  )
1456
 
1457
  def __init__(self, pe=None,):
1458
    self.pe = pe
1459
 
1460
  def read(self, iprot):
1461
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1462
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1463
      return
1464
    iprot.readStructBegin()
1465
    while True:
1466
      (fname, ftype, fid) = iprot.readFieldBegin()
1467
      if ftype == TType.STOP:
1468
        break
1469
      if fid == 1:
1470
        if ftype == TType.STRUCT:
1471
          self.pe = PaymentException()
1472
          self.pe.read(iprot)
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('getCallbackUrl_result')
1485
    if self.pe != None:
1486
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1487
      self.pe.write(oprot)
1488
      oprot.writeFieldEnd()
1489
    oprot.writeFieldStop()
1490
    oprot.writeStructEnd()
1491
 
1492
  def __repr__(self):
1493
    L = ['%s=%r' % (key, value)
1494
      for key, value in self.__dict__.iteritems()]
1495
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1496
 
1497
  def __eq__(self, other):
1498
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1499
 
1500
  def __ne__(self, other):
1501
    return not (self == other)
1502
 
1503
class getPaymentsForUser_args:
1504
  """
1505
  Attributes:
1506
   - userId
1507
   - from_time
1508
   - to_time
1509
   - status
1510
   - gateway_id
1511
  """
1512
 
1513
  thrift_spec = (
1514
    None, # 0
1515
    (1, TType.I64, 'userId', None, None, ), # 1
1516
    (2, TType.I64, 'from_time', None, None, ), # 2
1517
    (3, TType.I64, 'to_time', None, None, ), # 3
1518
    (4, TType.I32, 'status', None, None, ), # 4
1519
    (5, TType.I64, 'gateway_id', None, None, ), # 5
1520
  )
1521
 
1522
  def __init__(self, userId=None, from_time=None, to_time=None, status=None, gateway_id=None,):
1523
    self.userId = userId
1524
    self.from_time = from_time
1525
    self.to_time = to_time
1526
    self.status = status
1527
    self.gateway_id = gateway_id
1528
 
1529
  def read(self, iprot):
1530
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1531
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1532
      return
1533
    iprot.readStructBegin()
1534
    while True:
1535
      (fname, ftype, fid) = iprot.readFieldBegin()
1536
      if ftype == TType.STOP:
1537
        break
1538
      if fid == 1:
1539
        if ftype == TType.I64:
1540
          self.userId = iprot.readI64();
1541
        else:
1542
          iprot.skip(ftype)
1543
      elif fid == 2:
1544
        if ftype == TType.I64:
1545
          self.from_time = iprot.readI64();
1546
        else:
1547
          iprot.skip(ftype)
1548
      elif fid == 3:
1549
        if ftype == TType.I64:
1550
          self.to_time = iprot.readI64();
1551
        else:
1552
          iprot.skip(ftype)
1553
      elif fid == 4:
1554
        if ftype == TType.I32:
1555
          self.status = iprot.readI32();
1556
        else:
1557
          iprot.skip(ftype)
1558
      elif fid == 5:
1559
        if ftype == TType.I64:
1560
          self.gateway_id = iprot.readI64();
1561
        else:
1562
          iprot.skip(ftype)
1563
      else:
1564
        iprot.skip(ftype)
1565
      iprot.readFieldEnd()
1566
    iprot.readStructEnd()
1567
 
1568
  def write(self, oprot):
1569
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1570
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1571
      return
1572
    oprot.writeStructBegin('getPaymentsForUser_args')
1573
    if self.userId != None:
1574
      oprot.writeFieldBegin('userId', TType.I64, 1)
1575
      oprot.writeI64(self.userId)
1576
      oprot.writeFieldEnd()
1577
    if self.from_time != None:
1578
      oprot.writeFieldBegin('from_time', TType.I64, 2)
1579
      oprot.writeI64(self.from_time)
1580
      oprot.writeFieldEnd()
1581
    if self.to_time != None:
1582
      oprot.writeFieldBegin('to_time', TType.I64, 3)
1583
      oprot.writeI64(self.to_time)
1584
      oprot.writeFieldEnd()
1585
    if self.status != None:
1586
      oprot.writeFieldBegin('status', TType.I32, 4)
1587
      oprot.writeI32(self.status)
1588
      oprot.writeFieldEnd()
1589
    if self.gateway_id != None:
1590
      oprot.writeFieldBegin('gateway_id', TType.I64, 5)
1591
      oprot.writeI64(self.gateway_id)
1592
      oprot.writeFieldEnd()
1593
    oprot.writeFieldStop()
1594
    oprot.writeStructEnd()
1595
 
1596
  def __repr__(self):
1597
    L = ['%s=%r' % (key, value)
1598
      for key, value in self.__dict__.iteritems()]
1599
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1600
 
1601
  def __eq__(self, other):
1602
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1603
 
1604
  def __ne__(self, other):
1605
    return not (self == other)
1606
 
1607
class getPaymentsForUser_result:
1608
  """
1609
  Attributes:
1610
   - success
1611
   - pe
1612
  """
1613
 
1614
  thrift_spec = (
1615
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1616
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1617
  )
1618
 
1619
  def __init__(self, success=None, pe=None,):
1620
    self.success = success
1621
    self.pe = pe
1622
 
1623
  def read(self, iprot):
1624
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1625
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1626
      return
1627
    iprot.readStructBegin()
1628
    while True:
1629
      (fname, ftype, fid) = iprot.readFieldBegin()
1630
      if ftype == TType.STOP:
1631
        break
1632
      if fid == 0:
1633
        if ftype == TType.LIST:
1634
          self.success = []
1635
          (_etype35, _size32) = iprot.readListBegin()
1636
          for _i36 in xrange(_size32):
1637
            _elem37 = Payment()
1638
            _elem37.read(iprot)
1639
            self.success.append(_elem37)
1640
          iprot.readListEnd()
1641
        else:
1642
          iprot.skip(ftype)
1643
      elif fid == 1:
1644
        if ftype == TType.STRUCT:
1645
          self.pe = PaymentException()
1646
          self.pe.read(iprot)
1647
        else:
1648
          iprot.skip(ftype)
1649
      else:
1650
        iprot.skip(ftype)
1651
      iprot.readFieldEnd()
1652
    iprot.readStructEnd()
1653
 
1654
  def write(self, oprot):
1655
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1656
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1657
      return
1658
    oprot.writeStructBegin('getPaymentsForUser_result')
1659
    if self.success != None:
1660
      oprot.writeFieldBegin('success', TType.LIST, 0)
1661
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1662
      for iter38 in self.success:
1663
        iter38.write(oprot)
1664
      oprot.writeListEnd()
1665
      oprot.writeFieldEnd()
1666
    if self.pe != None:
1667
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1668
      self.pe.write(oprot)
1669
      oprot.writeFieldEnd()
1670
    oprot.writeFieldStop()
1671
    oprot.writeStructEnd()
1672
 
1673
  def __repr__(self):
1674
    L = ['%s=%r' % (key, value)
1675
      for key, value in self.__dict__.iteritems()]
1676
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1677
 
1678
  def __eq__(self, other):
1679
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1680
 
1681
  def __ne__(self, other):
1682
    return not (self == other)
1683
 
1684
class getPaymentsForCart_args:
1685
  """
1686
  Attributes:
1687
   - cartId
1688
   - from_time
1689
   - to_time
1690
   - status
1691
   - gateway_id
1692
  """
1693
 
1694
  thrift_spec = (
1695
    None, # 0
1696
    (1, TType.I64, 'cartId', None, None, ), # 1
1697
    (2, TType.I64, 'from_time', None, None, ), # 2
1698
    (3, TType.I64, 'to_time', None, None, ), # 3
1699
    (4, TType.I32, 'status', None, None, ), # 4
1700
    (5, TType.I64, 'gateway_id', None, None, ), # 5
1701
  )
1702
 
1703
  def __init__(self, cartId=None, from_time=None, to_time=None, status=None, gateway_id=None,):
1704
    self.cartId = cartId
1705
    self.from_time = from_time
1706
    self.to_time = to_time
1707
    self.status = status
1708
    self.gateway_id = gateway_id
1709
 
1710
  def read(self, iprot):
1711
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1712
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1713
      return
1714
    iprot.readStructBegin()
1715
    while True:
1716
      (fname, ftype, fid) = iprot.readFieldBegin()
1717
      if ftype == TType.STOP:
1718
        break
1719
      if fid == 1:
1720
        if ftype == TType.I64:
1721
          self.cartId = iprot.readI64();
1722
        else:
1723
          iprot.skip(ftype)
1724
      elif fid == 2:
1725
        if ftype == TType.I64:
1726
          self.from_time = iprot.readI64();
1727
        else:
1728
          iprot.skip(ftype)
1729
      elif fid == 3:
1730
        if ftype == TType.I64:
1731
          self.to_time = iprot.readI64();
1732
        else:
1733
          iprot.skip(ftype)
1734
      elif fid == 4:
1735
        if ftype == TType.I32:
1736
          self.status = iprot.readI32();
1737
        else:
1738
          iprot.skip(ftype)
1739
      elif fid == 5:
1740
        if ftype == TType.I64:
1741
          self.gateway_id = iprot.readI64();
1742
        else:
1743
          iprot.skip(ftype)
1744
      else:
1745
        iprot.skip(ftype)
1746
      iprot.readFieldEnd()
1747
    iprot.readStructEnd()
1748
 
1749
  def write(self, oprot):
1750
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1751
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1752
      return
1753
    oprot.writeStructBegin('getPaymentsForCart_args')
1754
    if self.cartId != None:
1755
      oprot.writeFieldBegin('cartId', TType.I64, 1)
1756
      oprot.writeI64(self.cartId)
1757
      oprot.writeFieldEnd()
1758
    if self.from_time != None:
1759
      oprot.writeFieldBegin('from_time', TType.I64, 2)
1760
      oprot.writeI64(self.from_time)
1761
      oprot.writeFieldEnd()
1762
    if self.to_time != None:
1763
      oprot.writeFieldBegin('to_time', TType.I64, 3)
1764
      oprot.writeI64(self.to_time)
1765
      oprot.writeFieldEnd()
1766
    if self.status != None:
1767
      oprot.writeFieldBegin('status', TType.I32, 4)
1768
      oprot.writeI32(self.status)
1769
      oprot.writeFieldEnd()
1770
    if self.gateway_id != None:
1771
      oprot.writeFieldBegin('gateway_id', TType.I64, 5)
1772
      oprot.writeI64(self.gateway_id)
1773
      oprot.writeFieldEnd()
1774
    oprot.writeFieldStop()
1775
    oprot.writeStructEnd()
1776
 
1777
  def __repr__(self):
1778
    L = ['%s=%r' % (key, value)
1779
      for key, value in self.__dict__.iteritems()]
1780
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1781
 
1782
  def __eq__(self, other):
1783
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1784
 
1785
  def __ne__(self, other):
1786
    return not (self == other)
1787
 
1788
class getPaymentsForCart_result:
1789
  """
1790
  Attributes:
1791
   - success
1792
   - pe
1793
  """
1794
 
1795
  thrift_spec = (
1796
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1797
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1798
  )
1799
 
1800
  def __init__(self, success=None, pe=None,):
1801
    self.success = success
1802
    self.pe = pe
1803
 
1804
  def read(self, iprot):
1805
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1806
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1807
      return
1808
    iprot.readStructBegin()
1809
    while True:
1810
      (fname, ftype, fid) = iprot.readFieldBegin()
1811
      if ftype == TType.STOP:
1812
        break
1813
      if fid == 0:
1814
        if ftype == TType.LIST:
1815
          self.success = []
1816
          (_etype42, _size39) = iprot.readListBegin()
1817
          for _i43 in xrange(_size39):
1818
            _elem44 = Payment()
1819
            _elem44.read(iprot)
1820
            self.success.append(_elem44)
1821
          iprot.readListEnd()
1822
        else:
1823
          iprot.skip(ftype)
1824
      elif fid == 1:
1825
        if ftype == TType.STRUCT:
1826
          self.pe = PaymentException()
1827
          self.pe.read(iprot)
1828
        else:
1829
          iprot.skip(ftype)
1830
      else:
1831
        iprot.skip(ftype)
1832
      iprot.readFieldEnd()
1833
    iprot.readStructEnd()
1834
 
1835
  def write(self, oprot):
1836
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1837
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1838
      return
1839
    oprot.writeStructBegin('getPaymentsForCart_result')
1840
    if self.success != None:
1841
      oprot.writeFieldBegin('success', TType.LIST, 0)
1842
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1843
      for iter45 in self.success:
1844
        iter45.write(oprot)
1845
      oprot.writeListEnd()
1846
      oprot.writeFieldEnd()
1847
    if self.pe != None:
1848
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1849
      self.pe.write(oprot)
1850
      oprot.writeFieldEnd()
1851
    oprot.writeFieldStop()
1852
    oprot.writeStructEnd()
1853
 
1854
  def __repr__(self):
1855
    L = ['%s=%r' % (key, value)
1856
      for key, value in self.__dict__.iteritems()]
1857
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1858
 
1859
  def __eq__(self, other):
1860
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1861
 
1862
  def __ne__(self, other):
1863
    return not (self == other)
1864
 
1865
class getPayments_args:
1866
  """
1867
  Attributes:
1868
   - from_time
1869
   - to_time
1870
   - status
1871
   - gateway_id
1872
  """
1873
 
1874
  thrift_spec = (
1875
    None, # 0
1876
    (1, TType.I64, 'from_time', None, None, ), # 1
1877
    (2, TType.I64, 'to_time', None, None, ), # 2
1878
    (3, TType.I32, 'status', None, None, ), # 3
1879
    (4, TType.I64, 'gateway_id', None, None, ), # 4
1880
  )
1881
 
1882
  def __init__(self, from_time=None, to_time=None, status=None, gateway_id=None,):
1883
    self.from_time = from_time
1884
    self.to_time = to_time
1885
    self.status = status
1886
    self.gateway_id = gateway_id
1887
 
1888
  def read(self, iprot):
1889
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1890
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1891
      return
1892
    iprot.readStructBegin()
1893
    while True:
1894
      (fname, ftype, fid) = iprot.readFieldBegin()
1895
      if ftype == TType.STOP:
1896
        break
1897
      if fid == 1:
1898
        if ftype == TType.I64:
1899
          self.from_time = iprot.readI64();
1900
        else:
1901
          iprot.skip(ftype)
1902
      elif fid == 2:
1903
        if ftype == TType.I64:
1904
          self.to_time = iprot.readI64();
1905
        else:
1906
          iprot.skip(ftype)
1907
      elif fid == 3:
1908
        if ftype == TType.I32:
1909
          self.status = iprot.readI32();
1910
        else:
1911
          iprot.skip(ftype)
1912
      elif fid == 4:
1913
        if ftype == TType.I64:
1914
          self.gateway_id = iprot.readI64();
1915
        else:
1916
          iprot.skip(ftype)
1917
      else:
1918
        iprot.skip(ftype)
1919
      iprot.readFieldEnd()
1920
    iprot.readStructEnd()
1921
 
1922
  def write(self, oprot):
1923
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1924
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1925
      return
1926
    oprot.writeStructBegin('getPayments_args')
1927
    if self.from_time != None:
1928
      oprot.writeFieldBegin('from_time', TType.I64, 1)
1929
      oprot.writeI64(self.from_time)
1930
      oprot.writeFieldEnd()
1931
    if self.to_time != None:
1932
      oprot.writeFieldBegin('to_time', TType.I64, 2)
1933
      oprot.writeI64(self.to_time)
1934
      oprot.writeFieldEnd()
1935
    if self.status != None:
1936
      oprot.writeFieldBegin('status', TType.I32, 3)
1937
      oprot.writeI32(self.status)
1938
      oprot.writeFieldEnd()
1939
    if self.gateway_id != None:
1940
      oprot.writeFieldBegin('gateway_id', TType.I64, 4)
1941
      oprot.writeI64(self.gateway_id)
1942
      oprot.writeFieldEnd()
1943
    oprot.writeFieldStop()
1944
    oprot.writeStructEnd()
1945
 
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)
1956
 
1957
class getPayments_result:
1958
  """
1959
  Attributes:
1960
   - success
1961
   - pe
1962
  """
1963
 
1964
  thrift_spec = (
1965
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1966
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1967
  )
1968
 
1969
  def __init__(self, success=None, pe=None,):
1970
    self.success = success
1971
    self.pe = pe
1972
 
1973
  def read(self, iprot):
1974
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1975
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1976
      return
1977
    iprot.readStructBegin()
1978
    while True:
1979
      (fname, ftype, fid) = iprot.readFieldBegin()
1980
      if ftype == TType.STOP:
1981
        break
1982
      if fid == 0:
1983
        if ftype == TType.LIST:
1984
          self.success = []
1985
          (_etype49, _size46) = iprot.readListBegin()
1986
          for _i50 in xrange(_size46):
1987
            _elem51 = Payment()
1988
            _elem51.read(iprot)
1989
            self.success.append(_elem51)
1990
          iprot.readListEnd()
1991
        else:
1992
          iprot.skip(ftype)
1993
      elif fid == 1:
1994
        if ftype == TType.STRUCT:
1995
          self.pe = PaymentException()
1996
          self.pe.read(iprot)
1997
        else:
1998
          iprot.skip(ftype)
1999
      else:
2000
        iprot.skip(ftype)
2001
      iprot.readFieldEnd()
2002
    iprot.readStructEnd()
2003
 
2004
  def write(self, oprot):
2005
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2006
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2007
      return
2008
    oprot.writeStructBegin('getPayments_result')
2009
    if self.success != None:
2010
      oprot.writeFieldBegin('success', TType.LIST, 0)
2011
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2012
      for iter52 in self.success:
2013
        iter52.write(oprot)
2014
      oprot.writeListEnd()
2015
      oprot.writeFieldEnd()
2016
    if self.pe != None:
2017
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2018
      self.pe.write(oprot)
2019
      oprot.writeFieldEnd()
2020
    oprot.writeFieldStop()
2021
    oprot.writeStructEnd()
2022
 
2023
  def __repr__(self):
2024
    L = ['%s=%r' % (key, value)
2025
      for key, value in self.__dict__.iteritems()]
2026
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2027
 
2028
  def __eq__(self, other):
2029
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2030
 
2031
  def __ne__(self, other):
2032
    return not (self == other)
2033
 
2034
class getPaymentForMerchantId_args:
2035
  """
2036
  Attributes:
2037
   - merchant_tx_id
2038
  """
2039
 
2040
  thrift_spec = (
2041
    None, # 0
2042
    (1, TType.I64, 'merchant_tx_id', None, None, ), # 1
2043
  )
2044
 
2045
  def __init__(self, merchant_tx_id=None,):
2046
    self.merchant_tx_id = merchant_tx_id
2047
 
2048
  def read(self, iprot):
2049
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2050
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2051
      return
2052
    iprot.readStructBegin()
2053
    while True:
2054
      (fname, ftype, fid) = iprot.readFieldBegin()
2055
      if ftype == TType.STOP:
2056
        break
2057
      if fid == 1:
2058
        if ftype == TType.I64:
2059
          self.merchant_tx_id = iprot.readI64();
2060
        else:
2061
          iprot.skip(ftype)
2062
      else:
2063
        iprot.skip(ftype)
2064
      iprot.readFieldEnd()
2065
    iprot.readStructEnd()
2066
 
2067
  def write(self, oprot):
2068
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2069
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2070
      return
2071
    oprot.writeStructBegin('getPaymentForMerchantId_args')
2072
    if self.merchant_tx_id != None:
2073
      oprot.writeFieldBegin('merchant_tx_id', TType.I64, 1)
2074
      oprot.writeI64(self.merchant_tx_id)
2075
      oprot.writeFieldEnd()
2076
    oprot.writeFieldStop()
2077
    oprot.writeStructEnd()
2078
 
2079
  def __repr__(self):
2080
    L = ['%s=%r' % (key, value)
2081
      for key, value in self.__dict__.iteritems()]
2082
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2083
 
2084
  def __eq__(self, other):
2085
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2086
 
2087
  def __ne__(self, other):
2088
    return not (self == other)
2089
 
2090
class getPaymentForMerchantId_result:
2091
  """
2092
  Attributes:
2093
   - success
2094
   - pe
2095
  """
2096
 
2097
  thrift_spec = (
2098
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
2099
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2100
  )
2101
 
2102
  def __init__(self, success=None, pe=None,):
2103
    self.success = success
2104
    self.pe = pe
2105
 
2106
  def read(self, iprot):
2107
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2108
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2109
      return
2110
    iprot.readStructBegin()
2111
    while True:
2112
      (fname, ftype, fid) = iprot.readFieldBegin()
2113
      if ftype == TType.STOP:
2114
        break
2115
      if fid == 0:
2116
        if ftype == TType.LIST:
2117
          self.success = []
2118
          (_etype56, _size53) = iprot.readListBegin()
2119
          for _i57 in xrange(_size53):
2120
            _elem58 = Payment()
2121
            _elem58.read(iprot)
2122
            self.success.append(_elem58)
2123
          iprot.readListEnd()
2124
        else:
2125
          iprot.skip(ftype)
2126
      elif fid == 1:
2127
        if ftype == TType.STRUCT:
2128
          self.pe = PaymentException()
2129
          self.pe.read(iprot)
2130
        else:
2131
          iprot.skip(ftype)
2132
      else:
2133
        iprot.skip(ftype)
2134
      iprot.readFieldEnd()
2135
    iprot.readStructEnd()
2136
 
2137
  def write(self, oprot):
2138
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2139
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2140
      return
2141
    oprot.writeStructBegin('getPaymentForMerchantId_result')
2142
    if self.success != None:
2143
      oprot.writeFieldBegin('success', TType.LIST, 0)
2144
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2145
      for iter59 in self.success:
2146
        iter59.write(oprot)
2147
      oprot.writeListEnd()
2148
      oprot.writeFieldEnd()
2149
    if self.pe != None:
2150
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2151
      self.pe.write(oprot)
2152
      oprot.writeFieldEnd()
2153
    oprot.writeFieldStop()
2154
    oprot.writeStructEnd()
2155
 
2156
  def __repr__(self):
2157
    L = ['%s=%r' % (key, value)
2158
      for key, value in self.__dict__.iteritems()]
2159
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2160
 
2161
  def __eq__(self, other):
2162
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2163
 
2164
  def __ne__(self, other):
2165
    return not (self == other)
2166
 
2167
class changePaymentStatus_args:
2168
  """
2169
  Attributes:
2170
   - id
2171
   - newStatus
2172
  """
2173
 
2174
  thrift_spec = (
2175
    None, # 0
2176
    (1, TType.I64, 'id', None, None, ), # 1
2177
    (2, TType.I32, 'newStatus', None, None, ), # 2
2178
  )
2179
 
2180
  def __init__(self, id=None, newStatus=None,):
2181
    self.id = id
2182
    self.newStatus = newStatus
2183
 
2184
  def read(self, iprot):
2185
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2186
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2187
      return
2188
    iprot.readStructBegin()
2189
    while True:
2190
      (fname, ftype, fid) = iprot.readFieldBegin()
2191
      if ftype == TType.STOP:
2192
        break
2193
      if fid == 1:
2194
        if ftype == TType.I64:
2195
          self.id = iprot.readI64();
2196
        else:
2197
          iprot.skip(ftype)
2198
      elif fid == 2:
2199
        if ftype == TType.I32:
2200
          self.newStatus = iprot.readI32();
2201
        else:
2202
          iprot.skip(ftype)
2203
      else:
2204
        iprot.skip(ftype)
2205
      iprot.readFieldEnd()
2206
    iprot.readStructEnd()
2207
 
2208
  def write(self, oprot):
2209
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2210
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2211
      return
2212
    oprot.writeStructBegin('changePaymentStatus_args')
2213
    if self.id != None:
2214
      oprot.writeFieldBegin('id', TType.I64, 1)
2215
      oprot.writeI64(self.id)
2216
      oprot.writeFieldEnd()
2217
    if self.newStatus != None:
2218
      oprot.writeFieldBegin('newStatus', TType.I32, 2)
2219
      oprot.writeI32(self.newStatus)
2220
      oprot.writeFieldEnd()
2221
    oprot.writeFieldStop()
2222
    oprot.writeStructEnd()
2223
 
2224
  def __repr__(self):
2225
    L = ['%s=%r' % (key, value)
2226
      for key, value in self.__dict__.iteritems()]
2227
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2228
 
2229
  def __eq__(self, other):
2230
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2231
 
2232
  def __ne__(self, other):
2233
    return not (self == other)
2234
 
2235
class changePaymentStatus_result:
2236
  """
2237
  Attributes:
2238
   - pe
2239
  """
2240
 
2241
  thrift_spec = (
2242
    None, # 0
2243
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2244
  )
2245
 
2246
  def __init__(self, pe=None,):
2247
    self.pe = pe
2248
 
2249
  def read(self, iprot):
2250
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2251
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2252
      return
2253
    iprot.readStructBegin()
2254
    while True:
2255
      (fname, ftype, fid) = iprot.readFieldBegin()
2256
      if ftype == TType.STOP:
2257
        break
2258
      if fid == 1:
2259
        if ftype == TType.STRUCT:
2260
          self.pe = PaymentException()
2261
          self.pe.read(iprot)
2262
        else:
2263
          iprot.skip(ftype)
2264
      else:
2265
        iprot.skip(ftype)
2266
      iprot.readFieldEnd()
2267
    iprot.readStructEnd()
2268
 
2269
  def write(self, oprot):
2270
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2271
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2272
      return
2273
    oprot.writeStructBegin('changePaymentStatus_result')
2274
    if self.pe != None:
2275
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2276
      self.pe.write(oprot)
2277
      oprot.writeFieldEnd()
2278
    oprot.writeFieldStop()
2279
    oprot.writeStructEnd()
2280
 
2281
  def __repr__(self):
2282
    L = ['%s=%r' % (key, value)
2283
      for key, value in self.__dict__.iteritems()]
2284
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2285
 
2286
  def __eq__(self, other):
2287
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2288
 
2289
  def __ne__(self, other):
2290
    return not (self == other)
2291
 
2292
class changePaymentRequestStatus_args:
2293
  """
2294
  Attributes:
2295
   - request_id
2296
   - requestStatus
2297
  """
2298
 
2299
  thrift_spec = (
2300
    None, # 0
2301
    (1, TType.I64, 'request_id', None, None, ), # 1
2302
    (2, TType.I32, 'requestStatus', None, None, ), # 2
2303
  )
2304
 
2305
  def __init__(self, request_id=None, requestStatus=None,):
2306
    self.request_id = request_id
2307
    self.requestStatus = requestStatus
2308
 
2309
  def read(self, iprot):
2310
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2311
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2312
      return
2313
    iprot.readStructBegin()
2314
    while True:
2315
      (fname, ftype, fid) = iprot.readFieldBegin()
2316
      if ftype == TType.STOP:
2317
        break
2318
      if fid == 1:
2319
        if ftype == TType.I64:
2320
          self.request_id = iprot.readI64();
2321
        else:
2322
          iprot.skip(ftype)
2323
      elif fid == 2:
2324
        if ftype == TType.I32:
2325
          self.requestStatus = iprot.readI32();
2326
        else:
2327
          iprot.skip(ftype)
2328
      else:
2329
        iprot.skip(ftype)
2330
      iprot.readFieldEnd()
2331
    iprot.readStructEnd()
2332
 
2333
  def write(self, oprot):
2334
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2335
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2336
      return
2337
    oprot.writeStructBegin('changePaymentRequestStatus_args')
2338
    if self.request_id != None:
2339
      oprot.writeFieldBegin('request_id', TType.I64, 1)
2340
      oprot.writeI64(self.request_id)
2341
      oprot.writeFieldEnd()
2342
    if self.requestStatus != None:
2343
      oprot.writeFieldBegin('requestStatus', TType.I32, 2)
2344
      oprot.writeI32(self.requestStatus)
2345
      oprot.writeFieldEnd()
2346
    oprot.writeFieldStop()
2347
    oprot.writeStructEnd()
2348
 
2349
  def __repr__(self):
2350
    L = ['%s=%r' % (key, value)
2351
      for key, value in self.__dict__.iteritems()]
2352
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2353
 
2354
  def __eq__(self, other):
2355
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2356
 
2357
  def __ne__(self, other):
2358
    return not (self == other)
2359
 
2360
class changePaymentRequestStatus_result:
2361
  """
2362
  Attributes:
2363
   - pe
2364
  """
2365
 
2366
  thrift_spec = (
2367
    None, # 0
2368
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2369
  )
2370
 
2371
  def __init__(self, pe=None,):
2372
    self.pe = pe
2373
 
2374
  def read(self, iprot):
2375
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2376
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2377
      return
2378
    iprot.readStructBegin()
2379
    while True:
2380
      (fname, ftype, fid) = iprot.readFieldBegin()
2381
      if ftype == TType.STOP:
2382
        break
2383
      if fid == 1:
2384
        if ftype == TType.STRUCT:
2385
          self.pe = PaymentException()
2386
          self.pe.read(iprot)
2387
        else:
2388
          iprot.skip(ftype)
2389
      else:
2390
        iprot.skip(ftype)
2391
      iprot.readFieldEnd()
2392
    iprot.readStructEnd()
2393
 
2394
  def write(self, oprot):
2395
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2396
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2397
      return
2398
    oprot.writeStructBegin('changePaymentRequestStatus_result')
2399
    if self.pe != None:
2400
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2401
      self.pe.write(oprot)
2402
      oprot.writeFieldEnd()
2403
    oprot.writeFieldStop()
2404
    oprot.writeStructEnd()
2405
 
2406
  def __repr__(self):
2407
    L = ['%s=%r' % (key, value)
2408
      for key, value in self.__dict__.iteritems()]
2409
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2410
 
2411
  def __eq__(self, other):
2412
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2413
 
2414
  def __ne__(self, other):
2415
    return not (self == other)
2416
 
2417
class getPaymentGateways_args:
2418
  """
2419
  Attributes:
2420
   - status
2421
  """
2422
 
2423
  thrift_spec = (
2424
    None, # 0
2425
    (1, TType.I32, 'status', None, None, ), # 1
2426
  )
2427
 
2428
  def __init__(self, status=None,):
2429
    self.status = status
2430
 
2431
  def read(self, iprot):
2432
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2433
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2434
      return
2435
    iprot.readStructBegin()
2436
    while True:
2437
      (fname, ftype, fid) = iprot.readFieldBegin()
2438
      if ftype == TType.STOP:
2439
        break
2440
      if fid == 1:
2441
        if ftype == TType.I32:
2442
          self.status = iprot.readI32();
2443
        else:
2444
          iprot.skip(ftype)
2445
      else:
2446
        iprot.skip(ftype)
2447
      iprot.readFieldEnd()
2448
    iprot.readStructEnd()
2449
 
2450
  def write(self, oprot):
2451
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2452
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2453
      return
2454
    oprot.writeStructBegin('getPaymentGateways_args')
2455
    if self.status != None:
2456
      oprot.writeFieldBegin('status', TType.I32, 1)
2457
      oprot.writeI32(self.status)
2458
      oprot.writeFieldEnd()
2459
    oprot.writeFieldStop()
2460
    oprot.writeStructEnd()
2461
 
2462
  def __repr__(self):
2463
    L = ['%s=%r' % (key, value)
2464
      for key, value in self.__dict__.iteritems()]
2465
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2466
 
2467
  def __eq__(self, other):
2468
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2469
 
2470
  def __ne__(self, other):
2471
    return not (self == other)
2472
 
2473
class getPaymentGateways_result:
2474
  """
2475
  Attributes:
2476
   - success
2477
   - pe
2478
  """
2479
 
2480
  thrift_spec = (
2481
    (0, TType.LIST, 'success', (TType.STRUCT,(PaymentGateway, PaymentGateway.thrift_spec)), None, ), # 0
2482
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2483
  )
2484
 
2485
  def __init__(self, success=None, pe=None,):
2486
    self.success = success
2487
    self.pe = pe
2488
 
2489
  def read(self, iprot):
2490
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2491
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2492
      return
2493
    iprot.readStructBegin()
2494
    while True:
2495
      (fname, ftype, fid) = iprot.readFieldBegin()
2496
      if ftype == TType.STOP:
2497
        break
2498
      if fid == 0:
2499
        if ftype == TType.LIST:
2500
          self.success = []
2501
          (_etype63, _size60) = iprot.readListBegin()
2502
          for _i64 in xrange(_size60):
2503
            _elem65 = PaymentGateway()
2504
            _elem65.read(iprot)
2505
            self.success.append(_elem65)
2506
          iprot.readListEnd()
2507
        else:
2508
          iprot.skip(ftype)
2509
      elif fid == 1:
2510
        if ftype == TType.STRUCT:
2511
          self.pe = PaymentException()
2512
          self.pe.read(iprot)
2513
        else:
2514
          iprot.skip(ftype)
2515
      else:
2516
        iprot.skip(ftype)
2517
      iprot.readFieldEnd()
2518
    iprot.readStructEnd()
2519
 
2520
  def write(self, oprot):
2521
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2522
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2523
      return
2524
    oprot.writeStructBegin('getPaymentGateways_result')
2525
    if self.success != None:
2526
      oprot.writeFieldBegin('success', TType.LIST, 0)
2527
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2528
      for iter66 in self.success:
2529
        iter66.write(oprot)
2530
      oprot.writeListEnd()
2531
      oprot.writeFieldEnd()
2532
    if self.pe != None:
2533
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2534
      self.pe.write(oprot)
2535
      oprot.writeFieldEnd()
2536
    oprot.writeFieldStop()
2537
    oprot.writeStructEnd()
2538
 
2539
  def __repr__(self):
2540
    L = ['%s=%r' % (key, value)
2541
      for key, value in self.__dict__.iteritems()]
2542
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2543
 
2544
  def __eq__(self, other):
2545
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2546
 
2547
  def __ne__(self, other):
2548
    return not (self == other)
2549
 
2550
class getPaymentGateway_args:
2551
  """
2552
  Attributes:
2553
   - id
2554
  """
2555
 
2556
  thrift_spec = (
2557
    None, # 0
2558
    (1, TType.I64, 'id', None, None, ), # 1
2559
  )
2560
 
2561
  def __init__(self, id=None,):
2562
    self.id = id
2563
 
2564
  def read(self, iprot):
2565
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2566
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2567
      return
2568
    iprot.readStructBegin()
2569
    while True:
2570
      (fname, ftype, fid) = iprot.readFieldBegin()
2571
      if ftype == TType.STOP:
2572
        break
2573
      if fid == 1:
2574
        if ftype == TType.I64:
2575
          self.id = iprot.readI64();
2576
        else:
2577
          iprot.skip(ftype)
2578
      else:
2579
        iprot.skip(ftype)
2580
      iprot.readFieldEnd()
2581
    iprot.readStructEnd()
2582
 
2583
  def write(self, oprot):
2584
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2585
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2586
      return
2587
    oprot.writeStructBegin('getPaymentGateway_args')
2588
    if self.id != None:
2589
      oprot.writeFieldBegin('id', TType.I64, 1)
2590
      oprot.writeI64(self.id)
2591
      oprot.writeFieldEnd()
2592
    oprot.writeFieldStop()
2593
    oprot.writeStructEnd()
2594
 
2595
  def __repr__(self):
2596
    L = ['%s=%r' % (key, value)
2597
      for key, value in self.__dict__.iteritems()]
2598
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2599
 
2600
  def __eq__(self, other):
2601
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2602
 
2603
  def __ne__(self, other):
2604
    return not (self == other)
2605
 
2606
class getPaymentGateway_result:
2607
  """
2608
  Attributes:
2609
   - success
2610
   - pe
2611
  """
2612
 
2613
  thrift_spec = (
2614
    (0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0
2615
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2616
  )
2617
 
2618
  def __init__(self, success=None, pe=None,):
2619
    self.success = success
2620
    self.pe = pe
2621
 
2622
  def read(self, iprot):
2623
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2624
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2625
      return
2626
    iprot.readStructBegin()
2627
    while True:
2628
      (fname, ftype, fid) = iprot.readFieldBegin()
2629
      if ftype == TType.STOP:
2630
        break
2631
      if fid == 0:
2632
        if ftype == TType.STRUCT:
2633
          self.success = PaymentGateway()
2634
          self.success.read(iprot)
2635
        else:
2636
          iprot.skip(ftype)
2637
      elif fid == 1:
2638
        if ftype == TType.STRUCT:
2639
          self.pe = PaymentException()
2640
          self.pe.read(iprot)
2641
        else:
2642
          iprot.skip(ftype)
2643
      else:
2644
        iprot.skip(ftype)
2645
      iprot.readFieldEnd()
2646
    iprot.readStructEnd()
2647
 
2648
  def write(self, oprot):
2649
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2650
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2651
      return
2652
    oprot.writeStructBegin('getPaymentGateway_result')
2653
    if self.success != None:
2654
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2655
      self.success.write(oprot)
2656
      oprot.writeFieldEnd()
2657
    if self.pe != None:
2658
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2659
      self.pe.write(oprot)
2660
      oprot.writeFieldEnd()
2661
    oprot.writeFieldStop()
2662
    oprot.writeStructEnd()
2663
 
2664
  def __repr__(self):
2665
    L = ['%s=%r' % (key, value)
2666
      for key, value in self.__dict__.iteritems()]
2667
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2668
 
2669
  def __eq__(self, other):
2670
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2671
 
2672
  def __ne__(self, other):
2673
    return not (self == other)
2674
 
2675
class changeGatewayStatus_args:
2676
  """
2677
  Attributes:
2678
   - id
2679
   - status
2680
  """
2681
 
2682
  thrift_spec = (
2683
    None, # 0
2684
    (1, TType.I64, 'id', None, None, ), # 1
2685
    (2, TType.I32, 'status', None, None, ), # 2
2686
  )
2687
 
2688
  def __init__(self, id=None, status=None,):
2689
    self.id = id
2690
    self.status = status
2691
 
2692
  def read(self, iprot):
2693
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2694
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2695
      return
2696
    iprot.readStructBegin()
2697
    while True:
2698
      (fname, ftype, fid) = iprot.readFieldBegin()
2699
      if ftype == TType.STOP:
2700
        break
2701
      if fid == 1:
2702
        if ftype == TType.I64:
2703
          self.id = iprot.readI64();
2704
        else:
2705
          iprot.skip(ftype)
2706
      elif fid == 2:
2707
        if ftype == TType.I32:
2708
          self.status = iprot.readI32();
2709
        else:
2710
          iprot.skip(ftype)
2711
      else:
2712
        iprot.skip(ftype)
2713
      iprot.readFieldEnd()
2714
    iprot.readStructEnd()
2715
 
2716
  def write(self, oprot):
2717
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2718
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2719
      return
2720
    oprot.writeStructBegin('changeGatewayStatus_args')
2721
    if self.id != None:
2722
      oprot.writeFieldBegin('id', TType.I64, 1)
2723
      oprot.writeI64(self.id)
2724
      oprot.writeFieldEnd()
2725
    if self.status != None:
2726
      oprot.writeFieldBegin('status', TType.I32, 2)
2727
      oprot.writeI32(self.status)
2728
      oprot.writeFieldEnd()
2729
    oprot.writeFieldStop()
2730
    oprot.writeStructEnd()
2731
 
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 changeGatewayStatus_result:
2744
  """
2745
  Attributes:
2746
   - pe
2747
  """
2748
 
2749
  thrift_spec = (
2750
    None, # 0
2751
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2752
  )
2753
 
2754
  def __init__(self, pe=None,):
2755
    self.pe = pe
2756
 
2757
  def read(self, iprot):
2758
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2759
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2760
      return
2761
    iprot.readStructBegin()
2762
    while True:
2763
      (fname, ftype, fid) = iprot.readFieldBegin()
2764
      if ftype == TType.STOP:
2765
        break
2766
      if fid == 1:
2767
        if ftype == TType.STRUCT:
2768
          self.pe = PaymentException()
2769
          self.pe.read(iprot)
2770
        else:
2771
          iprot.skip(ftype)
2772
      else:
2773
        iprot.skip(ftype)
2774
      iprot.readFieldEnd()
2775
    iprot.readStructEnd()
2776
 
2777
  def write(self, oprot):
2778
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2779
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2780
      return
2781
    oprot.writeStructBegin('changeGatewayStatus_result')
2782
    if self.pe != None:
2783
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2784
      self.pe.write(oprot)
2785
      oprot.writeFieldEnd()
2786
    oprot.writeFieldStop()
2787
    oprot.writeStructEnd()
2788
 
2789
  def __repr__(self):
2790
    L = ['%s=%r' % (key, value)
2791
      for key, value in self.__dict__.iteritems()]
2792
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2793
 
2794
  def __eq__(self, other):
2795
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2796
 
2797
  def __ne__(self, other):
2798
    return not (self == other)
2799
 
2800
class getPayment_args:
2801
  """
2802
  Attributes:
2803
   - id
2804
  """
2805
 
2806
  thrift_spec = (
2807
    None, # 0
2808
    (1, TType.I64, 'id', None, None, ), # 1
2809
  )
2810
 
2811
  def __init__(self, id=None,):
2812
    self.id = id
2813
 
2814
  def read(self, iprot):
2815
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2816
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2817
      return
2818
    iprot.readStructBegin()
2819
    while True:
2820
      (fname, ftype, fid) = iprot.readFieldBegin()
2821
      if ftype == TType.STOP:
2822
        break
2823
      if fid == 1:
2824
        if ftype == TType.I64:
2825
          self.id = iprot.readI64();
2826
        else:
2827
          iprot.skip(ftype)
2828
      else:
2829
        iprot.skip(ftype)
2830
      iprot.readFieldEnd()
2831
    iprot.readStructEnd()
2832
 
2833
  def write(self, oprot):
2834
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2835
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2836
      return
2837
    oprot.writeStructBegin('getPayment_args')
2838
    if self.id != None:
2839
      oprot.writeFieldBegin('id', TType.I64, 1)
2840
      oprot.writeI64(self.id)
2841
      oprot.writeFieldEnd()
2842
    oprot.writeFieldStop()
2843
    oprot.writeStructEnd()
2844
 
2845
  def __repr__(self):
2846
    L = ['%s=%r' % (key, value)
2847
      for key, value in self.__dict__.iteritems()]
2848
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2849
 
2850
  def __eq__(self, other):
2851
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2852
 
2853
  def __ne__(self, other):
2854
    return not (self == other)
2855
 
2856
class getPayment_result:
2857
  """
2858
  Attributes:
2859
   - success
2860
   - pe
2861
  """
2862
 
2863
  thrift_spec = (
2864
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
2865
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2866
  )
2867
 
2868
  def __init__(self, success=None, pe=None,):
2869
    self.success = success
2870
    self.pe = pe
2871
 
2872
  def read(self, iprot):
2873
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2874
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2875
      return
2876
    iprot.readStructBegin()
2877
    while True:
2878
      (fname, ftype, fid) = iprot.readFieldBegin()
2879
      if ftype == TType.STOP:
2880
        break
2881
      if fid == 0:
2882
        if ftype == TType.STRUCT:
2883
          self.success = Payment()
2884
          self.success.read(iprot)
2885
        else:
2886
          iprot.skip(ftype)
2887
      elif fid == 1:
2888
        if ftype == TType.STRUCT:
2889
          self.pe = PaymentException()
2890
          self.pe.read(iprot)
2891
        else:
2892
          iprot.skip(ftype)
2893
      else:
2894
        iprot.skip(ftype)
2895
      iprot.readFieldEnd()
2896
    iprot.readStructEnd()
2897
 
2898
  def write(self, oprot):
2899
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2900
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2901
      return
2902
    oprot.writeStructBegin('getPayment_result')
2903
    if self.success != None:
2904
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2905
      self.success.write(oprot)
2906
      oprot.writeFieldEnd()
2907
    if self.pe != None:
2908
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2909
      self.pe.write(oprot)
2910
      oprot.writeFieldEnd()
2911
    oprot.writeFieldStop()
2912
    oprot.writeStructEnd()
2913
 
2914
  def __repr__(self):
2915
    L = ['%s=%r' % (key, value)
2916
      for key, value in self.__dict__.iteritems()]
2917
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2918
 
2919
  def __eq__(self, other):
2920
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2921
 
2922
  def __ne__(self, other):
2923
    return not (self == other)
2924
 
2925
class addBankDetails_args:
2926
  """
2927
  Attributes:
2928
   - id
2929
   - bid
2930
   - btxid
2931
   - error_code
2932
   - session_id
2933
   - postdate
2934
   - auth_code
2935
   - ref_code
2936
  """
2937
 
2938
  thrift_spec = (
2939
    None, # 0
2940
    (1, TType.I64, 'id', None, None, ), # 1
2941
    (2, TType.STRING, 'bid', None, None, ), # 2
2942
    (3, TType.STRING, 'btxid', None, None, ), # 3
2943
    (4, TType.STRING, 'error_code', None, None, ), # 4
2944
    (5, TType.STRING, 'session_id', None, None, ), # 5
2945
    (6, TType.STRING, 'postdate', None, None, ), # 6
2946
    (7, TType.STRING, 'auth_code', None, None, ), # 7
2947
    (8, TType.STRING, 'ref_code', None, None, ), # 8
2948
  )
2949
 
2950
  def __init__(self, id=None, bid=None, btxid=None, error_code=None, session_id=None, postdate=None, auth_code=None, ref_code=None,):
2951
    self.id = id
2952
    self.bid = bid
2953
    self.btxid = btxid
2954
    self.error_code = error_code
2955
    self.session_id = session_id
2956
    self.postdate = postdate
2957
    self.auth_code = auth_code
2958
    self.ref_code = ref_code
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 == 1:
2970
        if ftype == TType.I64:
2971
          self.id = iprot.readI64();
2972
        else:
2973
          iprot.skip(ftype)
2974
      elif fid == 2:
2975
        if ftype == TType.STRING:
2976
          self.bid = iprot.readString();
2977
        else:
2978
          iprot.skip(ftype)
2979
      elif fid == 3:
2980
        if ftype == TType.STRING:
2981
          self.btxid = iprot.readString();
2982
        else:
2983
          iprot.skip(ftype)
2984
      elif fid == 4:
2985
        if ftype == TType.STRING:
2986
          self.error_code = iprot.readString();
2987
        else:
2988
          iprot.skip(ftype)
2989
      elif fid == 5:
2990
        if ftype == TType.STRING:
2991
          self.session_id = iprot.readString();
2992
        else:
2993
          iprot.skip(ftype)
2994
      elif fid == 6:
2995
        if ftype == TType.STRING:
2996
          self.postdate = iprot.readString();
2997
        else:
2998
          iprot.skip(ftype)
2999
      elif fid == 7:
3000
        if ftype == TType.STRING:
3001
          self.auth_code = iprot.readString();
3002
        else:
3003
          iprot.skip(ftype)
3004
      elif fid == 8:
3005
        if ftype == TType.STRING:
3006
          self.ref_code = iprot.readString();
3007
        else:
3008
          iprot.skip(ftype)
3009
      else:
3010
        iprot.skip(ftype)
3011
      iprot.readFieldEnd()
3012
    iprot.readStructEnd()
3013
 
3014
  def write(self, oprot):
3015
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3016
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3017
      return
3018
    oprot.writeStructBegin('addBankDetails_args')
3019
    if self.id != None:
3020
      oprot.writeFieldBegin('id', TType.I64, 1)
3021
      oprot.writeI64(self.id)
3022
      oprot.writeFieldEnd()
3023
    if self.bid != None:
3024
      oprot.writeFieldBegin('bid', TType.STRING, 2)
3025
      oprot.writeString(self.bid)
3026
      oprot.writeFieldEnd()
3027
    if self.btxid != None:
3028
      oprot.writeFieldBegin('btxid', TType.STRING, 3)
3029
      oprot.writeString(self.btxid)
3030
      oprot.writeFieldEnd()
3031
    if self.error_code != None:
3032
      oprot.writeFieldBegin('error_code', TType.STRING, 4)
3033
      oprot.writeString(self.error_code)
3034
      oprot.writeFieldEnd()
3035
    if self.session_id != None:
3036
      oprot.writeFieldBegin('session_id', TType.STRING, 5)
3037
      oprot.writeString(self.session_id)
3038
      oprot.writeFieldEnd()
3039
    if self.postdate != None:
3040
      oprot.writeFieldBegin('postdate', TType.STRING, 6)
3041
      oprot.writeString(self.postdate)
3042
      oprot.writeFieldEnd()
3043
    if self.auth_code != None:
3044
      oprot.writeFieldBegin('auth_code', TType.STRING, 7)
3045
      oprot.writeString(self.auth_code)
3046
      oprot.writeFieldEnd()
3047
    if self.ref_code != None:
3048
      oprot.writeFieldBegin('ref_code', TType.STRING, 8)
3049
      oprot.writeString(self.ref_code)
3050
      oprot.writeFieldEnd()
3051
    oprot.writeFieldStop()
3052
    oprot.writeStructEnd()
3053
 
3054
  def __repr__(self):
3055
    L = ['%s=%r' % (key, value)
3056
      for key, value in self.__dict__.iteritems()]
3057
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3058
 
3059
  def __eq__(self, other):
3060
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3061
 
3062
  def __ne__(self, other):
3063
    return not (self == other)
3064
 
3065
class addBankDetails_result:
3066
  """
3067
  Attributes:
3068
   - pe
3069
  """
3070
 
3071
  thrift_spec = (
3072
    None, # 0
3073
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3074
  )
3075
 
3076
  def __init__(self, pe=None,):
3077
    self.pe = pe
3078
 
3079
  def read(self, iprot):
3080
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3081
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3082
      return
3083
    iprot.readStructBegin()
3084
    while True:
3085
      (fname, ftype, fid) = iprot.readFieldBegin()
3086
      if ftype == TType.STOP:
3087
        break
3088
      if fid == 1:
3089
        if ftype == TType.STRUCT:
3090
          self.pe = PaymentException()
3091
          self.pe.read(iprot)
3092
        else:
3093
          iprot.skip(ftype)
3094
      else:
3095
        iprot.skip(ftype)
3096
      iprot.readFieldEnd()
3097
    iprot.readStructEnd()
3098
 
3099
  def write(self, oprot):
3100
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3101
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3102
      return
3103
    oprot.writeStructBegin('addBankDetails_result')
3104
    if self.pe != None:
3105
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3106
      self.pe.write(oprot)
3107
      oprot.writeFieldEnd()
3108
    oprot.writeFieldStop()
3109
    oprot.writeStructEnd()
3110
 
3111
  def __repr__(self):
3112
    L = ['%s=%r' % (key, value)
3113
      for key, value in self.__dict__.iteritems()]
3114
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3115
 
3116
  def __eq__(self, other):
3117
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3118
 
3119
  def __ne__(self, other):
3120
    return not (self == other)
3121
 
3122