Subversion Repositories SmartDukaan

Rev

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