Subversion Repositories SmartDukaan

Rev

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