Subversion Repositories SmartDukaan

Rev

Rev 2685 | Rev 2708 | 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
    """
2062 ankur.sing 54
    get all payments for user. If gatewayId is 0, then it is ignored while filtering.
696 rajveer 55
 
1856 chandransh 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
 
1731 ankur.sing 116
  def getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 117
    """
1731 ankur.sing 118
    Returns the minimum and maximum amounts among successful payments.
119
    List contains two double values, first minimum and second maximum amount.
1627 ankur.sing 120
    """
121
    pass
420 ashish 122
 
2559 chandransh 123
  def updateAndCaptureEbsPayment(self, paymentParams):
124
    """
125
    Update the authorization attributes of the payment and attempt to capture it in case it was authorized.
126
    If either the authorization failed or the capture attempt failed, the payment is marked as failed.
127
 
128
    Parameters:
129
     - paymentParams
130
    """
131
    pass
1627 ankur.sing 132
 
2559 chandransh 133
  def captureHdfcPayment(self, merchantPaymentId):
134
    """
135
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
136
 
137
    Parameters:
138
     - merchantPaymentId
139
    """
140
    pass
141
 
142
  def initializeHdfcPayment(self, merchantPaymentId):
143
    """
144
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
145
    In case of any processing error, an exception is raised.
146
 
147
    Parameters:
148
     - merchantPaymentId
149
    """
150
    pass
151
 
2685 chandransh 152
  def createRefund(self, orderId, merchantTxnId, amount):
153
    """
154
    Create a refund of the given amount corresponding to the given order to be processed through the same
155
    payment gateway which processed the payment for the corresponding transaction.
2687 chandransh 156
    Returns the id of the newly created Refund.
2685 chandransh 157
 
158
    Parameters:
159
     - orderId
160
     - merchantTxnId
161
     - amount
162
    """
163
    pass
2559 chandransh 164
 
2685 chandransh 165
 
420 ashish 166
class Client(Iface):
167
  def __init__(self, iprot, oprot=None):
168
    self._iprot = self._oprot = iprot
169
    if oprot != None:
170
      self._oprot = oprot
171
    self._seqid = 0
172
 
765 rajveer 173
  def closeSession(self, ):
174
    """
175
    For closing the open session in sqlalchemy
176
    """
177
    self.send_closeSession()
178
    self.recv_closeSession()
179
 
180
  def send_closeSession(self, ):
181
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
182
    args = closeSession_args()
183
    args.write(self._oprot)
184
    self._oprot.writeMessageEnd()
185
    self._oprot.trans.flush()
186
 
187
  def recv_closeSession(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 = closeSession_result()
195
    result.read(self._iprot)
196
    self._iprot.readMessageEnd()
197
    return
198
 
696 rajveer 199
  def createPayment(self, userId, amount, gatewayId, txnId):
420 ashish 200
    """
696 rajveer 201
    create a new payment and return payment id, throws an exception if gateway is not active
202
 
203
 
420 ashish 204
    Parameters:
696 rajveer 205
     - userId
420 ashish 206
     - amount
696 rajveer 207
     - gatewayId
208
     - txnId
420 ashish 209
    """
696 rajveer 210
    self.send_createPayment(userId, amount, gatewayId, txnId)
420 ashish 211
    return self.recv_createPayment()
212
 
696 rajveer 213
  def send_createPayment(self, userId, amount, gatewayId, txnId):
420 ashish 214
    self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)
215
    args = createPayment_args()
696 rajveer 216
    args.userId = userId
420 ashish 217
    args.amount = amount
696 rajveer 218
    args.gatewayId = gatewayId
219
    args.txnId = txnId
420 ashish 220
    args.write(self._oprot)
221
    self._oprot.writeMessageEnd()
222
    self._oprot.trans.flush()
223
 
224
  def recv_createPayment(self, ):
225
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
226
    if mtype == TMessageType.EXCEPTION:
227
      x = TApplicationException()
228
      x.read(self._iprot)
229
      self._iprot.readMessageEnd()
230
      raise x
231
    result = createPayment_result()
232
    result.read(self._iprot)
233
    self._iprot.readMessageEnd()
234
    if result.success != None:
235
      return result.success
236
    if result.pe != None:
237
      raise result.pe
238
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
239
 
696 rajveer 240
  def getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):
420 ashish 241
    """
696 rajveer 242
    get payment for user. If status and gateway are null, it is ignored. Same for times as well.
243
 
244
 
420 ashish 245
    Parameters:
246
     - userId
696 rajveer 247
     - fromTime
248
     - toTime
420 ashish 249
     - status
696 rajveer 250
     - gatewayId
420 ashish 251
    """
696 rajveer 252
    self.send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId)
420 ashish 253
    return self.recv_getPaymentsForUser()
254
 
696 rajveer 255
  def send_getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):
420 ashish 256
    self._oprot.writeMessageBegin('getPaymentsForUser', TMessageType.CALL, self._seqid)
257
    args = getPaymentsForUser_args()
258
    args.userId = userId
696 rajveer 259
    args.fromTime = fromTime
260
    args.toTime = toTime
420 ashish 261
    args.status = status
696 rajveer 262
    args.gatewayId = gatewayId
420 ashish 263
    args.write(self._oprot)
264
    self._oprot.writeMessageEnd()
265
    self._oprot.trans.flush()
266
 
267
  def recv_getPaymentsForUser(self, ):
268
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
269
    if mtype == TMessageType.EXCEPTION:
270
      x = TApplicationException()
271
      x.read(self._iprot)
272
      self._iprot.readMessageEnd()
273
      raise x
274
    result = getPaymentsForUser_result()
275
    result.read(self._iprot)
276
    self._iprot.readMessageEnd()
277
    if result.success != None:
278
      return result.success
279
    if result.pe != None:
280
      raise result.pe
281
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
282
 
696 rajveer 283
  def getPayments(self, fromTime, toTime, status, gatewayId):
420 ashish 284
    """
2062 ankur.sing 285
    get all payments for user. If gatewayId is 0, then it is ignored while filtering.
696 rajveer 286
 
1856 chandransh 287
 
420 ashish 288
    Parameters:
696 rajveer 289
     - fromTime
290
     - toTime
420 ashish 291
     - status
696 rajveer 292
     - gatewayId
420 ashish 293
    """
696 rajveer 294
    self.send_getPayments(fromTime, toTime, status, gatewayId)
420 ashish 295
    return self.recv_getPayments()
296
 
696 rajveer 297
  def send_getPayments(self, fromTime, toTime, status, gatewayId):
420 ashish 298
    self._oprot.writeMessageBegin('getPayments', TMessageType.CALL, self._seqid)
299
    args = getPayments_args()
696 rajveer 300
    args.fromTime = fromTime
301
    args.toTime = toTime
420 ashish 302
    args.status = status
696 rajveer 303
    args.gatewayId = gatewayId
420 ashish 304
    args.write(self._oprot)
305
    self._oprot.writeMessageEnd()
306
    self._oprot.trans.flush()
307
 
308
  def recv_getPayments(self, ):
309
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
310
    if mtype == TMessageType.EXCEPTION:
311
      x = TApplicationException()
312
      x.read(self._iprot)
313
      self._iprot.readMessageEnd()
314
      raise x
315
    result = getPayments_result()
316
    result.read(self._iprot)
317
    self._iprot.readMessageEnd()
318
    if result.success != None:
319
      return result.success
320
    if result.pe != None:
321
      raise result.pe
322
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
323
 
324
  def getPaymentGateway(self, id):
325
    """
696 rajveer 326
    Get a particular gateway
327
 
328
 
420 ashish 329
    Parameters:
330
     - id
331
    """
332
    self.send_getPaymentGateway(id)
333
    return self.recv_getPaymentGateway()
334
 
335
  def send_getPaymentGateway(self, id):
336
    self._oprot.writeMessageBegin('getPaymentGateway', TMessageType.CALL, self._seqid)
337
    args = getPaymentGateway_args()
338
    args.id = id
339
    args.write(self._oprot)
340
    self._oprot.writeMessageEnd()
341
    self._oprot.trans.flush()
342
 
343
  def recv_getPaymentGateway(self, ):
344
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
345
    if mtype == TMessageType.EXCEPTION:
346
      x = TApplicationException()
347
      x.read(self._iprot)
348
      self._iprot.readMessageEnd()
349
      raise x
350
    result = getPaymentGateway_result()
351
    result.read(self._iprot)
352
    self._iprot.readMessageEnd()
353
    if result.success != None:
354
      return result.success
355
    if result.pe != None:
356
      raise result.pe
357
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
358
 
696 rajveer 359
  def getPayment(self, id):
420 ashish 360
    """
696 rajveer 361
    Get a particular payment info
362
 
363
 
420 ashish 364
    Parameters:
365
     - id
366
    """
696 rajveer 367
    self.send_getPayment(id)
368
    return self.recv_getPayment()
420 ashish 369
 
696 rajveer 370
  def send_getPayment(self, id):
371
    self._oprot.writeMessageBegin('getPayment', TMessageType.CALL, self._seqid)
372
    args = getPayment_args()
420 ashish 373
    args.id = id
374
    args.write(self._oprot)
375
    self._oprot.writeMessageEnd()
376
    self._oprot.trans.flush()
377
 
696 rajveer 378
  def recv_getPayment(self, ):
420 ashish 379
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
380
    if mtype == TMessageType.EXCEPTION:
381
      x = TApplicationException()
382
      x.read(self._iprot)
383
      self._iprot.readMessageEnd()
384
      raise x
696 rajveer 385
    result = getPayment_result()
420 ashish 386
    result.read(self._iprot)
387
    self._iprot.readMessageEnd()
696 rajveer 388
    if result.success != None:
389
      return result.success
420 ashish 390
    if result.pe != None:
391
      raise result.pe
696 rajveer 392
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 393
 
696 rajveer 394
  def getPaymentForTxnId(self, txnId):
420 ashish 395
    """
696 rajveer 396
    Get a particular payment for a transaction. Will raise exception.
397
 
398
 
420 ashish 399
    Parameters:
696 rajveer 400
     - txnId
420 ashish 401
    """
696 rajveer 402
    self.send_getPaymentForTxnId(txnId)
403
    return self.recv_getPaymentForTxnId()
420 ashish 404
 
696 rajveer 405
  def send_getPaymentForTxnId(self, txnId):
406
    self._oprot.writeMessageBegin('getPaymentForTxnId', TMessageType.CALL, self._seqid)
407
    args = getPaymentForTxnId_args()
408
    args.txnId = txnId
420 ashish 409
    args.write(self._oprot)
410
    self._oprot.writeMessageEnd()
411
    self._oprot.trans.flush()
412
 
696 rajveer 413
  def recv_getPaymentForTxnId(self, ):
420 ashish 414
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
415
    if mtype == TMessageType.EXCEPTION:
416
      x = TApplicationException()
417
      x.read(self._iprot)
418
      self._iprot.readMessageEnd()
419
      raise x
696 rajveer 420
    result = getPaymentForTxnId_result()
420 ashish 421
    result.read(self._iprot)
422
    self._iprot.readMessageEnd()
423
    if result.success != None:
424
      return result.success
425
    if result.pe != None:
426
      raise result.pe
696 rajveer 427
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 428
 
1120 rajveer 429
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
420 ashish 430
    """
696 rajveer 431
    mark payment successful and store parameters
432
 
433
 
420 ashish 434
    Parameters:
435
     - id
696 rajveer 436
     - gatewayPaymentId
437
     - sessionId
438
     - gatewayTxnStatus
439
     - description
