Subversion Repositories SmartDukaan

Rev

Rev 3616 | Rev 4008 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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