Subversion Repositories SmartDukaan

Rev

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