440
     - gatewayTxnId
441
     - authCode
442
     - referenceCode
443
     - errorCode
444
     - status
1120 rajveer 445
     - gatewayTxnDate
696 rajveer 446
     - attributes
420 ashish 447
    """
1120 rajveer 448
    self.send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes)
696 rajveer 449
    return self.recv_updatePaymentDetails()
420 ashish 450
 
1120 rajveer 451
  def send_updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
696 rajveer 452
    self._oprot.writeMessageBegin('updatePaymentDetails', TMessageType.CALL, self._seqid)
453
    args = updatePaymentDetails_args()
420 ashish 454
    args.id = id
696 rajveer 455
    args.gatewayPaymentId = gatewayPaymentId
456
    args.sessionId = sessionId
457
    args.gatewayTxnStatus = gatewayTxnStatus
458
    args.description = description
459
    args.gatewayTxnId = gatewayTxnId
460
    args.authCode = authCode
461
    args.referenceCode = referenceCode
462
    args.errorCode = errorCode
463
    args.status = status
1120 rajveer 464
    args.gatewayTxnDate = gatewayTxnDate
696 rajveer 465
    args.attributes = attributes
420 ashish 466
    args.write(self._oprot)
467
    self._oprot.writeMessageEnd()
468
    self._oprot.trans.flush()
469
 
696 rajveer 470
  def recv_updatePaymentDetails(self, ):
420 ashish 471
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
472
    if mtype == TMessageType.EXCEPTION:
473
      x = TApplicationException()
474
      x.read(self._iprot)
475
      self._iprot.readMessageEnd()
476
      raise x
696 rajveer 477
    result = updatePaymentDetails_result()
420 ashish 478
    result.read(self._iprot)
479
    self._iprot.readMessageEnd()
696 rajveer 480
    if result.success != None:
481
      return result.success
420 ashish 482
    if result.pe != None:
483
      raise result.pe
696 rajveer 484
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 485
 
1731 ankur.sing 486
  def getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 487
    """
1731 ankur.sing 488
    Returns the minimum and maximum amounts among successful payments.
489
    List contains two double values, first minimum and second maximum amount.
1627 ankur.sing 490
    """
1731 ankur.sing 491
    self.send_getSuccessfulPaymentsAmountRange()
492
    return self.recv_getSuccessfulPaymentsAmountRange()
420 ashish 493
 
1731 ankur.sing 494
  def send_getSuccessfulPaymentsAmountRange(self, ):
495
    self._oprot.writeMessageBegin('getSuccessfulPaymentsAmountRange', TMessageType.CALL, self._seqid)
496
    args = getSuccessfulPaymentsAmountRange_args()
1627 ankur.sing 497
    args.write(self._oprot)
498
    self._oprot.writeMessageEnd()
499
    self._oprot.trans.flush()
500
 
1731 ankur.sing 501
  def recv_getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 502
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
503
    if mtype == TMessageType.EXCEPTION:
504
      x = TApplicationException()
505
      x.read(self._iprot)
506
      self._iprot.readMessageEnd()
507
      raise x
1731 ankur.sing 508
    result = getSuccessfulPaymentsAmountRange_result()
1627 ankur.sing 509
    result.read(self._iprot)
510
    self._iprot.readMessageEnd()
511
    if result.success != None:
512
      return result.success
1731 ankur.sing 513
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1627 ankur.sing 514
 
2559 chandransh 515
  def updateAndCaptureEbsPayment(self, paymentParams):
516
    """
517
    Update the authorization attributes of the payment and attempt to capture it in case it was authorized.
518
    If either the authorization failed or the capture attempt failed, the payment is marked as failed.
519
 
520
    Parameters:
521
     - paymentParams
522
    """
523
    self.send_updateAndCaptureEbsPayment(paymentParams)
524
    return self.recv_updateAndCaptureEbsPayment()
1627 ankur.sing 525
 
2559 chandransh 526
  def send_updateAndCaptureEbsPayment(self, paymentParams):
527
    self._oprot.writeMessageBegin('updateAndCaptureEbsPayment', TMessageType.CALL, self._seqid)
528
    args = updateAndCaptureEbsPayment_args()
529
    args.paymentParams = paymentParams
530
    args.write(self._oprot)
531
    self._oprot.writeMessageEnd()
532
    self._oprot.trans.flush()
533
 
534
  def recv_updateAndCaptureEbsPayment(self, ):
535
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
536
    if mtype == TMessageType.EXCEPTION:
537
      x = TApplicationException()
538
      x.read(self._iprot)
539
      self._iprot.readMessageEnd()
540
      raise x
541
    result = updateAndCaptureEbsPayment_result()
542
    result.read(self._iprot)
543
    self._iprot.readMessageEnd()
544
    if result.success != None:
545
      return result.success
546
    if result.pe != None:
547
      raise result.pe
548
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAndCaptureEbsPayment failed: unknown result");
549
 
550
  def captureHdfcPayment(self, merchantPaymentId):
551
    """
552
    Captures an already authorized Hdfc Payment and returns a map containing the details of the capture transaction
553
 
554
    Parameters:
555
     - merchantPaymentId
556
    """
557
    self.send_captureHdfcPayment(merchantPaymentId)
558
    return self.recv_captureHdfcPayment()
559
 
560
  def send_captureHdfcPayment(self, merchantPaymentId):
561
    self._oprot.writeMessageBegin('captureHdfcPayment', TMessageType.CALL, self._seqid)
562
    args = captureHdfcPayment_args()
563
    args.merchantPaymentId = merchantPaymentId
564
    args.write(self._oprot)
565
    self._oprot.writeMessageEnd()
566
    self._oprot.trans.flush()
567
 
568
  def recv_captureHdfcPayment(self, ):
569
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
570
    if mtype == TMessageType.EXCEPTION:
571
      x = TApplicationException()
572
      x.read(self._iprot)
573
      self._iprot.readMessageEnd()
574
      raise x
575
    result = captureHdfcPayment_result()
576
    result.read(self._iprot)
577
    self._iprot.readMessageEnd()
578
    if result.success != None:
579
      return result.success
580
    if result.pe != None:
581
      raise result.pe
582
    raise TApplicationException(TApplicationException.MISSING_RESULT, "captureHdfcPayment failed: unknown result");
583
 
584
  def initializeHdfcPayment(self, merchantPaymentId):
585
    """
586
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
587
    In case of any processing error, an exception is raised.
588
 
589
    Parameters:
590
     - merchantPaymentId
591
    """
592
    self.send_initializeHdfcPayment(merchantPaymentId)
593
    return self.recv_initializeHdfcPayment()
594
 
595
  def send_initializeHdfcPayment(self, merchantPaymentId):
596
    self._oprot.writeMessageBegin('initializeHdfcPayment', TMessageType.CALL, self._seqid)
597
    args = initializeHdfcPayment_args()
598
    args.merchantPaymentId = merchantPaymentId
599
    args.write(self._oprot)
600
    self._oprot.writeMessageEnd()
601
    self._oprot.trans.flush()
602
 
603
  def recv_initializeHdfcPayment(self, ):
604
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
605
    if mtype == TMessageType.EXCEPTION:
606
      x = TApplicationException()
607
      x.read(self._iprot)
608
      self._iprot.readMessageEnd()
609
      raise x
610
    result = initializeHdfcPayment_result()
611
    result.read(self._iprot)
612
    self._iprot.readMessageEnd()
613
    if result.success != None:
614
      return result.success
615
    if result.pe != None:
616
      raise result.pe
617
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
618
 
2685 chandransh 619
  def createRefund(self, orderId, merchantTxnId, amount):
620
    """
621
    Create a refund of the given amount corresponding to the given order to be processed through the same
622
    payment gateway which processed the payment for the corresponding transaction.
2687 chandransh 623
    Returns the id of the newly created Refund.
2685 chandransh 624
 
625
    Parameters:
626
     - orderId
627
     - merchantTxnId
628
     - amount
