Subversion Repositories SmartDukaan

Rev

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