Subversion Repositories SmartDukaan

Rev

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