629
    """
630
    self.send_createRefund(orderId, merchantTxnId, amount)
631
    return self.recv_createRefund()
2559 chandransh 632
 
2685 chandransh 633
  def send_createRefund(self, orderId, merchantTxnId, amount):
634
    self._oprot.writeMessageBegin('createRefund', TMessageType.CALL, self._seqid)
635
    args = createRefund_args()
636
    args.orderId = orderId
637
    args.merchantTxnId = merchantTxnId
638
    args.amount = amount
639
    args.write(self._oprot)
640
    self._oprot.writeMessageEnd()
641
    self._oprot.trans.flush()
642
 
643
  def recv_createRefund(self, ):
644
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
645
    if mtype == TMessageType.EXCEPTION:
646
      x = TApplicationException()
647
      x.read(self._iprot)
648
      self._iprot.readMessageEnd()
649
      raise x
650
    result = createRefund_result()
651
    result.read(self._iprot)
652
    self._iprot.readMessageEnd()
653
    if result.success != None:
654
      return result.success
655
    if result.pe != None:
656
      raise result.pe
657
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
658
 
659
 
420 ashish 660
class Processor(Iface, TProcessor):
661
  def __init__(self, handler):
662
    self._handler = handler
663
    self._processMap = {}
765 rajveer 664
    self._processMap["closeSession"] = Processor.process_closeSession
420 ashish 665
    self._processMap["createPayment"] = Processor.process_createPayment
666
    self._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUser
667
    self._processMap["getPayments"] = Processor.process_getPayments
668
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
669
    self._processMap["getPayment"] = Processor.process_getPayment
696 rajveer 670
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
671
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
1731 ankur.sing 672
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
2559 chandransh 673
    self._processMap["updateAndCaptureEbsPayment"] = Processor.process_updateAndCaptureEbsPayment
674
    self._processMap["captureHdfcPayment"] = Processor.process_captureHdfcPayment
675
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
2685 chandransh 676
    self._processMap["createRefund"] = Processor.process_createRefund
420 ashish 677
 
678
  def process(self, iprot, oprot):
679
    (name, type, seqid) = iprot.readMessageBegin()
680
    if name not in self._processMap:
681
      iprot.skip(TType.STRUCT)
682
      iprot.readMessageEnd()
683
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
684
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
685
      x.write(oprot)
686
      oprot.writeMessageEnd()
687
      oprot.trans.flush()
688
      return
689
    else:
690
      self._processMap[name](self, seqid, iprot, oprot)
691
    return True
692
 
765 rajveer 693
  def process_closeSession(self, seqid, iprot, oprot):
694
    args = closeSession_args()
695
    args.read(iprot)
696
    iprot.readMessageEnd()
697
    result = closeSession_result()
698
    self._handler.closeSession()
699
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
700
    result.write(oprot)
701
    oprot.writeMessageEnd()
702
    oprot.trans.flush()
703
 
420 ashish 704
  def process_createPayment(self, seqid, iprot, oprot):
705
    args = createPayment_args()
706
    args.read(iprot)
707
    iprot.readMessageEnd()
708
    result = createPayment_result()
709
    try:
696 rajveer 710
      result.success = self._handler.createPayment(args.userId, args.amount, args.gatewayId, args.txnId)
420 ashish 711
    except PaymentException, pe:
712
      result.pe = pe
713
    oprot.writeMessageBegin("createPayment", TMessageType.REPLY, seqid)
714
    result.write(oprot)
715
    oprot.writeMessageEnd()
716
    oprot.trans.flush()
717
 
718
  def process_getPaymentsForUser(self, seqid, iprot, oprot):
719
    args = getPaymentsForUser_args()
720
    args.read(iprot)
721
    iprot.readMessageEnd()
722
    result = getPaymentsForUser_result()
723
    try:
696 rajveer 724
      result.success = self._handler.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId)
420 ashish 725
    except PaymentException, pe:
726
      result.pe = pe
727
    oprot.writeMessageBegin("getPaymentsForUser", TMessageType.REPLY, seqid)
728
    result.write(oprot)
729
    oprot.writeMessageEnd()
730
    oprot.trans.flush()
731
 
732
  def process_getPayments(self, seqid, iprot, oprot):
733
    args = getPayments_args()
734
    args.read(iprot)
735
    iprot.readMessageEnd()
736
    result = getPayments_result()
737
    try:
696 rajveer 738
      result.success = self._handler.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId)
420 ashish 739
    except PaymentException, pe:
740
      result.pe = pe
741
    oprot.writeMessageBegin("getPayments", TMessageType.REPLY, seqid)
742
    result.write(oprot)
743
    oprot.writeMessageEnd()
744
    oprot.trans.flush()
745
 
746
  def process_getPaymentGateway(self, seqid, iprot, oprot):
747
    args = getPaymentGateway_args()
748
    args.read(iprot)
749
    iprot.readMessageEnd()
750
    result = getPaymentGateway_result()
751
    try:
752
      result.success = self._handler.getPaymentGateway(args.id)
753
    except PaymentException, pe:
754
      result.pe = pe
755
    oprot.writeMessageBegin("getPaymentGateway", TMessageType.REPLY, seqid)
756
    result.write(oprot)
757
    oprot.writeMessageEnd()
758
    oprot.trans.flush()
759
 
696 rajveer 760
  def process_getPayment(self, seqid, iprot, oprot):
761
    args = getPayment_args()
420 ashish 762
    args.read(iprot)
763
    iprot.readMessageEnd()
696 rajveer 764
    result = getPayment_result()
420 ashish 765
    try:
696 rajveer 766
      result.success = self._handler.getPayment(args.id)
420 ashish 767
    except PaymentException, pe:
768
      result.pe = pe
696 rajveer 769
    oprot.writeMessageBegin("getPayment", TMessageType.REPLY, seqid)
420 ashish 770
    result.write(oprot)
771
    oprot.writeMessageEnd()
772
    oprot.trans.flush()
773
 
696 rajveer 774
  def process_getPaymentForTxnId(self, seqid, iprot, oprot):
775
    args = getPaymentForTxnId_args()
420 ashish 776
    args.read(iprot)
777
    iprot.readMessageEnd()
696 rajveer 778
    result = getPaymentForTxnId_result()
420 ashish 779
    try:
696 rajveer 780
      result.success = self._handler.getPaymentForTxnId(args.txnId)
420 ashish 781
    except PaymentException, pe:
782
      result.pe = pe
696 rajveer 783
    oprot.writeMessageBegin("getPaymentForTxnId", TMessageType.REPLY, seqid)
420 ashish 784
    result.write(oprot)
785
    oprot.writeMessageEnd()
786
    oprot.trans.flush()
787
 
696 rajveer 788
  def process_updatePaymentDetails(self, seqid, iprot, oprot):
789
    args = updatePaymentDetails_args()
420 ashish 790
    args.read(iprot)
791
    iprot.readMessageEnd()
696 rajveer 792
    result = updatePaymentDetails_result()
420 ashish 793
    try:
1120 rajveer 794
      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 795
    except PaymentException, pe:
796
      result.pe = pe
696 rajveer 797
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
420 ashish 798
    result.write(oprot)
799
    oprot.writeMessageEnd()
800
    oprot.trans.flush()
801
 
1731 ankur.sing 802
  def process_getSuccessfulPaymentsAmountRange(self, seqid, iprot, oprot):
803
    args = getSuccessfulPaymentsAmountRange_args()
1627 ankur.sing 804
    args.read(iprot)
805
    iprot.readMessageEnd()
1731 ankur.sing 806
    result = getSuccessfulPaymentsAmountRange_result()
807
    result.success = self._handler.getSuccessfulPaymentsAmountRange()
808
    oprot.writeMessageBegin("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid)
1627 ankur.sing 809
    result.write(oprot)
810
    oprot.writeMessageEnd()
811
    oprot.trans.flush()
420 ashish 812
 
2559 chandransh 813
  def process_updateAndCaptureEbsPayment(self, seqid, iprot, oprot):
814
    args = updateAndCaptureEbsPayment_args()
815
    args.read(iprot)
816
    iprot.readMessageEnd()
817
    result = updateAndCaptureEbsPayment_result()
818
    try:
819
      result.success = self._handler.updateAndCaptureEbsPayment(args.paymentParams)
820
    except PaymentException, pe:
821
      result.pe = pe
822
    oprot.writeMessageBegin("updateAndCaptureEbsPayment", TMessageType.REPLY, seqid)
823
    result.write(oprot)
824
    oprot.writeMessageEnd()
825
    oprot.trans.flush()
1627 ankur.sing 826
 
2559 chandransh 827
  def process_captureHdfcPayment(self, seqid, iprot, oprot):
828
    args = captureHdfcPayment_args()
829
    args.read(iprot)
830
    iprot.readMessageEnd()
831
    result = captureHdfcPayment_result()
832
    try:
833
      result.success = self._handler.captureHdfcPayment(args.merchantPaymentId)
834
    except PaymentException, pe:
835
      result.pe = pe
836
    oprot.writeMessageBegin("captureHdfcPayment", TMessageType.REPLY, seqid)
837
    result.write(oprot)
838
    oprot.writeMessageEnd()
839
    oprot.trans.flush()
840
 
841
  def process_initializeHdfcPayment(self, seqid, iprot, oprot):
842
    args = initializeHdfcPayment_args()
843
    args.read(iprot)
844
    iprot.readMessageEnd()
845
    result = initializeHdfcPayment_result()
846
    try:
847
      result.success = self._handler.initializeHdfcPayment(args.merchantPaymentId)
848
    except PaymentException, pe:
849
      result.pe = pe
850
    oprot.writeMessageBegin("initializeHdfcPayment", TMessageType.REPLY, seqid)
851
    result.write(oprot)
852
    oprot.writeMessageEnd()
853
    oprot.trans.flush()
854
 
2685 chandransh 855
  def process_createRefund(self, seqid, iprot, oprot):
856
    args = createRefund_args()
857
    args.read(iprot)
858
    iprot.readMessageEnd()
859
    result = createRefund_result()
860
    try:
861
      result.success = self._handler.createRefund(args.orderId, args.merchantTxnId, args.amount)
862
    except PaymentException, pe:
863
      result.pe = pe
864
    oprot.writeMessageBegin("createRefund", TMessageType.REPLY, seqid)
865
    result.write(oprot)
866
    oprot.writeMessageEnd()
867
    oprot.trans.flush()
2559 chandransh 868
 
2685 chandransh 869
 
420 ashish 870
# HELPER FUNCTIONS AND STRUCTURES
871
 
765 rajveer 872
class closeSession_args:
873
 
874
  thrift_spec = (
875
  )
876
 
877
  def read(self, iprot):
878
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
879
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
880
      return
881
    iprot.readStructBegin()
882
    while True:
883
      (fname, ftype, fid) = iprot.readFieldBegin()
884
      if ftype == TType.STOP:
885
        break
886
      else:
887
        iprot.skip(ftype)
888
      iprot.readFieldEnd()
889
    iprot.readStructEnd()
890
 
891
  def write(self, oprot):
892
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
893
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
894
      return
895
    oprot.writeStructBegin('closeSession_args')
896
    oprot.writeFieldStop()
897
    oprot.writeStructEnd()
898
 
899
  def __repr__(self):
900
    L = ['%s=%r' % (key, value)
901
      for key, value in self.__dict__.iteritems()]
902
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
903
 
904
  def __eq__(self, other):
905
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
906
 
907
  def __ne__(self, other):
908
    return not (self == other)
909
 
910
class closeSession_result:
911
 
912
  thrift_spec = (
913
  )
914
 
915
  def read(self, iprot):
916
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
917
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
918
      return
919
    iprot.readStructBegin()
920
    while True:
921
      (fname, ftype, fid) = iprot.readFieldBegin()
922
      if ftype == TType.STOP:
923
        break
924
      else:
925
        iprot.skip(ftype)
926
      iprot.readFieldEnd()
927
    iprot.readStructEnd()
928
 
929
  def write(self, oprot):
930
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
931
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
932
      return
933
    oprot.writeStructBegin('closeSession_result')
934
    oprot.writeFieldStop()
935
    oprot.writeStructEnd()
936
 
937
  def __repr__(self):
938
    L = ['%s=%r' % (key, value)
939
      for key, value in self.__dict__.iteritems()]
940
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
941
 
942
  def __eq__(self, other):
943
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
944
 
945
  def __ne__(self, other):
946
    return not (self == other)
947
 
420 ashish 948
class createPayment_args:
949
  """
950
  Attributes:
696 rajveer 951
   - userId
420 ashish 952
   - amount
696 rajveer 953
   - gatewayId
954
   - txnId
420 ashish 955
  """
956
 
957
  thrift_spec = (
958
    None, # 0
696 rajveer 959
    (1, TType.I64, 'userId', None, None, ), # 1
960
    (2, TType.DOUBLE, 'amount', None, None, ), # 2
961
    (3, TType.I64, 'gatewayId', None, None, ), # 3
962
    (4, TType.I64, 'txnId', None, None, ), # 4
420 ashish 963
  )
964
 
696 rajveer 965
  def __init__(self, userId=None, amount=None, gatewayId=None, txnId=None,):
966
    self.userId = userId
420 ashish 967
    self.amount = amount
696 rajveer 968
    self.gatewayId = gatewayId
969
    self.txnId = txnId
420 ashish 970
 
971
  def read(self, iprot):
972
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
973
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
974
      return
975
    iprot.readStructBegin()
976
    while True:
977
      (fname, ftype, fid) = iprot.readFieldBegin()
978
      if ftype == TType.STOP:
979
        break
980
      if fid == 1:
981
        if ftype == TType.I64:
696 rajveer 982
          self.userId = iprot.readI64();
420 ashish 983
        else:
984
          iprot.skip(ftype)
985
      elif fid == 2:
696 rajveer 986
        if ftype == TType.DOUBLE:
987
          self.amount = iprot.readDouble();
420 ashish 988
        else:
989
          iprot.skip(ftype)
990
      elif fid == 3:
696 rajveer 991
        if ftype == TType.I64:
992
          self.gatewayId = iprot.readI64();
420 ashish 993
        else:
994
          iprot.skip(ftype)
995
      elif fid == 4:
996
        if ftype == TType.I64:
696 rajveer 997
          self.txnId = iprot.readI64();
420 ashish 998
        else:
999
          iprot.skip(ftype)
1000
      else:
1001
        iprot.skip(ftype)
1002
      iprot.readFieldEnd()
1003
    iprot.readStructEnd()
1004
 
1005
  def write(self, oprot):
1006
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1007
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1008
      return
1009
    oprot.writeStructBegin('createPayment_args')
696 rajveer 1010
    if self.userId != None:
1011
      oprot.writeFieldBegin('userId', TType.I64, 1)
1012
      oprot.writeI64(self.userId)
420 ashish 1013
      oprot.writeFieldEnd()
1014
    if self.amount != None:
696 rajveer 1015
      oprot.writeFieldBegin('amount', TType.DOUBLE, 2)
420 ashish 1016
      oprot.writeDouble(self.amount)
1017
      oprot.writeFieldEnd()
696 rajveer 1018
    if self.gatewayId != None:
1019
      oprot.writeFieldBegin('gatewayId', TType.I64, 3)
1020
      oprot.writeI64(self.gatewayId)
420 ashish 1021
      oprot.writeFieldEnd()
696 rajveer 1022
    if self.txnId != None:
1023
      oprot.writeFieldBegin('txnId', TType.I64, 4)
1024
      oprot.writeI64(self.txnId)
1025
      oprot.writeFieldEnd()
420 ashish 1026
    oprot.writeFieldStop()
1027
    oprot.writeStructEnd()
1028
 
1029
  def __repr__(self):
1030
    L = ['%s=%r' % (key, value)
1031
      for key, value in self.__dict__.iteritems()]
1032
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1033
 
1034
  def __eq__(self, other):
1035
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1036
 
1037
  def __ne__(self, other):
1038
    return not (self == other)
1039
 
1040
class createPayment_result:
1041
  """
1042
  Attributes:
1043
   - success
1044
   - pe
1045
  """
1046
 
1047
  thrift_spec = (
1048
    (0, TType.I64, 'success', None, None, ), # 0
1049
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1050
  )
1051
 
1052
  def __init__(self, success=None, pe=None,):
1053
    self.success = success
1054
    self.pe = pe
1055
 
1056
  def read(self, iprot):
1057
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1058
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1059
      return
1060
    iprot.readStructBegin()
1061
    while True:
1062
      (fname, ftype, fid) = iprot.readFieldBegin()
1063
      if ftype == TType.STOP:
1064
        break
1065
      if fid == 0:
1066
        if ftype == TType.I64:
1067
          self.success = iprot.readI64();
1068
        else:
1069
          iprot.skip(ftype)
1070
      elif fid == 1:
1071
        if ftype == TType.STRUCT:
1072
          self.pe = PaymentException()
1073
          self.pe.read(iprot)
1074
        else:
1075
          iprot.skip(ftype)
1076
      else:
1077
        iprot.skip(ftype)
1078
      iprot.readFieldEnd()
1079
    iprot.readStructEnd()
1080
 
1081
  def write(self, oprot):
1082
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1083
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1084
      return
1085
    oprot.writeStructBegin('createPayment_result')
1086
    if self.success != None:
1087
      oprot.writeFieldBegin('success', TType.I64, 0)
1088
      oprot.writeI64(self.success)
1089
      oprot.writeFieldEnd()
1090
    if self.pe != None:
1091
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1092
      self.pe.write(oprot)
1093
      oprot.writeFieldEnd()
1094
    oprot.writeFieldStop()
1095
    oprot.writeStructEnd()
1096
 
1097
  def __repr__(self):
1098
    L = ['%s=%r' % (key, value)
1099
      for key, value in self.__dict__.iteritems()]
1100
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1101
 
1102
  def __eq__(self, other):
1103
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1104
 
1105
  def __ne__(self, other):
1106
    return not (self == other)
1107
 
1108
class getPaymentsForUser_args:
1109
  """
1110
  Attributes:
1111
   - userId
696 rajveer 1112
   - fromTime
1113
   - toTime
420 ashish 1114
   - status
696 rajveer 1115
   - gatewayId
420 ashish 1116
  """
1117
 
1118
  thrift_spec = (
1119
    None, # 0
1120
    (1, TType.I64, 'userId', None, None, ), # 1
696 rajveer 1121
    (2, TType.I64, 'fromTime', None, None, ), # 2
1122
    (3, TType.I64, 'toTime', None, None, ), # 3
420 ashish 1123
    (4, TType.I32, 'status', None, None, ), # 4
696 rajveer 1124
    (5, TType.I64, 'gatewayId', None, None, ), # 5
420 ashish 1125
  )
1126
 
696 rajveer 1127
  def __init__(self, userId=None, fromTime=None, toTime=None, status=None, gatewayId=None,):
420 ashish 1128
    self.userId = userId
696 rajveer 1129
    self.fromTime = fromTime
1130
    self.toTime = toTime
420 ashish 1131
    self.status = status
696 rajveer 1132
    self.gatewayId = gatewayId
420 ashish 1133
 
1134
  def read(self, iprot):
1135
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1136
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1137
      return
1138
    iprot.readStructBegin()
1139
    while True:
1140
      (fname, ftype, fid) = iprot.readFieldBegin()
1141
      if ftype == TType.STOP:
1142
        break
1143
      if fid == 1:
1144
        if ftype == TType.I64:
1145
          self.userId = iprot.readI64();
1146
        else:
1147
          iprot.skip(ftype)
1148
      elif fid == 2:
1149
        if ftype == TType.I64:
696 rajveer 1150
          self.fromTime = iprot.readI64();
420 ashish 1151
        else:
1152
          iprot.skip(ftype)
1153
      elif fid == 3:
1154
        if ftype == TType.I64:
696 rajveer 1155
          self.toTime = iprot.readI64();
420 ashish 1156
        else:
1157
          iprot.skip(ftype)
1158
      elif fid == 4:
1159
        if ftype == TType.I32:
1160
          self.status = iprot.readI32();
1161
        else:
1162
          iprot.skip(ftype)
1163
      elif fid == 5:
1164
        if ftype == TType.I64:
696 rajveer 1165
          self.gatewayId = iprot.readI64();
420 ashish 1166
        else:
1167
          iprot.skip(ftype)
1168
      else:
1169
        iprot.skip(ftype)
1170
      iprot.readFieldEnd()
1171
    iprot.readStructEnd()
1172
 
1173
  def write(self, oprot):
1174
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1175
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1176
      return
1177
    oprot.writeStructBegin('getPaymentsForUser_args')
1178
    if self.userId != None:
1179
      oprot.writeFieldBegin('userId', TType.I64, 1)
1180
      oprot.writeI64(self.userId)
1181
      oprot.writeFieldEnd()
696 rajveer 1182
    if self.fromTime != None:
1183
      oprot.writeFieldBegin('fromTime', TType.I64, 2)
1184
      oprot.writeI64(self.fromTime)
420 ashish 1185
      oprot.writeFieldEnd()
696 rajveer 1186
    if self.toTime != None:
1187
      oprot.writeFieldBegin('toTime', TType.I64, 3)
1188
      oprot.writeI64(self.toTime)
420 ashish 1189
      oprot.writeFieldEnd()
1190
    if self.status != None:
1191
      oprot.writeFieldBegin('status', TType.I32, 4)
1192
      oprot.writeI32(self.status)
1193
      oprot.writeFieldEnd()
696 rajveer 1194
    if self.gatewayId != None:
1195
      oprot.writeFieldBegin('gatewayId', TType.I64, 5)
1196
      oprot.writeI64(self.gatewayId)
420 ashish 1197
      oprot.writeFieldEnd()
1198
    oprot.writeFieldStop()
1199
    oprot.writeStructEnd()
1200
 
1201
  def __repr__(self):
1202
    L = ['%s=%r' % (key, value)
1203
      for key, value in self.__dict__.iteritems()]
1204
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1205
 
1206
  def __eq__(self, other):
1207
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1208
 
1209
  def __ne__(self, other):
1210
    return not (self == other)
1211
 
1212
class getPaymentsForUser_result:
1213
  """
1214
  Attributes:
1215
   - success
1216
   - pe
1217
  """
1218
 
1219
  thrift_spec = (
1220
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1221
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1222
  )
1223
 
1224
  def __init__(self, success=None, pe=None,):
1225
    self.success = success
1226
    self.pe = pe
1227
 
1228
  def read(self, iprot):
1229
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1230
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1231
      return
1232
    iprot.readStructBegin()
1233
    while True:
1234
      (fname, ftype, fid) = iprot.readFieldBegin()
1235
      if ftype == TType.STOP:
1236
        break
1237
      if fid == 0:
1238
        if ftype == TType.LIST:
1239
          self.success = []
696 rajveer 1240
          (_etype17, _size14) = iprot.readListBegin()
1241
          for _i18 in xrange(_size14):
1242
            _elem19 = Payment()
1243
            _elem19.read(iprot)
1244
            self.success.append(_elem19)
420 ashish 1245
          iprot.readListEnd()
1246
        else:
1247
          iprot.skip(ftype)
1248
      elif fid == 1:
1249
        if ftype == TType.STRUCT:
1250
          self.pe = PaymentException()
1251
          self.pe.read(iprot)
1252
        else:
1253
          iprot.skip(ftype)
1254
      else:
1255
        iprot.skip(ftype)
1256
      iprot.readFieldEnd()
1257
    iprot.readStructEnd()
1258
 
1259
  def write(self, oprot):
1260
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1261
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1262
      return
1263
    oprot.writeStructBegin('getPaymentsForUser_result')
1264
    if self.success != None:
1265
      oprot.writeFieldBegin('success', TType.LIST, 0)
1266
      oprot.writeListBegin(TType.STRUCT, len(self.success))
696 rajveer 1267
      for iter20 in self.success:
1268
        iter20.write(oprot)
420 ashish 1269
      oprot.writeListEnd()
1270
      oprot.writeFieldEnd()
1271
    if self.pe != None:
1272
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1273
      self.pe.write(oprot)
1274
      oprot.writeFieldEnd()
1275
    oprot.writeFieldStop()
1276
    oprot.writeStructEnd()
1277
 
1278
  def __repr__(self):
1279
    L = ['%s=%r' % (key, value)
1280
      for key, value in self.__dict__.iteritems()]
1281
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1282
 
1283
  def __eq__(self, other):
1284
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1285
 
1286
  def __ne__(self, other):
1287
    return not (self == other)
1288
 
1289
class getPayments_args:
1290
  """
1291
  Attributes:
696 rajveer 1292
   - fromTime
1293
   - toTime
420 ashish 1294
   - status
696 rajveer 1295
   - gatewayId
420 ashish 1296
  """
1297
 
1298
  thrift_spec = (
1299
    None, # 0
696 rajveer 1300
    (1, TType.I64, 'fromTime', None, None, ), # 1
1301
    (2, TType.I64, 'toTime', None, None, ), # 2
420 ashish 1302
    (3, TType.I32, 'status', None, None, ), # 3
696 rajveer 1303
    (4, TType.I64, 'gatewayId', None, None, ), # 4
420 ashish 1304
  )
1305
 
696 rajveer 1306
  def __init__(self, fromTime=None, toTime=None, status=None, gatewayId=None,):
1307
    self.fromTime = fromTime
1308
    self.toTime = toTime
420 ashish 1309
    self.status = status
696 rajveer 1310
    self.gatewayId = gatewayId
420 ashish 1311
 
1312
  def read(self, iprot):
1313
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1314
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1315
      return
1316
    iprot.readStructBegin()
1317
    while True:
1318
      (fname, ftype, fid) = iprot.readFieldBegin()
1319
      if ftype == TType.STOP:
1320
        break
1321
      if fid == 1:
1322
        if ftype == TType.I64:
696 rajveer 1323
          self.fromTime = iprot.readI64();
420 ashish 1324
        else:
1325
          iprot.skip(ftype)
1326
      elif fid == 2:
1327
        if ftype == TType.I64:
696 rajveer 1328
          self.toTime = iprot.readI64();
420 ashish 1329
        else:
1330
          iprot.skip(ftype)
1331
      elif fid == 3:
1332
        if ftype == TType.I32:
1333
          self.status = iprot.readI32();
1334
        else:
1335
          iprot.skip(ftype)
1336
      elif fid == 4:
1337
        if ftype == TType.I64:
696 rajveer 1338
          self.gatewayId = iprot.readI64();
420 ashish 1339
        else:
1340
          iprot.skip(ftype)
1341
      else:
1342
        iprot.skip(ftype)
1343
      iprot.readFieldEnd()
1344
    iprot.readStructEnd()
1345
 
1346
  def write(self, oprot):
1347
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1348
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1349
      return
1350
    oprot.writeStructBegin('getPayments_args')
696 rajveer 1351
    if self.fromTime != None:
1352
      oprot.writeFieldBegin('fromTime', TType.I64, 1)
1353
      oprot.writeI64(self.fromTime)
420 ashish 1354
      oprot.writeFieldEnd()
696 rajveer 1355
    if self.toTime != None:
1356
      oprot.writeFieldBegin('toTime', TType.I64, 2)
1357
      oprot.writeI64(self.toTime)
420 ashish 1358
      oprot.writeFieldEnd()
1359
    if self.status != None:
1360
      oprot.writeFieldBegin('status', TType.I32, 3)
1361
      oprot.writeI32(self.status)
1362
      oprot.writeFieldEnd()
696 rajveer 1363
    if self.gatewayId != None:
1364
      oprot.writeFieldBegin('gatewayId', TType.I64, 4)
1365
      oprot.writeI64(self.gatewayId)
420 ashish 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
 
1381
class getPayments_result:
1382
  """
1383
  Attributes:
1384
   - success
1385
   - pe
1386
  """
1387
 
1388
  thrift_spec = (
1389
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1390
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1391
  )
1392
 
1393
  def __init__(self, success=None, pe=None,):
1394
    self.success = success
1395
    self.pe = pe
1396
 
1397
  def read(self, iprot):
1398
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1399
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1400
      return
1401
    iprot.readStructBegin()
1402
    while True:
1403
      (fname, ftype, fid) = iprot.readFieldBegin()
1404
      if ftype == TType.STOP:
1405
        break
1406
      if fid == 0:
1407
        if ftype == TType.LIST:
1408
          self.success = []
696 rajveer 1409
          (_etype24, _size21) = iprot.readListBegin()
1410
          for _i25 in xrange(_size21):
1411
            _elem26 = Payment()
1412
            _elem26.read(iprot)
1413
            self.success.append(_elem26)
420 ashish 1414
          iprot.readListEnd()
1415
        else:
1416
          iprot.skip(ftype)
1417
      elif fid == 1:
1418
        if ftype == TType.STRUCT:
1419
          self.pe = PaymentException()
1420
          self.pe.read(iprot)
1421
        else:
1422
          iprot.skip(ftype)
1423
      else:
1424
        iprot.skip(ftype)
1425
      iprot.readFieldEnd()
1426
    iprot.readStructEnd()
1427
 
1428
  def write(self, oprot):
1429
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1430
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1431
      return
1432
    oprot.writeStructBegin('getPayments_result')
1433
    if self.success != None:
1434
      oprot.writeFieldBegin('success', TType.LIST, 0)
1435
      oprot.writeListBegin(TType.STRUCT, len(self.success))
696 rajveer 1436
      for iter27 in self.success:
1437
        iter27.write(oprot)
420 ashish 1438
      oprot.writeListEnd()
1439
      oprot.writeFieldEnd()
1440
    if self.pe != None:
1441
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1442
      self.pe.write(oprot)
1443
      oprot.writeFieldEnd()
1444
    oprot.writeFieldStop()
1445
    oprot.writeStructEnd()
1446
 
1447
  def __repr__(self):
1448
    L = ['%s=%r' % (key, value)
1449
      for key, value in self.__dict__.iteritems()]
1450
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1451
 
1452
  def __eq__(self, other):
1453
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1454
 
1455
  def __ne__(self, other):
1456
    return not (self == other)
1457
 
696 rajveer 1458
class getPaymentGateway_args:
420 ashish 1459
  """
1460
  Attributes:
1461
   - id
1462
  """
1463
 
1464
  thrift_spec = (
1465
    None, # 0
1466
    (1, TType.I64, 'id', None, None, ), # 1
1467
  )
1468
 
696 rajveer 1469
  def __init__(self, id=None,):
420 ashish 1470
    self.id = id
1471
 
1472
  def read(self, iprot):
1473
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1474
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1475
      return
1476
    iprot.readStructBegin()
1477
    while True:
1478
      (fname, ftype, fid) = iprot.readFieldBegin()
1479
      if ftype == TType.STOP:
1480
        break
1481
      if fid == 1:
1482
        if ftype == TType.I64:
1483
          self.id = iprot.readI64();
1484
        else:
1485
          iprot.skip(ftype)
1486
      else:
1487
        iprot.skip(ftype)
1488
      iprot.readFieldEnd()
1489
    iprot.readStructEnd()
1490
 
1491
  def write(self, oprot):
1492
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1493
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1494
      return
696 rajveer 1495
    oprot.writeStructBegin('getPaymentGateway_args')
420 ashish 1496
    if self.id != None:
1497
      oprot.writeFieldBegin('id', TType.I64, 1)
1498
      oprot.writeI64(self.id)
1499
      oprot.writeFieldEnd()
1500
    oprot.writeFieldStop()
1501
    oprot.writeStructEnd()
1502
 
1503
  def __repr__(self):
1504
    L = ['%s=%r' % (key, value)
1505
      for key, value in self.__dict__.iteritems()]
1506
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1507
 
1508
  def __eq__(self, other):
1509
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1510
 
1511
  def __ne__(self, other):
1512
    return not (self == other)
1513
 
696 rajveer 1514
class getPaymentGateway_result:
420 ashish 1515
  """
1516
  Attributes:
1517
   - success
1518
   - pe
1519
  """
1520
 
1521
  thrift_spec = (
696 rajveer 1522
    (0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0
420 ashish 1523
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1524
  )
1525
 
1526
  def __init__(self, success=None, pe=None,):
1527
    self.success = success
1528
    self.pe = pe
1529
 
1530
  def read(self, iprot):
1531
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1532
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1533
      return
1534
    iprot.readStructBegin()
1535
    while True:
1536
      (fname, ftype, fid) = iprot.readFieldBegin()
1537
      if ftype == TType.STOP:
1538
        break
1539
      if fid == 0:
696 rajveer 1540
        if ftype == TType.STRUCT:
1541
          self.success = PaymentGateway()
1542
          self.success.read(iprot)
420 ashish 1543
        else:
1544
          iprot.skip(ftype)
1545
      elif fid == 1:
1546
        if ftype == TType.STRUCT:
1547
          self.pe = PaymentException()
1548
          self.pe.read(iprot)
1549
        else:
1550
          iprot.skip(ftype)
1551
      else:
1552
        iprot.skip(ftype)
1553
      iprot.readFieldEnd()
1554
    iprot.readStructEnd()
1555
 
1556
  def write(self, oprot):
1557
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1558
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1559
      return
696 rajveer 1560
    oprot.writeStructBegin('getPaymentGateway_result')
420 ashish 1561
    if self.success != None:
696 rajveer 1562
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1563
      self.success.write(oprot)
420 ashish 1564
      oprot.writeFieldEnd()
1565
    if self.pe != None:
1566
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1567
      self.pe.write(oprot)
1568
      oprot.writeFieldEnd()
1569
    oprot.writeFieldStop()
1570
    oprot.writeStructEnd()
1571
 
1572
  def __repr__(self):
1573
    L = ['%s=%r' % (key, value)
1574
      for key, value in self.__dict__.iteritems()]
1575
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1576
 
1577
  def __eq__(self, other):
1578
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1579
 
1580
  def __ne__(self, other):
1581
    return not (self == other)
1582
 
696 rajveer 1583
class getPayment_args:
420 ashish 1584
  """
1585
  Attributes:
1586
   - id
1587
  """
1588
 
1589
  thrift_spec = (
1590
    None, # 0
1591
    (1, TType.I64, 'id', None, None, ), # 1
1592
  )
1593
 
1594
  def __init__(self, id=None,):
1595
    self.id = id
1596
 
1597
  def read(self, iprot):
1598
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1599
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1600
      return
1601
    iprot.readStructBegin()
1602
    while True:
1603
      (fname, ftype, fid) = iprot.readFieldBegin()
1604
      if ftype == TType.STOP:
1605
        break
1606
      if fid == 1:
1607
        if ftype == TType.I64:
1608
          self.id = iprot.readI64();
1609
        else:
1610
          iprot.skip(ftype)
1611
      else:
1612
        iprot.skip(ftype)
1613
      iprot.readFieldEnd()
1614
    iprot.readStructEnd()
1615
 
1616
  def write(self, oprot):
1617
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1618
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1619
      return
696 rajveer 1620
    oprot.writeStructBegin('getPayment_args')
420 ashish 1621
    if self.id != None:
1622
      oprot.writeFieldBegin('id', TType.I64, 1)
1623
      oprot.writeI64(self.id)
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 getPayment_result:
420 ashish 1640
  """
1641
  Attributes:
1642
   - success
1643
   - pe
1644
  """
1645
 
1646
  thrift_spec = (
696 rajveer 1647
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
420 ashish 1648
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1649
  )
1650
 
1651
  def __init__(self, success=None, pe=None,):
1652
    self.success = success
1653
    self.pe = pe
1654
 
1655
  def read(self, iprot):
1656
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1657
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1658
      return
1659
    iprot.readStructBegin()
1660
    while True:
1661
      (fname, ftype, fid) = iprot.readFieldBegin()
1662
      if ftype == TType.STOP:
1663
        break
1664
      if fid == 0:
1665
        if ftype == TType.STRUCT:
696 rajveer 1666
          self.success = Payment()
420 ashish 1667
          self.success.read(iprot)
1668
        else:
1669
          iprot.skip(ftype)
1670
      elif fid == 1:
1671
        if ftype == TType.STRUCT:
1672
          self.pe = PaymentException()
1673
          self.pe.read(iprot)
1674
        else:
1675
          iprot.skip(ftype)
1676
      else:
1677
        iprot.skip(ftype)
1678
      iprot.readFieldEnd()
1679
    iprot.readStructEnd()
1680
 
1681
  def write(self, oprot):
1682
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1683
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1684
      return
696 rajveer 1685
    oprot.writeStructBegin('getPayment_result')
420 ashish 1686
    if self.success != None:
1687
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1688
      self.success.write(oprot)
1689
      oprot.writeFieldEnd()
1690
    if self.pe != None:
1691
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1692
      self.pe.write(oprot)
1693
      oprot.writeFieldEnd()
1694
    oprot.writeFieldStop()
1695
    oprot.writeStructEnd()
1696
 
1697
  def __repr__(self):
1698
    L = ['%s=%r' % (key, value)
1699
      for key, value in self.__dict__.iteritems()]
1700
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1701
 
1702
  def __eq__(self, other):
1703
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1704
 
1705
  def __ne__(self, other):
1706
    return not (self == other)
1707
 
696 rajveer 1708
class getPaymentForTxnId_args:
420 ashish 1709
  """
1710
  Attributes:
696 rajveer 1711
   - txnId
420 ashish 1712
  """
1713
 
1714
  thrift_spec = (
1715
    None, # 0
696 rajveer 1716
    (1, TType.I64, 'txnId', None, None, ), # 1
420 ashish 1717
  )
1718
 
696 rajveer 1719
  def __init__(self, txnId=None,):
1720
    self.txnId = txnId
420 ashish 1721
 
1722
  def read(self, iprot):
1723
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1724
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1725
      return
1726
    iprot.readStructBegin()
1727
    while True:
1728
      (fname, ftype, fid) = iprot.readFieldBegin()
1729
      if ftype == TType.STOP:
1730
        break
1731
      if fid == 1:
1732
        if ftype == TType.I64:
696 rajveer 1733
          self.txnId = iprot.readI64();
420 ashish 1734
        else:
1735
          iprot.skip(ftype)
1736
      else:
1737
        iprot.skip(ftype)
1738
      iprot.readFieldEnd()
1739
    iprot.readStructEnd()
1740
 
1741
  def write(self, oprot):
1742
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1743
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1744
      return
696 rajveer 1745
    oprot.writeStructBegin('getPaymentForTxnId_args')
1746
    if self.txnId != None:
1747
      oprot.writeFieldBegin('txnId', TType.I64, 1)
1748
      oprot.writeI64(self.txnId)
420 ashish 1749
      oprot.writeFieldEnd()
1750
    oprot.writeFieldStop()
1751
    oprot.writeStructEnd()
1752
 
1753
  def __repr__(self):
1754
    L = ['%s=%r' % (key, value)
1755
      for key, value in self.__dict__.iteritems()]
1756
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1757
 
1758
  def __eq__(self, other):
1759
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1760
 
1761
  def __ne__(self, other):
1762
    return not (self == other)
1763
 
696 rajveer 1764
class getPaymentForTxnId_result:
420 ashish 1765
  """
1766
  Attributes:
1767
   - success
1768
   - pe
1769
  """
1770
 
1771
  thrift_spec = (
696 rajveer 1772
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
420 ashish 1773
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1774
  )
1775
 
1776
  def __init__(self, success=None, pe=None,):
1777
    self.success = success
1778
    self.pe = pe
1779
 
1780
  def read(self, iprot):
1781
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1782
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1783
      return
1784
    iprot.readStructBegin()
1785
    while True:
1786
      (fname, ftype, fid) = iprot.readFieldBegin()
1787
      if ftype == TType.STOP:
1788
        break
1789
      if fid == 0:
696 rajveer 1790
        if ftype == TType.LIST:
1791
          self.success = []
1792
          (_etype31, _size28) = iprot.readListBegin()
1793
          for _i32 in xrange(_size28):
1794
            _elem33 = Payment()
1795
            _elem33.read(iprot)
1796
            self.success.append(_elem33)
1797
          iprot.readListEnd()
420 ashish 1798
        else:
1799
          iprot.skip(ftype)
1800
      elif fid == 1:
1801
        if ftype == TType.STRUCT:
1802
          self.pe = PaymentException()
1803
          self.pe.read(iprot)
1804
        else:
1805
          iprot.skip(ftype)
1806
      else:
1807
        iprot.skip(ftype)
1808
      iprot.readFieldEnd()
1809
    iprot.readStructEnd()
1810
 
1811
  def write(self, oprot):
1812
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1813
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1814
      return
696 rajveer 1815
    oprot.writeStructBegin('getPaymentForTxnId_result')
420 ashish 1816
    if self.success != None:
696 rajveer 1817
      oprot.writeFieldBegin('success', TType.LIST, 0)
1818
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1819
      for iter34 in self.success:
1820
        iter34.write(oprot)
1821
      oprot.writeListEnd()
420 ashish 1822
      oprot.writeFieldEnd()
1823
    if self.pe != None:
1824
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1825
      self.pe.write(oprot)
1826
      oprot.writeFieldEnd()
1827
    oprot.writeFieldStop()
1828
    oprot.writeStructEnd()
1829
 
1830
  def __repr__(self):
1831
    L = ['%s=%r' % (key, value)
1832
      for key, value in self.__dict__.iteritems()]
1833
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1834
 
1835
  def __eq__(self, other):
1836
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1837
 
1838
  def __ne__(self, other):
1839
    return not (self == other)
1840
 
696 rajveer 1841
class updatePaymentDetails_args:
420 ashish 1842
  """
1843
  Attributes:
1844
   - id
696 rajveer 1845
   - gatewayPaymentId
1846
   - sessionId
1847
   - gatewayTxnStatus
1848
   - description
1849
   - gatewayTxnId
1850
   - authCode
1851
   - referenceCode
1852
   - errorCode
1853
   - status
1120 rajveer 1854
   - gatewayTxnDate
696 rajveer 1855
   - attributes
420 ashish 1856
  """
1857
 
1858
  thrift_spec = (
1859
    None, # 0
1860
    (1, TType.I64, 'id', None, None, ), # 1
696 rajveer 1861
    (2, TType.STRING, 'gatewayPaymentId', None, None, ), # 2
1862
    (3, TType.STRING, 'sessionId', None, None, ), # 3
1863
    (4, TType.STRING, 'gatewayTxnStatus', None, None, ), # 4
1864
    (5, TType.STRING, 'description', None, None, ), # 5
1865
    (6, TType.STRING, 'gatewayTxnId', None, None, ), # 6
1866
    (7, TType.STRING, 'authCode', None, None, ), # 7
1867
    (8, TType.STRING, 'referenceCode', None, None, ), # 8
1868
    (9, TType.STRING, 'errorCode', None, None, ), # 9
1869
    (10, TType.I32, 'status', None, None, ), # 10
1120 rajveer 1870
    (11, TType.STRING, 'gatewayTxnDate', None, None, ), # 11
1871
    (12, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 12
420 ashish 1872
  )
1873
 
1120 rajveer 1874
  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 1875
    self.id = id
696 rajveer 1876
    self.gatewayPaymentId = gatewayPaymentId
1877
    self.sessionId = sessionId
1878
    self.gatewayTxnStatus = gatewayTxnStatus
1879
    self.description = description
1880
    self.gatewayTxnId = gatewayTxnId
1881
    self.authCode = authCode
1882
    self.referenceCode = referenceCode
1883
    self.errorCode = errorCode
1884
    self.status = status
1120 rajveer 1885
    self.gatewayTxnDate = gatewayTxnDate
696 rajveer 1886
    self.attributes = attributes
420 ashish 1887
 
1888
  def read(self, iprot):
1889
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1890
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1891
      return
1892
    iprot.readStructBegin()
1893
    while True:
1894
      (fname, ftype, fid) = iprot.readFieldBegin()
1895
      if ftype == TType.STOP:
1896
        break
1897
      if fid == 1:
1898
        if ftype == TType.I64:
1899
          self.id = iprot.readI64();
1900
        else:
1901
          iprot.skip(ftype)
1902
      elif fid == 2:
1903
        if ftype == TType.STRING:
696 rajveer 1904
          self.gatewayPaymentId = iprot.readString();
420 ashish 1905
        else:
1906
          iprot.skip(ftype)
1907
      elif fid == 3:
1908
        if ftype == TType.STRING:
696 rajveer 1909
          self.sessionId = iprot.readString();
420 ashish 1910
        else:
1911
          iprot.skip(ftype)
1912
      elif fid == 4:
1913
        if ftype == TType.STRING:
696 rajveer 1914
          self.gatewayTxnStatus = iprot.readString();
420 ashish 1915
        else:
1916
          iprot.skip(ftype)
1917
      elif fid == 5:
1918
        if ftype == TType.STRING:
696 rajveer 1919
          self.description = iprot.readString();
420 ashish 1920
        else:
1921
          iprot.skip(ftype)
1922
      elif fid == 6:
1923
        if ftype == TType.STRING:
696 rajveer 1924
          self.gatewayTxnId = iprot.readString();
420 ashish 1925
        else:
1926
          iprot.skip(ftype)
1927
      elif fid == 7:
1928
        if ftype == TType.STRING:
696 rajveer 1929
          self.authCode = iprot.readString();
420 ashish 1930
        else:
1931
          iprot.skip(ftype)
1932
      elif fid == 8:
1933
        if ftype == TType.STRING:
696 rajveer 1934
          self.referenceCode = iprot.readString();
420 ashish 1935
        else:
1936
          iprot.skip(ftype)
696 rajveer 1937
      elif fid == 9:
1938
        if ftype == TType.STRING:
1939
          self.errorCode = iprot.readString();
1940
        else:
1941
          iprot.skip(ftype)
1942
      elif fid == 10:
1943
        if ftype == TType.I32:
1944
          self.status = iprot.readI32();
1945
        else:
1946
          iprot.skip(ftype)
1947
      elif fid == 11:
1120 rajveer 1948
        if ftype == TType.STRING:
1949
          self.gatewayTxnDate = iprot.readString();
1950
        else:
1951
          iprot.skip(ftype)
1952
      elif fid == 12:
696 rajveer 1953
        if ftype == TType.LIST:
1954
          self.attributes = []
1955
          (_etype38, _size35) = iprot.readListBegin()
1956
          for _i39 in xrange(_size35):
1957
            _elem40 = Attribute()
1958
            _elem40.read(iprot)
1959
            self.attributes.append(_elem40)
1960
          iprot.readListEnd()
1961
        else:
1962
          iprot.skip(ftype)
420 ashish 1963
      else:
1964
        iprot.skip(ftype)
1965
      iprot.readFieldEnd()
1966
    iprot.readStructEnd()
1967
 
1968
  def write(self, oprot):
1969
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1970
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1971
      return
696 rajveer 1972
    oprot.writeStructBegin('updatePaymentDetails_args')
420 ashish 1973
    if self.id != None:
1974
      oprot.writeFieldBegin('id', TType.I64, 1)
1975
      oprot.writeI64(self.id)
1976
      oprot.writeFieldEnd()
696 rajveer 1977
    if self.gatewayPaymentId != None:
1978
      oprot.writeFieldBegin('gatewayPaymentId', TType.STRING, 2)
1979
      oprot.writeString(self.gatewayPaymentId)
420 ashish 1980
      oprot.writeFieldEnd()
696 rajveer 1981
    if self.sessionId != None:
1982
      oprot.writeFieldBegin('sessionId', TType.STRING, 3)
1983
      oprot.writeString(self.sessionId)
420 ashish 1984
      oprot.writeFieldEnd()
696 rajveer 1985
    if self.gatewayTxnStatus != None:
1986
      oprot.writeFieldBegin('gatewayTxnStatus', TType.STRING, 4)
1987
      oprot.writeString(self.gatewayTxnStatus)
420 ashish 1988
      oprot.writeFieldEnd()
696 rajveer 1989
    if self.description != None:
1990
      oprot.writeFieldBegin('description', TType.STRING, 5)
1991
      oprot.writeString(self.description)
420 ashish 1992
      oprot.writeFieldEnd()
696 rajveer 1993
    if self.gatewayTxnId != None:
1994
      oprot.writeFieldBegin('gatewayTxnId', TType.STRING, 6)
1995
      oprot.writeString(self.gatewayTxnId)
420 ashish 1996
      oprot.writeFieldEnd()
696 rajveer 1997
    if self.authCode != None:
1998
      oprot.writeFieldBegin('authCode', TType.STRING, 7)
1999
      oprot.writeString(self.authCode)
420 ashish 2000
      oprot.writeFieldEnd()
696 rajveer 2001
    if self.referenceCode != None:
2002
      oprot.writeFieldBegin('referenceCode', TType.STRING, 8)
2003
      oprot.writeString(self.referenceCode)
420 ashish 2004
      oprot.writeFieldEnd()
696 rajveer 2005
    if self.errorCode != None:
2006
      oprot.writeFieldBegin('errorCode', TType.STRING, 9)
2007
      oprot.writeString(self.errorCode)
2008
      oprot.writeFieldEnd()
2009
    if self.status != None:
2010
      oprot.writeFieldBegin('status', TType.I32, 10)
2011
      oprot.writeI32(self.status)
2012
      oprot.writeFieldEnd()
1120 rajveer 2013
    if self.gatewayTxnDate != None:
2014
      oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)
2015
      oprot.writeString(self.gatewayTxnDate)
2016
      oprot.writeFieldEnd()
696 rajveer 2017
    if self.attributes != None:
1120 rajveer 2018
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
696 rajveer 2019
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
2020
      for iter41 in self.attributes:
2021
        iter41.write(oprot)
2022
      oprot.writeListEnd()
2023
      oprot.writeFieldEnd()
420 ashish 2024
    oprot.writeFieldStop()
2025
    oprot.writeStructEnd()
2026
 
2027
  def __repr__(self):
2028
    L = ['%s=%r' % (key, value)
2029
      for key, value in self.__dict__.iteritems()]
2030
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2031
 
2032
  def __eq__(self, other):
2033
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2034
 
2035
  def __ne__(self, other):
2036
    return not (self == other)
2037
 
696 rajveer 2038
class updatePaymentDetails_result:
420 ashish 2039
  """
2040
  Attributes:
696 rajveer 2041
   - success
420 ashish 2042
   - pe
2043
  """
2044
 
2045
  thrift_spec = (
696 rajveer 2046
    (0, TType.BOOL, 'success', None, None, ), # 0
420 ashish 2047
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2048
  )
2049
 
696 rajveer 2050
  def __init__(self, success=None, pe=None,):
2051
    self.success = success
420 ashish 2052
    self.pe = pe
2053
 
2054
  def read(self, iprot):
2055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2057
      return
2058
    iprot.readStructBegin()
2059
    while True:
2060
      (fname, ftype, fid) = iprot.readFieldBegin()
2061
      if ftype == TType.STOP:
2062
        break
696 rajveer 2063
      if fid == 0:
2064
        if ftype == TType.BOOL:
2065
          self.success = iprot.readBool();
2066
        else:
2067
          iprot.skip(ftype)
2068
      elif fid == 1:
420 ashish 2069
        if ftype == TType.STRUCT:
2070
          self.pe = PaymentException()
2071
          self.pe.read(iprot)
2072
        else:
2073
          iprot.skip(ftype)
2074
      else:
2075
        iprot.skip(ftype)
2076
      iprot.readFieldEnd()
2077
    iprot.readStructEnd()
2078
 
2079
  def write(self, oprot):
2080
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2081
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2082
      return
696 rajveer 2083
    oprot.writeStructBegin('updatePaymentDetails_result')
2084
    if self.success != None:
2085
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2086
      oprot.writeBool(self.success)
2087
      oprot.writeFieldEnd()
420 ashish 2088
    if self.pe != None:
2089
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2090
      self.pe.write(oprot)
2091
      oprot.writeFieldEnd()
2092
    oprot.writeFieldStop()
2093
    oprot.writeStructEnd()
2094
 
2095
  def __repr__(self):
2096
    L = ['%s=%r' % (key, value)
2097
      for key, value in self.__dict__.iteritems()]
2098
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2099
 
2100
  def __eq__(self, other):
2101
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2102
 
2103
  def __ne__(self, other):
2104
    return not (self == other)
2105
 
1731 ankur.sing 2106
class getSuccessfulPaymentsAmountRange_args:
420 ashish 2107
 
1627 ankur.sing 2108
  thrift_spec = (
2109
  )
2110
 
2111
  def read(self, iprot):
2112
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2113
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2114
      return
2115
    iprot.readStructBegin()
2116
    while True:
2117
      (fname, ftype, fid) = iprot.readFieldBegin()
2118
      if ftype == TType.STOP:
2119
        break
2120
      else:
2121
        iprot.skip(ftype)
2122
      iprot.readFieldEnd()
2123
    iprot.readStructEnd()
2124
 
2125
  def write(self, oprot):
2126
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2127
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2128
      return
1731 ankur.sing 2129
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_args')
1627 ankur.sing 2130
    oprot.writeFieldStop()
2131
    oprot.writeStructEnd()
2132
 
2133
  def __repr__(self):
2134
    L = ['%s=%r' % (key, value)
2135
      for key, value in self.__dict__.iteritems()]
2136
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2137
 
2138
  def __eq__(self, other):
2139
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2140
 
2141
  def __ne__(self, other):
2142
    return not (self == other)
2143
 
1731 ankur.sing 2144
class getSuccessfulPaymentsAmountRange_result:
1627 ankur.sing 2145
  """
2146
  Attributes:
2147
   - success
2148
  """
2149
 
2150
  thrift_spec = (
1731 ankur.sing 2151
    (0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0
1627 ankur.sing 2152
  )
2153
 
2154
  def __init__(self, success=None,):
2155
    self.success = success
2156
 
2157
  def read(self, iprot):
2158
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2159
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2160
      return
2161
    iprot.readStructBegin()
2162
    while True:
2163
      (fname, ftype, fid) = iprot.readFieldBegin()
2164
      if ftype == TType.STOP:
2165
        break
2166
      if fid == 0:
1731 ankur.sing 2167
        if ftype == TType.LIST:
2168
          self.success = []
2169
          (_etype45, _size42) = iprot.readListBegin()
2170
          for _i46 in xrange(_size42):
2171
            _elem47 = iprot.readDouble();
2172
            self.success.append(_elem47)
2173
          iprot.readListEnd()
1627 ankur.sing 2174
        else:
2175
          iprot.skip(ftype)
2176
      else:
2177
        iprot.skip(ftype)
2178
      iprot.readFieldEnd()
2179
    iprot.readStructEnd()
2180
 
2181
  def write(self, oprot):
2182
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2183
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2184
      return
1731 ankur.sing 2185
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_result')
1627 ankur.sing 2186
    if self.success != None:
1731 ankur.sing 2187
      oprot.writeFieldBegin('success', TType.LIST, 0)
2188
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
2189
      for iter48 in self.success:
2190
        oprot.writeDouble(iter48)
2191
      oprot.writeListEnd()
1627 ankur.sing 2192
      oprot.writeFieldEnd()
2193
    oprot.writeFieldStop()
2194
    oprot.writeStructEnd()
2195
 
2196
  def __repr__(self):
2197
    L = ['%s=%r' % (key, value)
2198
      for key, value in self.__dict__.iteritems()]
2199
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2200
 
2201
  def __eq__(self, other):
2202
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2203
 
2204
  def __ne__(self, other):
2205
    return not (self == other)
2206
 
2559 chandransh 2207
class updateAndCaptureEbsPayment_args:
2208
  """
2209
  Attributes:
2210
   - paymentParams
2211
  """
1627 ankur.sing 2212
 
2559 chandransh 2213
  thrift_spec = (
2214
    None, # 0
2215
    (1, TType.MAP, 'paymentParams', (TType.STRING,None,TType.STRING,None), None, ), # 1
2216
  )
2217
 
2218
  def __init__(self, paymentParams=None,):
2219
    self.paymentParams = paymentParams
2220
 
2221
  def read(self, iprot):
2222
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2223
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2224
      return
2225
    iprot.readStructBegin()
2226
    while True:
2227
      (fname, ftype, fid) = iprot.readFieldBegin()
2228
      if ftype == TType.STOP:
2229
        break
2230
      if fid == 1:
2231
        if ftype == TType.MAP:
2232
          self.paymentParams = {}
2233
          (_ktype50, _vtype51, _size49 ) = iprot.readMapBegin() 
2234
          for _i53 in xrange(_size49):
2235
            _key54 = iprot.readString();
2236
            _val55 = iprot.readString();
2237
            self.paymentParams[_key54] = _val55
2238
          iprot.readMapEnd()
2239
        else:
2240
          iprot.skip(ftype)
2241
      else:
2242
        iprot.skip(ftype)
2243
      iprot.readFieldEnd()
2244
    iprot.readStructEnd()
2245
 
2246
  def write(self, oprot):
2247
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2248
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2249
      return
2250
    oprot.writeStructBegin('updateAndCaptureEbsPayment_args')
2251
    if self.paymentParams != None:
2252
      oprot.writeFieldBegin('paymentParams', TType.MAP, 1)
2253
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.paymentParams))
2254
      for kiter56,viter57 in self.paymentParams.items():
2255
        oprot.writeString(kiter56)
2256
        oprot.writeString(viter57)
2257
      oprot.writeMapEnd()
2258
      oprot.writeFieldEnd()
2259
    oprot.writeFieldStop()
2260
    oprot.writeStructEnd()
2261
 
2262
  def __repr__(self):
2263
    L = ['%s=%r' % (key, value)
2264
      for key, value in self.__dict__.iteritems()]
2265
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2266
 
2267
  def __eq__(self, other):
2268
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2269
 
2270
  def __ne__(self, other):
2271
    return not (self == other)
2272
 
2273
class updateAndCaptureEbsPayment_result:
2274
  """
2275
  Attributes:
2276
   - success
2277
   - pe
2278
  """
2279
 
2280
  thrift_spec = (
2281
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
2282
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2283
  )
2284
 
2285
  def __init__(self, success=None, pe=None,):
2286
    self.success = success
2287
    self.pe = pe
2288
 
2289
  def read(self, iprot):
2290
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2291
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2292
      return
2293
    iprot.readStructBegin()
2294
    while True:
2295
      (fname, ftype, fid) = iprot.readFieldBegin()
2296
      if ftype == TType.STOP:
2297
        break
2298
      if fid == 0:
2299
        if ftype == TType.STRUCT:
2300
          self.success = Payment()
2301
          self.success.read(iprot)
2302
        else:
2303
          iprot.skip(ftype)
2304
      elif fid == 1:
2305
        if ftype == TType.STRUCT:
2306
          self.pe = PaymentException()
2307
          self.pe.read(iprot)
2308
        else:
2309
          iprot.skip(ftype)
2310
      else:
2311
        iprot.skip(ftype)
2312
      iprot.readFieldEnd()
2313
    iprot.readStructEnd()
2314
 
2315
  def write(self, oprot):
2316
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2317
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2318
      return
2319
    oprot.writeStructBegin('updateAndCaptureEbsPayment_result')
2320
    if self.success != None:
2321
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2322
      self.success.write(oprot)
2323
      oprot.writeFieldEnd()
2324
    if self.pe != None:
2325
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2326
      self.pe.write(oprot)
2327
      oprot.writeFieldEnd()
2328
    oprot.writeFieldStop()
2329
    oprot.writeStructEnd()
2330
 
2331
  def __repr__(self):
2332
    L = ['%s=%r' % (key, value)
2333
      for key, value in self.__dict__.iteritems()]
2334
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2335
 
2336
  def __eq__(self, other):
2337
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2338
 
2339
  def __ne__(self, other):
2340
    return not (self == other)
2341
 
2342
class captureHdfcPayment_args:
2343
  """
2344
  Attributes:
2345
   - merchantPaymentId
2346
  """
2347
 
2348
  thrift_spec = (
2349
    None, # 0
2350
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
2351
  )
2352
 
2353
  def __init__(self, merchantPaymentId=None,):
2354
    self.merchantPaymentId = merchantPaymentId
2355
 
2356
  def read(self, iprot):
2357
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2358
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2359
      return
2360
    iprot.readStructBegin()
2361
    while True:
2362
      (fname, ftype, fid) = iprot.readFieldBegin()
2363
      if ftype == TType.STOP:
2364
        break
2365
      if fid == 1:
2366
        if ftype == TType.I64:
2367
          self.merchantPaymentId = iprot.readI64();
2368
        else:
2369
          iprot.skip(ftype)
2370
      else:
2371
        iprot.skip(ftype)
2372
      iprot.readFieldEnd()
2373
    iprot.readStructEnd()
2374
 
2375
  def write(self, oprot):
2376
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2377
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2378
      return
2379
    oprot.writeStructBegin('captureHdfcPayment_args')
2380
    if self.merchantPaymentId != None:
2381
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2382
      oprot.writeI64(self.merchantPaymentId)
2383
      oprot.writeFieldEnd()
2384
    oprot.writeFieldStop()
2385
    oprot.writeStructEnd()
2386
 
2387
  def __repr__(self):
2388
    L = ['%s=%r' % (key, value)
2389
      for key, value in self.__dict__.iteritems()]
2390
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2391
 
2392
  def __eq__(self, other):
2393
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2394
 
2395
  def __ne__(self, other):
2396
    return not (self == other)
2397
 
2398
class captureHdfcPayment_result:
2399
  """
2400
  Attributes:
2401
   - success
2402
   - pe
2403
  """
2404
 
2405
  thrift_spec = (
2406
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
2407
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2408
  )
2409
 
2410
  def __init__(self, success=None, pe=None,):
2411
    self.success = success
2412
    self.pe = pe
2413
 
2414
  def read(self, iprot):
2415
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2416
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2417
      return
2418
    iprot.readStructBegin()
2419
    while True:
2420
      (fname, ftype, fid) = iprot.readFieldBegin()
2421
      if ftype == TType.STOP:
2422
        break
2423
      if fid == 0:
2424
        if ftype == TType.MAP:
2425
          self.success = {}
2426
          (_ktype59, _vtype60, _size58 ) = iprot.readMapBegin() 
2427
          for _i62 in xrange(_size58):
2428
            _key63 = iprot.readString();
2429
            _val64 = iprot.readString();
2430
            self.success[_key63] = _val64
2431
          iprot.readMapEnd()
2432
        else:
2433
          iprot.skip(ftype)
2434
      elif fid == 1:
2435
        if ftype == TType.STRUCT:
2436
          self.pe = PaymentException()
2437
          self.pe.read(iprot)
2438
        else:
2439
          iprot.skip(ftype)
2440
      else:
2441
        iprot.skip(ftype)
2442
      iprot.readFieldEnd()
2443
    iprot.readStructEnd()
2444
 
2445
  def write(self, oprot):
2446
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2447
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2448
      return
2449
    oprot.writeStructBegin('captureHdfcPayment_result')
2450
    if self.success != None:
2451
      oprot.writeFieldBegin('success', TType.MAP, 0)
2452
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
2453
      for kiter65,viter66 in self.success.items():
2454
        oprot.writeString(kiter65)
2455
        oprot.writeString(viter66)
2456
      oprot.writeMapEnd()
2457
      oprot.writeFieldEnd()
2458
    if self.pe != None:
2459
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2460
      self.pe.write(oprot)
2461
      oprot.writeFieldEnd()
2462
    oprot.writeFieldStop()
2463
    oprot.writeStructEnd()
2464
 
2465
  def __repr__(self):
2466
    L = ['%s=%r' % (key, value)
2467
      for key, value in self.__dict__.iteritems()]
2468
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2469
 
2470
  def __eq__(self, other):
2471
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2472
 
2473
  def __ne__(self, other):
2474
    return not (self == other)
2475
 
2476
class initializeHdfcPayment_args:
2477
  """
2478
  Attributes:
2479
   - merchantPaymentId
2480
  """
2481
 
2482
  thrift_spec = (
2483
    None, # 0
2484
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
2485
  )
2486
 
2487
  def __init__(self, merchantPaymentId=None,):
2488
    self.merchantPaymentId = merchantPaymentId
2489
 
2490
  def read(self, iprot):
2491
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2492
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2493
      return
2494
    iprot.readStructBegin()
2495
    while True:
2496
      (fname, ftype, fid) = iprot.readFieldBegin()
2497
      if ftype == TType.STOP:
2498
        break
2499
      if fid == 1:
2500
        if ftype == TType.I64:
2501
          self.merchantPaymentId = iprot.readI64();
2502
        else:
2503
          iprot.skip(ftype)
2504
      else:
2505
        iprot.skip(ftype)
2506
      iprot.readFieldEnd()
2507
    iprot.readStructEnd()
2508
 
2509
  def write(self, oprot):
2510
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2511
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2512
      return
2513
    oprot.writeStructBegin('initializeHdfcPayment_args')
2514
    if self.merchantPaymentId != None:
2515
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2516
      oprot.writeI64(self.merchantPaymentId)
2517
      oprot.writeFieldEnd()
2518
    oprot.writeFieldStop()
2519
    oprot.writeStructEnd()
2520
 
2521
  def __repr__(self):
2522
    L = ['%s=%r' % (key, value)
2523
      for key, value in self.__dict__.iteritems()]
2524
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2525
 
2526
  def __eq__(self, other):
2527
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2528
 
2529
  def __ne__(self, other):
2530
    return not (self == other)
2531
 
2532
class initializeHdfcPayment_result:
2533
  """
2534
  Attributes:
2535
   - success
2536
   - pe
2537
  """
2538
 
2539
  thrift_spec = (
2540
    (0, TType.STRING, 'success', None, None, ), # 0
2541
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2542
  )
2543
 
2544
  def __init__(self, success=None, pe=None,):
2545
    self.success = success
2546
    self.pe = pe
2547
 
2548
  def read(self, iprot):
2549
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2550
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2551
      return
2552
    iprot.readStructBegin()
2553
    while True:
2554
      (fname, ftype, fid) = iprot.readFieldBegin()
2555
      if ftype == TType.STOP:
2556
        break
2557
      if fid == 0:
2558
        if ftype == TType.STRING:
2559
          self.success = iprot.readString();
2560
        else:
2561
          iprot.skip(ftype)
2562
      elif fid == 1:
2563
        if ftype == TType.STRUCT:
2564
          self.pe = PaymentException()
2565
          self.pe.read(iprot)
2566
        else:
2567
          iprot.skip(ftype)
2568
      else:
2569
        iprot.skip(ftype)
2570
      iprot.readFieldEnd()
2571
    iprot.readStructEnd()
2572
 
2573
  def write(self, oprot):
2574
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2575
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2576
      return
2577
    oprot.writeStructBegin('initializeHdfcPayment_result')
2578
    if self.success != None:
2579
      oprot.writeFieldBegin('success', TType.STRING, 0)
2580
      oprot.writeString(self.success)
2581
      oprot.writeFieldEnd()
2582
    if self.pe != None:
2583
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2584
      self.pe.write(oprot)
2585
      oprot.writeFieldEnd()
2586
    oprot.writeFieldStop()
2587
    oprot.writeStructEnd()
2588
 
2589
  def __repr__(self):
2590
    L = ['%s=%r' % (key, value)
2591
      for key, value in self.__dict__.iteritems()]
2592
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2593
 
2594
  def __eq__(self, other):
2595
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2596
 
2597
  def __ne__(self, other):
2598
    return not (self == other)
2599
 
2685 chandransh 2600
class createRefund_args:
2601
  """
2602
  Attributes:
2603
   - orderId
2604
   - merchantTxnId
2605
   - amount
2606
  """
2559 chandransh 2607
 
2685 chandransh 2608
  thrift_spec = (
2609
    None, # 0
2610
    (1, TType.I64, 'orderId', None, None, ), # 1
2611
    (2, TType.I64, 'merchantTxnId', None, None, ), # 2
2612
    (3, TType.DOUBLE, 'amount', None, None, ), # 3
2613
  )
2614
 
2615
  def __init__(self, orderId=None, merchantTxnId=None, amount=None,):
2616
    self.orderId = orderId
2617
    self.merchantTxnId = merchantTxnId
2618
    self.amount = amount
2619
 
2620
  def read(self, iprot):
2621
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2622
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2623
      return
2624
    iprot.readStructBegin()
2625
    while True:
2626
      (fname, ftype, fid) = iprot.readFieldBegin()
2627
      if ftype == TType.STOP:
2628
        break
2629
      if fid == 1:
2630
        if ftype == TType.I64:
2631
          self.orderId = iprot.readI64();
2632
        else:
2633
          iprot.skip(ftype)
2634
      elif fid == 2:
2635
        if ftype == TType.I64:
2636
          self.merchantTxnId = iprot.readI64();
2637
        else:
2638
          iprot.skip(ftype)
2639
      elif fid == 3:
2640
        if ftype == TType.DOUBLE:
2641
          self.amount = iprot.readDouble();
2642
        else:
2643
          iprot.skip(ftype)
2644
      else:
2645
        iprot.skip(ftype)
2646
      iprot.readFieldEnd()
2647
    iprot.readStructEnd()
2648
 
2649
  def write(self, oprot):
2650
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2651
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2652
      return
2653
    oprot.writeStructBegin('createRefund_args')
2654
    if self.orderId != None:
2655
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2656
      oprot.writeI64(self.orderId)
2657
      oprot.writeFieldEnd()
2658
    if self.merchantTxnId != None:
2659
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 2)
2660
      oprot.writeI64(self.merchantTxnId)
2661
      oprot.writeFieldEnd()
2662
    if self.amount != None:
2663
      oprot.writeFieldBegin('amount', TType.DOUBLE, 3)
2664
      oprot.writeDouble(self.amount)
2665
      oprot.writeFieldEnd()
2666
    oprot.writeFieldStop()
2667
    oprot.writeStructEnd()
2668
 
2669
  def __repr__(self):
2670
    L = ['%s=%r' % (key, value)
2671
      for key, value in self.__dict__.iteritems()]
2672
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2673
 
2674
  def __eq__(self, other):
2675
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2676
 
2677
  def __ne__(self, other):
2678
    return not (self == other)
2679
 
2680
class createRefund_result:
2681
  """
2682
  Attributes:
2683
   - success
2684
   - pe
2685
  """
2686
 
2687
  thrift_spec = (
2688
    (0, TType.I64, 'success', None, None, ), # 0
2689
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2690
  )
2691
 
2692
  def __init__(self, success=None, pe=None,):
2693
    self.success = success
2694
    self.pe = pe
2695
 
2696
  def read(self, iprot):
2697
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2698
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2699
      return
2700
    iprot.readStructBegin()
2701
    while True:
2702
      (fname, ftype, fid) = iprot.readFieldBegin()
2703
      if ftype == TType.STOP:
2704
        break
2705
      if fid == 0:
2706
        if ftype == TType.I64:
2707
          self.success = iprot.readI64();
2708
        else:
2709
          iprot.skip(ftype)
2710
      elif fid == 1:
2711
        if ftype == TType.STRUCT:
2712
          self.pe = PaymentException()
2713
          self.pe.read(iprot)
2714
        else:
2715
          iprot.skip(ftype)
2716
      else:
2717
        iprot.skip(ftype)
2718
      iprot.readFieldEnd()
2719
    iprot.readStructEnd()
2720
 
2721
  def write(self, oprot):
2722
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2723
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2724
      return
2725
    oprot.writeStructBegin('createRefund_result')
2726
    if self.success != None:
2727
      oprot.writeFieldBegin('success', TType.I64, 0)
2728
      oprot.writeI64(self.success)
2729
      oprot.writeFieldEnd()
2730
    if self.pe != None:
2731
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2732
      self.pe.write(oprot)
2733
      oprot.writeFieldEnd()
2734
    oprot.writeFieldStop()
2735
    oprot.writeStructEnd()
2736
 
2737
  def __repr__(self):
2738
    L = ['%s=%r' % (key, value)
2739
      for key, value in self.__dict__.iteritems()]
2740
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2741
 
2742
  def __eq__(self, other):
2743
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2744
 
2745
  def __ne__(self, other):
2746
    return not (self == other)
2747
 
2748