Subversion Repositories SmartDukaan

Rev

Rev 4600 | Rev 6228 | 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):
6050 anupam.sin 20
  def createPayment(self, userId, amount, gatewayId, txnId, isDigital):
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
 
420 ashish 24
    Parameters:
696 rajveer 25
     - userId
420 ashish 26
     - amount
696 rajveer 27
     - gatewayId
28
     - txnId
6050 anupam.sin 29
     - isDigital
420 ashish 30
    """
31
    pass
32
 
696 rajveer 33
  def getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):
420 ashish 34
    """
4141 chandransh 35
    Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.
3431 rajveer 36
 
420 ashish 37
    Parameters:
38
     - userId
696 rajveer 39
     - fromTime
40
     - toTime
420 ashish 41
     - status
696 rajveer 42
     - gatewayId
420 ashish 43
    """
44
    pass
45
 
696 rajveer 46
  def getPayments(self, fromTime, toTime, status, gatewayId):
420 ashish 47
    """
4141 chandransh 48
    Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.
3431 rajveer 49
 
420 ashish 50
    Parameters:
696 rajveer 51
     - fromTime
52
     - toTime
420 ashish 53
     - status
696 rajveer 54
     - gatewayId
420 ashish 55
    """
56
    pass
57
 
4141 chandransh 58
  def getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):
59
    """
60
    Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.
61
 
62
    Parameters:
63
     - fromTime
64
     - toTime
65
     - gatewayId
66
    """
67
    pass
68
 
420 ashish 69
  def getPaymentGateway(self, id):
70
    """
4141 chandransh 71
    Get the gateway for the given id.
3431 rajveer 72
 
420 ashish 73
    Parameters:
74
     - id
75
    """
76
    pass
77
 
4600 varun.gupt 78
  def getActivePaymentGateways(self, ):
79
    """
80
    Get all active Payment Gateways
81
 
82
    """
83
    pass
84
 
696 rajveer 85
  def getPayment(self, id):
420 ashish 86
    """
696 rajveer 87
    Get a particular payment info
3431 rajveer 88
 
89
 
420 ashish 90
    Parameters:
91
     - id
92
    """
93
    pass
94
 
696 rajveer 95
  def getPaymentForTxnId(self, txnId):
420 ashish 96
    """
4600 varun.gupt 97
    Get payments for a transaction. Will raise exception.
3431 rajveer 98
 
99
 
420 ashish 100
    Parameters:
696 rajveer 101
     - txnId
420 ashish 102
    """
103
    pass
104
 
4600 varun.gupt 105
  def getSuccessfulPaymentForTxnId(self, txnId):
106
    """
107
    Get successful payment for a transaction. Will raise exception.
108
 
109
 
110
    Parameters:
111
     - txnId
112
    """
113
    pass
114
 
1120 rajveer 115
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
420 ashish 116
    """
696 rajveer 117
    mark payment successful and store parameters
3431 rajveer 118
 
119
 
420 ashish 120
    Parameters:
121
     - id
696 rajveer 122
     - gatewayPaymentId
123
     - sessionId
124
     - gatewayTxnStatus
125
     - description
126
     - gatewayTxnId
127
     - authCode
128
     - referenceCode
129
     - errorCode
130
     - status
1120 rajveer 131
     - gatewayTxnDate
696 rajveer 132
     - attributes
420 ashish 133
    """
134
    pass
135
 
1731 ankur.sing 136
  def getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 137
    """
1731 ankur.sing 138
    Returns the minimum and maximum amounts among successful payments.
139
    List contains two double values, first minimum and second maximum amount.
1627 ankur.sing 140
    """
141
    pass
420 ashish 142
 
2559 chandransh 143
  def initializeHdfcPayment(self, merchantPaymentId):
144
    """
145
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
146
    In case of any processing error, an exception is raised.
3431 rajveer 147
 
2559 chandransh 148
    Parameters:
149
     - merchantPaymentId
150
    """
151
    pass
152
 
6050 anupam.sin 153
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
154
    """
155
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
156
    In case of any processing error, an exception is raised.
157
 
158
    Parameters:
159
     - merchantPaymentId
160
     - rechargeOrderId
161
    """
162
    pass
163
 
3616 chandransh 164
  def initializeHdfcEmiPayment(self, merchantPaymentId):
165
    """
166
    Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
167
    In case of any processing error, an exception is raised.
168
 
169
    Parameters:
170
     - merchantPaymentId
171
    """
172
    pass
173
 
2685 chandransh 174
  def createRefund(self, orderId, merchantTxnId, amount):
175
    """
176
    Create a refund of the given amount corresponding to the given order to be processed through the same
177
    payment gateway which processed the payment for the corresponding transaction.
2687 chandransh 178
    Returns the id of the newly created Refund.
3431 rajveer 179
 
2685 chandransh 180
    Parameters:
181
     - orderId
182
     - merchantTxnId
183
     - amount
184
    """
185
    pass
2559 chandransh 186
 
3010 chandransh 187
  def capturePayment(self, merchantTxnId):
188
    """
189
    Capture the payment for the given merchant transaction id. It processes the last payment for the given
4421 mandeep.dh 190
    transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
191
    code 104 is	thrown in case no payments are found for the transaction id passed.
192
    PaymentException is also thrown with error code 106 in case capture was not possible due to connection
193
    issue. Here, we	payment also gets updated to CAPTURE_INPROCESS state
3431 rajveer 194
 
3010 chandransh 195
    Parameters:
196
     - merchantTxnId
197
    """
198
    pass
2685 chandransh 199
 
3956 chandransh 200
  def partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):
201
    """
202
    Adds the given amount to the captured amount of a COD payment.
203
    Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
204
    If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
205
    Also sets the name of the entity which transferred the money, the date on which it was transferred
206
    and the corresponding transaction id.
3010 chandransh 207
 
3956 chandransh 208
    Returns false if the payment couldn't be captured.
209
    Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
210
 
211
    Parameters:
212
     - merchantTxnId
213
     - amount
214
     - xferBy
215
     - xferTxnId
216
     - xferDate
217
    """
218
    pass
219
 
4008 mandeep.dh 220
  def getPaymentsRequiringExtraProcessing(self, category):
221
    """
222
    Returns the list of payments that require some extra processing and
223
    which belong to a particular category. This is currently used by CRM
224
    application.
3956 chandransh 225
 
4008 mandeep.dh 226
    Parameters:
227
     - category
228
    """
229
    pass
230
 
231
  def markPaymentAsProcessed(self, paymentId, category):
232
    """
233
    Marks a particular payment as processed for a particular cateogory.
234
    It essentially deletes the payment if it is processed for a particular
235
    category. This is currently used by CRM application.
236
 
237
    Parameters:
238
     - paymentId
239
     - category
240
    """
241
    pass
242
 
243
 
3376 rajveer 244
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
420 ashish 245
  def __init__(self, iprot, oprot=None):
3376 rajveer 246
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
420 ashish 247
 
6050 anupam.sin 248
  def createPayment(self, userId, amount, gatewayId, txnId, isDigital):
420 ashish 249
    """
696 rajveer 250
    create a new payment and return payment id, throws an exception if gateway is not active
3431 rajveer 251
 
420 ashish 252
    Parameters:
696 rajveer 253
     - userId
420 ashish 254
     - amount
696 rajveer 255
     - gatewayId
256
     - txnId
6050 anupam.sin 257
     - isDigital
420 ashish 258
    """
6050 anupam.sin 259
    self.send_createPayment(userId, amount, gatewayId, txnId, isDigital)
420 ashish 260
    return self.recv_createPayment()
261
 
6050 anupam.sin 262
  def send_createPayment(self, userId, amount, gatewayId, txnId, isDigital):
420 ashish 263
    self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)
264
    args = createPayment_args()
696 rajveer 265
    args.userId = userId
420 ashish 266
    args.amount = amount
696 rajveer 267
    args.gatewayId = gatewayId
268
    args.txnId = txnId
6050 anupam.sin 269
    args.isDigital = isDigital
420 ashish 270
    args.write(self._oprot)
271
    self._oprot.writeMessageEnd()
272
    self._oprot.trans.flush()
273
 
274
  def recv_createPayment(self, ):
275
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
276
    if mtype == TMessageType.EXCEPTION:
277
      x = TApplicationException()
278
      x.read(self._iprot)
279
      self._iprot.readMessageEnd()
280
      raise x
281
    result = createPayment_result()
282
    result.read(self._iprot)
283
    self._iprot.readMessageEnd()
3431 rajveer 284
    if result.success is not None:
420 ashish 285
      return result.success
3431 rajveer 286
    if result.pe is not None:
420 ashish 287
      raise result.pe
288
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
289
 
696 rajveer 290
  def getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):
420 ashish 291
    """
4141 chandransh 292
    Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.
3431 rajveer 293
 
420 ashish 294
    Parameters:
295
     - userId
696 rajveer 296
     - fromTime
297
     - toTime
420 ashish 298
     - status
696 rajveer 299
     - gatewayId
420 ashish 300
    """
696 rajveer 301
    self.send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId)
420 ashish 302
    return self.recv_getPaymentsForUser()
303
 
696 rajveer 304
  def send_getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):
420 ashish 305
    self._oprot.writeMessageBegin('getPaymentsForUser', TMessageType.CALL, self._seqid)
306
    args = getPaymentsForUser_args()
307
    args.userId = userId
696 rajveer 308
    args.fromTime = fromTime
309
    args.toTime = toTime
420 ashish 310
    args.status = status
696 rajveer 311
    args.gatewayId = gatewayId
420 ashish 312
    args.write(self._oprot)
313
    self._oprot.writeMessageEnd()
314
    self._oprot.trans.flush()
315
 
316
  def recv_getPaymentsForUser(self, ):
317
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
318
    if mtype == TMessageType.EXCEPTION:
319
      x = TApplicationException()
320
      x.read(self._iprot)
321
      self._iprot.readMessageEnd()
322
      raise x
323
    result = getPaymentsForUser_result()
324
    result.read(self._iprot)
325
    self._iprot.readMessageEnd()
3431 rajveer 326
    if result.success is not None:
420 ashish 327
      return result.success
3431 rajveer 328
    if result.pe is not None:
420 ashish 329
      raise result.pe
330
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
331
 
696 rajveer 332
  def getPayments(self, fromTime, toTime, status, gatewayId):
420 ashish 333
    """
4141 chandransh 334
    Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.
3431 rajveer 335
 
420 ashish 336
    Parameters:
696 rajveer 337
     - fromTime
338
     - toTime
420 ashish 339
     - status
696 rajveer 340
     - gatewayId
420 ashish 341
    """
696 rajveer 342
    self.send_getPayments(fromTime, toTime, status, gatewayId)
420 ashish 343
    return self.recv_getPayments()
344
 
696 rajveer 345
  def send_getPayments(self, fromTime, toTime, status, gatewayId):
420 ashish 346
    self._oprot.writeMessageBegin('getPayments', TMessageType.CALL, self._seqid)
347
    args = getPayments_args()
696 rajveer 348
    args.fromTime = fromTime
349
    args.toTime = toTime
420 ashish 350
    args.status = status
696 rajveer 351
    args.gatewayId = gatewayId
420 ashish 352
    args.write(self._oprot)
353
    self._oprot.writeMessageEnd()
354
    self._oprot.trans.flush()
355
 
356
  def recv_getPayments(self, ):
357
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
358
    if mtype == TMessageType.EXCEPTION:
359
      x = TApplicationException()
360
      x.read(self._iprot)
361
      self._iprot.readMessageEnd()
362
      raise x
363
    result = getPayments_result()
364
    result.read(self._iprot)
365
    self._iprot.readMessageEnd()
3431 rajveer 366
    if result.success is not None:
420 ashish 367
      return result.success
3431 rajveer 368
    if result.pe is not None:
420 ashish 369
      raise result.pe
370
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
371
 
4141 chandransh 372
  def getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):
373
    """
374
    Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.
375
 
376
    Parameters:
377
     - fromTime
378
     - toTime
379
     - gatewayId
380
    """
381
    self.send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId)
382
    return self.recv_getPaymentsByCapturedDate()
383
 
384
  def send_getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):
385
    self._oprot.writeMessageBegin('getPaymentsByCapturedDate', TMessageType.CALL, self._seqid)
386
    args = getPaymentsByCapturedDate_args()
387
    args.fromTime = fromTime
388
    args.toTime = toTime
389
    args.gatewayId = gatewayId
390
    args.write(self._oprot)
391
    self._oprot.writeMessageEnd()
392
    self._oprot.trans.flush()
393
 
394
  def recv_getPaymentsByCapturedDate(self, ):
395
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
396
    if mtype == TMessageType.EXCEPTION:
397
      x = TApplicationException()
398
      x.read(self._iprot)
399
      self._iprot.readMessageEnd()
400
      raise x
401
    result = getPaymentsByCapturedDate_result()
402
    result.read(self._iprot)
403
    self._iprot.readMessageEnd()
404
    if result.success is not None:
405
      return result.success
406
    if result.pe is not None:
407
      raise result.pe
408
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");
409
 
420 ashish 410
  def getPaymentGateway(self, id):
411
    """
4141 chandransh 412
    Get the gateway for the given id.
3431 rajveer 413
 
420 ashish 414
    Parameters:
415
     - id
416
    """
417
    self.send_getPaymentGateway(id)
418
    return self.recv_getPaymentGateway()
419
 
420
  def send_getPaymentGateway(self, id):
421
    self._oprot.writeMessageBegin('getPaymentGateway', TMessageType.CALL, self._seqid)
422
    args = getPaymentGateway_args()
423
    args.id = id
424
    args.write(self._oprot)
425
    self._oprot.writeMessageEnd()
426
    self._oprot.trans.flush()
427
 
428
  def recv_getPaymentGateway(self, ):
429
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
430
    if mtype == TMessageType.EXCEPTION:
431
      x = TApplicationException()
432
      x.read(self._iprot)
433
      self._iprot.readMessageEnd()
434
      raise x
435
    result = getPaymentGateway_result()
436
    result.read(self._iprot)
437
    self._iprot.readMessageEnd()
3431 rajveer 438
    if result.success is not None:
420 ashish 439
      return result.success
3431 rajveer 440
    if result.pe is not None:
420 ashish 441
      raise result.pe
442
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
443
 
4600 varun.gupt 444
  def getActivePaymentGateways(self, ):
445
    """
446
    Get all active Payment Gateways
447
 
448
    """
449
    self.send_getActivePaymentGateways()
450
    return self.recv_getActivePaymentGateways()
451
 
452
  def send_getActivePaymentGateways(self, ):
453
    self._oprot.writeMessageBegin('getActivePaymentGateways', TMessageType.CALL, self._seqid)
454
    args = getActivePaymentGateways_args()
455
    args.write(self._oprot)
456
    self._oprot.writeMessageEnd()
457
    self._oprot.trans.flush()
458
 
459
  def recv_getActivePaymentGateways(self, ):
460
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
461
    if mtype == TMessageType.EXCEPTION:
462
      x = TApplicationException()
463
      x.read(self._iprot)
464
      self._iprot.readMessageEnd()
465
      raise x
466
    result = getActivePaymentGateways_result()
467
    result.read(self._iprot)
468
    self._iprot.readMessageEnd()
469
    if result.success is not None:
470
      return result.success
471
    if result.pe is not None:
472
      raise result.pe
473
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getActivePaymentGateways failed: unknown result");
474
 
696 rajveer 475
  def getPayment(self, id):
420 ashish 476
    """
696 rajveer 477
    Get a particular payment info
3431 rajveer 478
 
479
 
420 ashish 480
    Parameters:
481
     - id
482
    """
696 rajveer 483
    self.send_getPayment(id)
484
    return self.recv_getPayment()
420 ashish 485
 
696 rajveer 486
  def send_getPayment(self, id):
487
    self._oprot.writeMessageBegin('getPayment', TMessageType.CALL, self._seqid)
488
    args = getPayment_args()
420 ashish 489
    args.id = id
490
    args.write(self._oprot)
491
    self._oprot.writeMessageEnd()
492
    self._oprot.trans.flush()
493
 
696 rajveer 494
  def recv_getPayment(self, ):
420 ashish 495
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
496
    if mtype == TMessageType.EXCEPTION:
497
      x = TApplicationException()
498
      x.read(self._iprot)
499
      self._iprot.readMessageEnd()
500
      raise x
696 rajveer 501
    result = getPayment_result()
420 ashish 502
    result.read(self._iprot)
503
    self._iprot.readMessageEnd()
3431 rajveer 504
    if result.success is not None:
696 rajveer 505
      return result.success
3431 rajveer 506
    if result.pe is not None:
420 ashish 507
      raise result.pe
696 rajveer 508
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 509
 
696 rajveer 510
  def getPaymentForTxnId(self, txnId):
420 ashish 511
    """
4600 varun.gupt 512
    Get payments for a transaction. Will raise exception.
3431 rajveer 513
 
514
 
420 ashish 515
    Parameters:
696 rajveer 516
     - txnId
420 ashish 517
    """
696 rajveer 518
    self.send_getPaymentForTxnId(txnId)
519
    return self.recv_getPaymentForTxnId()
420 ashish 520
 
696 rajveer 521
  def send_getPaymentForTxnId(self, txnId):
522
    self._oprot.writeMessageBegin('getPaymentForTxnId', TMessageType.CALL, self._seqid)
523
    args = getPaymentForTxnId_args()
524
    args.txnId = txnId
420 ashish 525
    args.write(self._oprot)
526
    self._oprot.writeMessageEnd()
527
    self._oprot.trans.flush()
528
 
696 rajveer 529
  def recv_getPaymentForTxnId(self, ):
420 ashish 530
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
531
    if mtype == TMessageType.EXCEPTION:
532
      x = TApplicationException()
533
      x.read(self._iprot)
534
      self._iprot.readMessageEnd()
535
      raise x
696 rajveer 536
    result = getPaymentForTxnId_result()
420 ashish 537
    result.read(self._iprot)
538
    self._iprot.readMessageEnd()
3431 rajveer 539
    if result.success is not None:
420 ashish 540
      return result.success
3431 rajveer 541
    if result.pe is not None:
420 ashish 542
      raise result.pe
696 rajveer 543
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 544
 
4600 varun.gupt 545
  def getSuccessfulPaymentForTxnId(self, txnId):
546
    """
547
    Get successful payment for a transaction. Will raise exception.
548
 
549
 
550
    Parameters:
551
     - txnId
552
    """
553
    self.send_getSuccessfulPaymentForTxnId(txnId)
554
    return self.recv_getSuccessfulPaymentForTxnId()
555
 
556
  def send_getSuccessfulPaymentForTxnId(self, txnId):
557
    self._oprot.writeMessageBegin('getSuccessfulPaymentForTxnId', TMessageType.CALL, self._seqid)
558
    args = getSuccessfulPaymentForTxnId_args()
559
    args.txnId = txnId
560
    args.write(self._oprot)
561
    self._oprot.writeMessageEnd()
562
    self._oprot.trans.flush()
563
 
564
  def recv_getSuccessfulPaymentForTxnId(self, ):
565
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
566
    if mtype == TMessageType.EXCEPTION:
567
      x = TApplicationException()
568
      x.read(self._iprot)
569
      self._iprot.readMessageEnd()
570
      raise x
571
    result = getSuccessfulPaymentForTxnId_result()
572
    result.read(self._iprot)
573
    self._iprot.readMessageEnd()
574
    if result.success is not None:
575
      return result.success
576
    if result.pe is not None:
577
      raise result.pe
578
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentForTxnId failed: unknown result");
579
 
1120 rajveer 580
  def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
420 ashish 581
    """
696 rajveer 582
    mark payment successful and store parameters
3431 rajveer 583
 
584
 
420 ashish 585
    Parameters:
586
     - id
696 rajveer 587
     - gatewayPaymentId
588
     - sessionId
589
     - gatewayTxnStatus
590
     - description
591
     - gatewayTxnId
592
     - authCode
593
     - referenceCode
594
     - errorCode
595
     - status
1120 rajveer 596
     - gatewayTxnDate
696 rajveer 597
     - attributes
420 ashish 598
    """
1120 rajveer 599
    self.send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes)
696 rajveer 600
    return self.recv_updatePaymentDetails()
420 ashish 601
 
1120 rajveer 602
  def send_updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):
696 rajveer 603
    self._oprot.writeMessageBegin('updatePaymentDetails', TMessageType.CALL, self._seqid)
604
    args = updatePaymentDetails_args()
420 ashish 605
    args.id = id
696 rajveer 606
    args.gatewayPaymentId = gatewayPaymentId
607
    args.sessionId = sessionId
608
    args.gatewayTxnStatus = gatewayTxnStatus
609
    args.description = description
610
    args.gatewayTxnId = gatewayTxnId
611
    args.authCode = authCode
612
    args.referenceCode = referenceCode
613
    args.errorCode = errorCode
614
    args.status = status
1120 rajveer 615
    args.gatewayTxnDate = gatewayTxnDate
696 rajveer 616
    args.attributes = attributes
420 ashish 617
    args.write(self._oprot)
618
    self._oprot.writeMessageEnd()
619
    self._oprot.trans.flush()
620
 
696 rajveer 621
  def recv_updatePaymentDetails(self, ):
420 ashish 622
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
623
    if mtype == TMessageType.EXCEPTION:
624
      x = TApplicationException()
625
      x.read(self._iprot)
626
      self._iprot.readMessageEnd()
627
      raise x
696 rajveer 628
    result = updatePaymentDetails_result()
420 ashish 629
    result.read(self._iprot)
630
    self._iprot.readMessageEnd()
3431 rajveer 631
    if result.success is not None:
696 rajveer 632
      return result.success
3431 rajveer 633
    if result.pe is not None:
420 ashish 634
      raise result.pe
696 rajveer 635
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 636
 
1731 ankur.sing 637
  def getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 638
    """
1731 ankur.sing 639
    Returns the minimum and maximum amounts among successful payments.
640
    List contains two double values, first minimum and second maximum amount.
1627 ankur.sing 641
    """
1731 ankur.sing 642
    self.send_getSuccessfulPaymentsAmountRange()
643
    return self.recv_getSuccessfulPaymentsAmountRange()
420 ashish 644
 
1731 ankur.sing 645
  def send_getSuccessfulPaymentsAmountRange(self, ):
646
    self._oprot.writeMessageBegin('getSuccessfulPaymentsAmountRange', TMessageType.CALL, self._seqid)
647
    args = getSuccessfulPaymentsAmountRange_args()
1627 ankur.sing 648
    args.write(self._oprot)
649
    self._oprot.writeMessageEnd()
650
    self._oprot.trans.flush()
651
 
1731 ankur.sing 652
  def recv_getSuccessfulPaymentsAmountRange(self, ):
1627 ankur.sing 653
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
654
    if mtype == TMessageType.EXCEPTION:
655
      x = TApplicationException()
656
      x.read(self._iprot)
657
      self._iprot.readMessageEnd()
658
      raise x
1731 ankur.sing 659
    result = getSuccessfulPaymentsAmountRange_result()
1627 ankur.sing 660
    result.read(self._iprot)
661
    self._iprot.readMessageEnd()
3431 rajveer 662
    if result.success is not None:
1627 ankur.sing 663
      return result.success
1731 ankur.sing 664
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1627 ankur.sing 665
 
2559 chandransh 666
  def initializeHdfcPayment(self, merchantPaymentId):
667
    """
668
    Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
669
    In case of any processing error, an exception is raised.
3431 rajveer 670
 
2559 chandransh 671
    Parameters:
672
     - merchantPaymentId
673
    """
674
    self.send_initializeHdfcPayment(merchantPaymentId)
675
    return self.recv_initializeHdfcPayment()
676
 
677
  def send_initializeHdfcPayment(self, merchantPaymentId):
678
    self._oprot.writeMessageBegin('initializeHdfcPayment', TMessageType.CALL, self._seqid)
679
    args = initializeHdfcPayment_args()
680
    args.merchantPaymentId = merchantPaymentId
681
    args.write(self._oprot)
682
    self._oprot.writeMessageEnd()
683
    self._oprot.trans.flush()
684
 
685
  def recv_initializeHdfcPayment(self, ):
686
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
687
    if mtype == TMessageType.EXCEPTION:
688
      x = TApplicationException()
689
      x.read(self._iprot)
690
      self._iprot.readMessageEnd()
691
      raise x
692
    result = initializeHdfcPayment_result()
693
    result.read(self._iprot)
694
    self._iprot.readMessageEnd()
3431 rajveer 695
    if result.success is not None:
2559 chandransh 696
      return result.success
3431 rajveer 697
    if result.pe is not None:
2559 chandransh 698
      raise result.pe
699
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
700
 
6050 anupam.sin 701
  def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
702
    """
703
    Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
704
    In case of any processing error, an exception is raised.
705
 
706
    Parameters:
707
     - merchantPaymentId
708
     - rechargeOrderId
709
    """
710
    self.send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId)
711
    return self.recv_doHdfcPaymentForDigitalOrder()
712
 
713
  def send_doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId):
714
    self._oprot.writeMessageBegin('doHdfcPaymentForDigitalOrder', TMessageType.CALL, self._seqid)
715
    args = doHdfcPaymentForDigitalOrder_args()
716
    args.merchantPaymentId = merchantPaymentId
717
    args.rechargeOrderId = rechargeOrderId
718
    args.write(self._oprot)
719
    self._oprot.writeMessageEnd()
720
    self._oprot.trans.flush()
721
 
722
  def recv_doHdfcPaymentForDigitalOrder(self, ):
723
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
724
    if mtype == TMessageType.EXCEPTION:
725
      x = TApplicationException()
726
      x.read(self._iprot)
727
      self._iprot.readMessageEnd()
728
      raise x
729
    result = doHdfcPaymentForDigitalOrder_result()
730
    result.read(self._iprot)
731
    self._iprot.readMessageEnd()
732
    if result.success is not None:
733
      return result.success
734
    if result.pe is not None:
735
      raise result.pe
736
    raise TApplicationException(TApplicationException.MISSING_RESULT, "doHdfcPaymentForDigitalOrder failed: unknown result");
737
 
3616 chandransh 738
  def initializeHdfcEmiPayment(self, merchantPaymentId):
739
    """
740
    Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
741
    In case of any processing error, an exception is raised.
742
 
743
    Parameters:
744
     - merchantPaymentId
745
    """
746
    self.send_initializeHdfcEmiPayment(merchantPaymentId)
747
    return self.recv_initializeHdfcEmiPayment()
748
 
749
  def send_initializeHdfcEmiPayment(self, merchantPaymentId):
750
    self._oprot.writeMessageBegin('initializeHdfcEmiPayment', TMessageType.CALL, self._seqid)
751
    args = initializeHdfcEmiPayment_args()
752
    args.merchantPaymentId = merchantPaymentId
753
    args.write(self._oprot)
754
    self._oprot.writeMessageEnd()
755
    self._oprot.trans.flush()
756
 
757
  def recv_initializeHdfcEmiPayment(self, ):
758
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
759
    if mtype == TMessageType.EXCEPTION:
760
      x = TApplicationException()
761
      x.read(self._iprot)
762
      self._iprot.readMessageEnd()
763
      raise x
764
    result = initializeHdfcEmiPayment_result()
765
    result.read(self._iprot)
766
    self._iprot.readMessageEnd()
767
    if result.success is not None:
768
      return result.success
769
    if result.pe is not None:
770
      raise result.pe
771
    raise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
772
 
2685 chandransh 773
  def createRefund(self, orderId, merchantTxnId, amount):
774
    """
775
    Create a refund of the given amount corresponding to the given order to be processed through the same
776
    payment gateway which processed the payment for the corresponding transaction.
2687 chandransh 777
    Returns the id of the newly created Refund.
3431 rajveer 778
 
2685 chandransh 779
    Parameters:
780
     - orderId
781
     - merchantTxnId
782
     - amount
783
    """
784
    self.send_createRefund(orderId, merchantTxnId, amount)
785
    return self.recv_createRefund()
2559 chandransh 786
 
2685 chandransh 787
  def send_createRefund(self, orderId, merchantTxnId, amount):
788
    self._oprot.writeMessageBegin('createRefund', TMessageType.CALL, self._seqid)
789
    args = createRefund_args()
790
    args.orderId = orderId
791
    args.merchantTxnId = merchantTxnId
792
    args.amount = amount
793
    args.write(self._oprot)
794
    self._oprot.writeMessageEnd()
795
    self._oprot.trans.flush()
796
 
797
  def recv_createRefund(self, ):
798
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
799
    if mtype == TMessageType.EXCEPTION:
800
      x = TApplicationException()
801
      x.read(self._iprot)
802
      self._iprot.readMessageEnd()
803
      raise x
804
    result = createRefund_result()
805
    result.read(self._iprot)
806
    self._iprot.readMessageEnd()
3431 rajveer 807
    if result.success is not None:
2685 chandransh 808
      return result.success
3431 rajveer 809
    if result.pe is not None:
2685 chandransh 810
      raise result.pe
811
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
812
 
3010 chandransh 813
  def capturePayment(self, merchantTxnId):
814
    """
815
    Capture the payment for the given merchant transaction id. It processes the last payment for the given
4421 mandeep.dh 816
    transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
817
    code 104 is	thrown in case no payments are found for the transaction id passed.
818
    PaymentException is also thrown with error code 106 in case capture was not possible due to connection
819
    issue. Here, we	payment also gets updated to CAPTURE_INPROCESS state
3431 rajveer 820
 
3010 chandransh 821
    Parameters:
822
     - merchantTxnId
823
    """
824
    self.send_capturePayment(merchantTxnId)
825
    return self.recv_capturePayment()
2685 chandransh 826
 
3010 chandransh 827
  def send_capturePayment(self, merchantTxnId):
828
    self._oprot.writeMessageBegin('capturePayment', TMessageType.CALL, self._seqid)
829
    args = capturePayment_args()
830
    args.merchantTxnId = merchantTxnId
831
    args.write(self._oprot)
832
    self._oprot.writeMessageEnd()
833
    self._oprot.trans.flush()
834
 
835
  def recv_capturePayment(self, ):
836
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
837
    if mtype == TMessageType.EXCEPTION:
838
      x = TApplicationException()
839
      x.read(self._iprot)
840
      self._iprot.readMessageEnd()
841
      raise x
842
    result = capturePayment_result()
843
    result.read(self._iprot)
844
    self._iprot.readMessageEnd()
3431 rajveer 845
    if result.success is not None:
3010 chandransh 846
      return result.success
3431 rajveer 847
    if result.pe is not None:
3010 chandransh 848
      raise result.pe
849
    raise TApplicationException(TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
850
 
3956 chandransh 851
  def partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):
852
    """
853
    Adds the given amount to the captured amount of a COD payment.
854
    Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
855
    If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
856
    Also sets the name of the entity which transferred the money, the date on which it was transferred
857
    and the corresponding transaction id.
3010 chandransh 858
 
3956 chandransh 859
    Returns false if the payment couldn't be captured.
860
    Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
861
 
862
    Parameters:
863
     - merchantTxnId
864
     - amount
865
     - xferBy
866
     - xferTxnId
867
     - xferDate
868
    """
869
    self.send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate)
870
    return self.recv_partiallyCapturePayment()
871
 
872
  def send_partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):
873
    self._oprot.writeMessageBegin('partiallyCapturePayment', TMessageType.CALL, self._seqid)
874
    args = partiallyCapturePayment_args()
875
    args.merchantTxnId = merchantTxnId
876
    args.amount = amount
877
    args.xferBy = xferBy
878
    args.xferTxnId = xferTxnId
879
    args.xferDate = xferDate
880
    args.write(self._oprot)
881
    self._oprot.writeMessageEnd()
882
    self._oprot.trans.flush()
883
 
884
  def recv_partiallyCapturePayment(self, ):
885
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
886
    if mtype == TMessageType.EXCEPTION:
887
      x = TApplicationException()
888
      x.read(self._iprot)
889
      self._iprot.readMessageEnd()
890
      raise x
891
    result = partiallyCapturePayment_result()
892
    result.read(self._iprot)
893
    self._iprot.readMessageEnd()
894
    if result.success is not None:
895
      return result.success
896
    if result.pe is not None:
897
      raise result.pe
898
    raise TApplicationException(TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
899
 
4008 mandeep.dh 900
  def getPaymentsRequiringExtraProcessing(self, category):
901
    """
902
    Returns the list of payments that require some extra processing and
903
    which belong to a particular category. This is currently used by CRM
904
    application.
3956 chandransh 905
 
4008 mandeep.dh 906
    Parameters:
907
     - category
908
    """
909
    self.send_getPaymentsRequiringExtraProcessing(category)
910
    return self.recv_getPaymentsRequiringExtraProcessing()
911
 
912
  def send_getPaymentsRequiringExtraProcessing(self, category):
913
    self._oprot.writeMessageBegin('getPaymentsRequiringExtraProcessing', TMessageType.CALL, self._seqid)
914
    args = getPaymentsRequiringExtraProcessing_args()
915
    args.category = category
916
    args.write(self._oprot)
917
    self._oprot.writeMessageEnd()
918
    self._oprot.trans.flush()
919
 
920
  def recv_getPaymentsRequiringExtraProcessing(self, ):
921
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
922
    if mtype == TMessageType.EXCEPTION:
923
      x = TApplicationException()
924
      x.read(self._iprot)
925
      self._iprot.readMessageEnd()
926
      raise x
927
    result = getPaymentsRequiringExtraProcessing_result()
928
    result.read(self._iprot)
929
    self._iprot.readMessageEnd()
930
    if result.success is not None:
931
      return result.success
932
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
933
 
934
  def markPaymentAsProcessed(self, paymentId, category):
935
    """
936
    Marks a particular payment as processed for a particular cateogory.
937
    It essentially deletes the payment if it is processed for a particular
938
    category. This is currently used by CRM application.
939
 
940
    Parameters:
941
     - paymentId
942
     - category
943
    """
944
    self.send_markPaymentAsProcessed(paymentId, category)
945
    self.recv_markPaymentAsProcessed()
946
 
947
  def send_markPaymentAsProcessed(self, paymentId, category):
948
    self._oprot.writeMessageBegin('markPaymentAsProcessed', TMessageType.CALL, self._seqid)
949
    args = markPaymentAsProcessed_args()
950
    args.paymentId = paymentId
951
    args.category = category
952
    args.write(self._oprot)
953
    self._oprot.writeMessageEnd()
954
    self._oprot.trans.flush()
955
 
956
  def recv_markPaymentAsProcessed(self, ):
957
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
958
    if mtype == TMessageType.EXCEPTION:
959
      x = TApplicationException()
960
      x.read(self._iprot)
961
      self._iprot.readMessageEnd()
962
      raise x
963
    result = markPaymentAsProcessed_result()
964
    result.read(self._iprot)
965
    self._iprot.readMessageEnd()
966
    return
967
 
968
 
3376 rajveer 969
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
420 ashish 970
  def __init__(self, handler):
3376 rajveer 971
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
420 ashish 972
    self._processMap["createPayment"] = Processor.process_createPayment
973
    self._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUser
974
    self._processMap["getPayments"] = Processor.process_getPayments
4141 chandransh 975
    self._processMap["getPaymentsByCapturedDate"] = Processor.process_getPaymentsByCapturedDate
420 ashish 976
    self._processMap["getPaymentGateway"] = Processor.process_getPaymentGateway
4600 varun.gupt 977
    self._processMap["getActivePaymentGateways"] = Processor.process_getActivePaymentGateways
420 ashish 978
    self._processMap["getPayment"] = Processor.process_getPayment
696 rajveer 979
    self._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnId
4600 varun.gupt 980
    self._processMap["getSuccessfulPaymentForTxnId"] = Processor.process_getSuccessfulPaymentForTxnId
696 rajveer 981
    self._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetails
1731 ankur.sing 982
    self._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRange
2559 chandransh 983
    self._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPayment
6050 anupam.sin 984
    self._processMap["doHdfcPaymentForDigitalOrder"] = Processor.process_doHdfcPaymentForDigitalOrder
3616 chandransh 985
    self._processMap["initializeHdfcEmiPayment"] = Processor.process_initializeHdfcEmiPayment
2685 chandransh 986
    self._processMap["createRefund"] = Processor.process_createRefund
3010 chandransh 987
    self._processMap["capturePayment"] = Processor.process_capturePayment
3956 chandransh 988
    self._processMap["partiallyCapturePayment"] = Processor.process_partiallyCapturePayment
4008 mandeep.dh 989
    self._processMap["getPaymentsRequiringExtraProcessing"] = Processor.process_getPaymentsRequiringExtraProcessing
990
    self._processMap["markPaymentAsProcessed"] = Processor.process_markPaymentAsProcessed
420 ashish 991
 
992
  def process(self, iprot, oprot):
993
    (name, type, seqid) = iprot.readMessageBegin()
994
    if name not in self._processMap:
995
      iprot.skip(TType.STRUCT)
996
      iprot.readMessageEnd()
997
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
998
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
999
      x.write(oprot)
1000
      oprot.writeMessageEnd()
1001
      oprot.trans.flush()
1002
      return
1003
    else:
1004
      self._processMap[name](self, seqid, iprot, oprot)
1005
    return True
1006
 
1007
  def process_createPayment(self, seqid, iprot, oprot):
1008
    args = createPayment_args()
1009
    args.read(iprot)
1010
    iprot.readMessageEnd()
1011
    result = createPayment_result()
1012
    try:
6050 anupam.sin 1013
      result.success = self._handler.createPayment(args.userId, args.amount, args.gatewayId, args.txnId, args.isDigital)
420 ashish 1014
    except PaymentException, pe:
1015
      result.pe = pe
1016
    oprot.writeMessageBegin("createPayment", TMessageType.REPLY, seqid)
1017
    result.write(oprot)
1018
    oprot.writeMessageEnd()
1019
    oprot.trans.flush()
1020
 
1021
  def process_getPaymentsForUser(self, seqid, iprot, oprot):
1022
    args = getPaymentsForUser_args()
1023
    args.read(iprot)
1024
    iprot.readMessageEnd()
1025
    result = getPaymentsForUser_result()
1026
    try:
696 rajveer 1027
      result.success = self._handler.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId)
420 ashish 1028
    except PaymentException, pe:
1029
      result.pe = pe
1030
    oprot.writeMessageBegin("getPaymentsForUser", TMessageType.REPLY, seqid)
1031
    result.write(oprot)
1032
    oprot.writeMessageEnd()
1033
    oprot.trans.flush()
1034
 
1035
  def process_getPayments(self, seqid, iprot, oprot):
1036
    args = getPayments_args()
1037
    args.read(iprot)
1038
    iprot.readMessageEnd()
1039
    result = getPayments_result()
1040
    try:
696 rajveer 1041
      result.success = self._handler.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId)
420 ashish 1042
    except PaymentException, pe:
1043
      result.pe = pe
1044
    oprot.writeMessageBegin("getPayments", TMessageType.REPLY, seqid)
1045
    result.write(oprot)
1046
    oprot.writeMessageEnd()
1047
    oprot.trans.flush()
1048
 
4141 chandransh 1049
  def process_getPaymentsByCapturedDate(self, seqid, iprot, oprot):
1050
    args = getPaymentsByCapturedDate_args()
1051
    args.read(iprot)
1052
    iprot.readMessageEnd()
1053
    result = getPaymentsByCapturedDate_result()
1054
    try:
1055
      result.success = self._handler.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId)
1056
    except PaymentException, pe:
1057
      result.pe = pe
1058
    oprot.writeMessageBegin("getPaymentsByCapturedDate", TMessageType.REPLY, seqid)
1059
    result.write(oprot)
1060
    oprot.writeMessageEnd()
1061
    oprot.trans.flush()
1062
 
420 ashish 1063
  def process_getPaymentGateway(self, seqid, iprot, oprot):
1064
    args = getPaymentGateway_args()
1065
    args.read(iprot)
1066
    iprot.readMessageEnd()
1067
    result = getPaymentGateway_result()
1068
    try:
1069
      result.success = self._handler.getPaymentGateway(args.id)
1070
    except PaymentException, pe:
1071
      result.pe = pe
1072
    oprot.writeMessageBegin("getPaymentGateway", TMessageType.REPLY, seqid)
1073
    result.write(oprot)
1074
    oprot.writeMessageEnd()
1075
    oprot.trans.flush()
1076
 
4600 varun.gupt 1077
  def process_getActivePaymentGateways(self, seqid, iprot, oprot):
1078
    args = getActivePaymentGateways_args()
1079
    args.read(iprot)
1080
    iprot.readMessageEnd()
1081
    result = getActivePaymentGateways_result()
1082
    try:
1083
      result.success = self._handler.getActivePaymentGateways()
1084
    except PaymentException, pe:
1085
      result.pe = pe
1086
    oprot.writeMessageBegin("getActivePaymentGateways", TMessageType.REPLY, seqid)
1087
    result.write(oprot)
1088
    oprot.writeMessageEnd()
1089
    oprot.trans.flush()
1090
 
696 rajveer 1091
  def process_getPayment(self, seqid, iprot, oprot):
1092
    args = getPayment_args()
420 ashish 1093
    args.read(iprot)
1094
    iprot.readMessageEnd()
696 rajveer 1095
    result = getPayment_result()
420 ashish 1096
    try:
696 rajveer 1097
      result.success = self._handler.getPayment(args.id)
420 ashish 1098
    except PaymentException, pe:
1099
      result.pe = pe
696 rajveer 1100
    oprot.writeMessageBegin("getPayment", TMessageType.REPLY, seqid)
420 ashish 1101
    result.write(oprot)
1102
    oprot.writeMessageEnd()
1103
    oprot.trans.flush()
1104
 
696 rajveer 1105
  def process_getPaymentForTxnId(self, seqid, iprot, oprot):
1106
    args = getPaymentForTxnId_args()
420 ashish 1107
    args.read(iprot)
1108
    iprot.readMessageEnd()
696 rajveer 1109
    result = getPaymentForTxnId_result()
420 ashish 1110
    try:
696 rajveer 1111
      result.success = self._handler.getPaymentForTxnId(args.txnId)
420 ashish 1112
    except PaymentException, pe:
1113
      result.pe = pe
696 rajveer 1114
    oprot.writeMessageBegin("getPaymentForTxnId", TMessageType.REPLY, seqid)
420 ashish 1115
    result.write(oprot)
1116
    oprot.writeMessageEnd()
1117
    oprot.trans.flush()
1118
 
4600 varun.gupt 1119
  def process_getSuccessfulPaymentForTxnId(self, seqid, iprot, oprot):
1120
    args = getSuccessfulPaymentForTxnId_args()
1121
    args.read(iprot)
1122
    iprot.readMessageEnd()
1123
    result = getSuccessfulPaymentForTxnId_result()
1124
    try:
1125
      result.success = self._handler.getSuccessfulPaymentForTxnId(args.txnId)
1126
    except PaymentException, pe:
1127
      result.pe = pe
1128
    oprot.writeMessageBegin("getSuccessfulPaymentForTxnId", TMessageType.REPLY, seqid)
1129
    result.write(oprot)
1130
    oprot.writeMessageEnd()
1131
    oprot.trans.flush()
1132
 
696 rajveer 1133
  def process_updatePaymentDetails(self, seqid, iprot, oprot):
1134
    args = updatePaymentDetails_args()
420 ashish 1135
    args.read(iprot)
1136
    iprot.readMessageEnd()
696 rajveer 1137
    result = updatePaymentDetails_result()
420 ashish 1138
    try:
1120 rajveer 1139
      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 1140
    except PaymentException, pe:
1141
      result.pe = pe
696 rajveer 1142
    oprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)
420 ashish 1143
    result.write(oprot)
1144
    oprot.writeMessageEnd()
1145
    oprot.trans.flush()
1146
 
1731 ankur.sing 1147
  def process_getSuccessfulPaymentsAmountRange(self, seqid, iprot, oprot):
1148
    args = getSuccessfulPaymentsAmountRange_args()
1627 ankur.sing 1149
    args.read(iprot)
1150
    iprot.readMessageEnd()
1731 ankur.sing 1151
    result = getSuccessfulPaymentsAmountRange_result()
1152
    result.success = self._handler.getSuccessfulPaymentsAmountRange()
1153
    oprot.writeMessageBegin("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid)
1627 ankur.sing 1154
    result.write(oprot)
1155
    oprot.writeMessageEnd()
1156
    oprot.trans.flush()
420 ashish 1157
 
2559 chandransh 1158
  def process_initializeHdfcPayment(self, seqid, iprot, oprot):
1159
    args = initializeHdfcPayment_args()
1160
    args.read(iprot)
1161
    iprot.readMessageEnd()
1162
    result = initializeHdfcPayment_result()
1163
    try:
1164
      result.success = self._handler.initializeHdfcPayment(args.merchantPaymentId)
1165
    except PaymentException, pe:
1166
      result.pe = pe
1167
    oprot.writeMessageBegin("initializeHdfcPayment", TMessageType.REPLY, seqid)
1168
    result.write(oprot)
1169
    oprot.writeMessageEnd()
1170
    oprot.trans.flush()
1171
 
6050 anupam.sin 1172
  def process_doHdfcPaymentForDigitalOrder(self, seqid, iprot, oprot):
1173
    args = doHdfcPaymentForDigitalOrder_args()
1174
    args.read(iprot)
1175
    iprot.readMessageEnd()
1176
    result = doHdfcPaymentForDigitalOrder_result()
1177
    try:
1178
      result.success = self._handler.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId)
1179
    except PaymentException, pe:
1180
      result.pe = pe
1181
    oprot.writeMessageBegin("doHdfcPaymentForDigitalOrder", TMessageType.REPLY, seqid)
1182
    result.write(oprot)
1183
    oprot.writeMessageEnd()
1184
    oprot.trans.flush()
1185
 
3616 chandransh 1186
  def process_initializeHdfcEmiPayment(self, seqid, iprot, oprot):
1187
    args = initializeHdfcEmiPayment_args()
1188
    args.read(iprot)
1189
    iprot.readMessageEnd()
1190
    result = initializeHdfcEmiPayment_result()
1191
    try:
1192
      result.success = self._handler.initializeHdfcEmiPayment(args.merchantPaymentId)
1193
    except PaymentException, pe:
1194
      result.pe = pe
1195
    oprot.writeMessageBegin("initializeHdfcEmiPayment", TMessageType.REPLY, seqid)
1196
    result.write(oprot)
1197
    oprot.writeMessageEnd()
1198
    oprot.trans.flush()
1199
 
2685 chandransh 1200
  def process_createRefund(self, seqid, iprot, oprot):
1201
    args = createRefund_args()
1202
    args.read(iprot)
1203
    iprot.readMessageEnd()
1204
    result = createRefund_result()
1205
    try:
1206
      result.success = self._handler.createRefund(args.orderId, args.merchantTxnId, args.amount)
1207
    except PaymentException, pe:
1208
      result.pe = pe
1209
    oprot.writeMessageBegin("createRefund", TMessageType.REPLY, seqid)
1210
    result.write(oprot)
1211
    oprot.writeMessageEnd()
1212
    oprot.trans.flush()
2559 chandransh 1213
 
3010 chandransh 1214
  def process_capturePayment(self, seqid, iprot, oprot):
1215
    args = capturePayment_args()
1216
    args.read(iprot)
1217
    iprot.readMessageEnd()
1218
    result = capturePayment_result()
1219
    try:
1220
      result.success = self._handler.capturePayment(args.merchantTxnId)
1221
    except PaymentException, pe:
1222
      result.pe = pe
1223
    oprot.writeMessageBegin("capturePayment", TMessageType.REPLY, seqid)
1224
    result.write(oprot)
1225
    oprot.writeMessageEnd()
1226
    oprot.trans.flush()
2685 chandransh 1227
 
3956 chandransh 1228
  def process_partiallyCapturePayment(self, seqid, iprot, oprot):
1229
    args = partiallyCapturePayment_args()
1230
    args.read(iprot)
1231
    iprot.readMessageEnd()
1232
    result = partiallyCapturePayment_result()
1233
    try:
1234
      result.success = self._handler.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate)
1235
    except PaymentException, pe:
1236
      result.pe = pe
1237
    oprot.writeMessageBegin("partiallyCapturePayment", TMessageType.REPLY, seqid)
1238
    result.write(oprot)
1239
    oprot.writeMessageEnd()
1240
    oprot.trans.flush()
3010 chandransh 1241
 
4008 mandeep.dh 1242
  def process_getPaymentsRequiringExtraProcessing(self, seqid, iprot, oprot):
1243
    args = getPaymentsRequiringExtraProcessing_args()
1244
    args.read(iprot)
1245
    iprot.readMessageEnd()
1246
    result = getPaymentsRequiringExtraProcessing_result()
1247
    result.success = self._handler.getPaymentsRequiringExtraProcessing(args.category)
1248
    oprot.writeMessageBegin("getPaymentsRequiringExtraProcessing", TMessageType.REPLY, seqid)
1249
    result.write(oprot)
1250
    oprot.writeMessageEnd()
1251
    oprot.trans.flush()
3956 chandransh 1252
 
4008 mandeep.dh 1253
  def process_markPaymentAsProcessed(self, seqid, iprot, oprot):
1254
    args = markPaymentAsProcessed_args()
1255
    args.read(iprot)
1256
    iprot.readMessageEnd()
1257
    result = markPaymentAsProcessed_result()
1258
    self._handler.markPaymentAsProcessed(args.paymentId, args.category)
1259
    oprot.writeMessageBegin("markPaymentAsProcessed", TMessageType.REPLY, seqid)
1260
    result.write(oprot)
1261
    oprot.writeMessageEnd()
1262
    oprot.trans.flush()
1263
 
1264
 
420 ashish 1265
# HELPER FUNCTIONS AND STRUCTURES
1266
 
1267
class createPayment_args:
1268
  """
1269
  Attributes:
696 rajveer 1270
   - userId
420 ashish 1271
   - amount
696 rajveer 1272
   - gatewayId
1273
   - txnId
6050 anupam.sin 1274
   - isDigital
420 ashish 1275
  """
1276
 
1277
  thrift_spec = (
1278
    None, # 0
696 rajveer 1279
    (1, TType.I64, 'userId', None, None, ), # 1
1280
    (2, TType.DOUBLE, 'amount', None, None, ), # 2
1281
    (3, TType.I64, 'gatewayId', None, None, ), # 3
1282
    (4, TType.I64, 'txnId', None, None, ), # 4
6050 anupam.sin 1283
    (5, TType.BOOL, 'isDigital', None, None, ), # 5
420 ashish 1284
  )
1285
 
6050 anupam.sin 1286
  def __init__(self, userId=None, amount=None, gatewayId=None, txnId=None, isDigital=None,):
696 rajveer 1287
    self.userId = userId
420 ashish 1288
    self.amount = amount
696 rajveer 1289
    self.gatewayId = gatewayId
1290
    self.txnId = txnId
6050 anupam.sin 1291
    self.isDigital = isDigital
420 ashish 1292
 
1293
  def read(self, iprot):
1294
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1295
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1296
      return
1297
    iprot.readStructBegin()
1298
    while True:
1299
      (fname, ftype, fid) = iprot.readFieldBegin()
1300
      if ftype == TType.STOP:
1301
        break
1302
      if fid == 1:
1303
        if ftype == TType.I64:
696 rajveer 1304
          self.userId = iprot.readI64();
420 ashish 1305
        else:
1306
          iprot.skip(ftype)
1307
      elif fid == 2:
696 rajveer 1308
        if ftype == TType.DOUBLE:
1309
          self.amount = iprot.readDouble();
420 ashish 1310
        else:
1311
          iprot.skip(ftype)
1312
      elif fid == 3:
696 rajveer 1313
        if ftype == TType.I64:
1314
          self.gatewayId = iprot.readI64();
420 ashish 1315
        else:
1316
          iprot.skip(ftype)
1317
      elif fid == 4:
1318
        if ftype == TType.I64:
696 rajveer 1319
          self.txnId = iprot.readI64();
420 ashish 1320
        else:
1321
          iprot.skip(ftype)
6050 anupam.sin 1322
      elif fid == 5:
1323
        if ftype == TType.BOOL:
1324
          self.isDigital = iprot.readBool();
1325
        else:
1326
          iprot.skip(ftype)
420 ashish 1327
      else:
1328
        iprot.skip(ftype)
1329
      iprot.readFieldEnd()
1330
    iprot.readStructEnd()
1331
 
1332
  def write(self, oprot):
1333
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1334
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1335
      return
1336
    oprot.writeStructBegin('createPayment_args')
3431 rajveer 1337
    if self.userId is not None:
696 rajveer 1338
      oprot.writeFieldBegin('userId', TType.I64, 1)
1339
      oprot.writeI64(self.userId)
420 ashish 1340
      oprot.writeFieldEnd()
3431 rajveer 1341
    if self.amount is not None:
696 rajveer 1342
      oprot.writeFieldBegin('amount', TType.DOUBLE, 2)
420 ashish 1343
      oprot.writeDouble(self.amount)
1344
      oprot.writeFieldEnd()
3431 rajveer 1345
    if self.gatewayId is not None:
696 rajveer 1346
      oprot.writeFieldBegin('gatewayId', TType.I64, 3)
1347
      oprot.writeI64(self.gatewayId)
420 ashish 1348
      oprot.writeFieldEnd()
3431 rajveer 1349
    if self.txnId is not None:
696 rajveer 1350
      oprot.writeFieldBegin('txnId', TType.I64, 4)
1351
      oprot.writeI64(self.txnId)
1352
      oprot.writeFieldEnd()
6050 anupam.sin 1353
    if self.isDigital is not None:
1354
      oprot.writeFieldBegin('isDigital', TType.BOOL, 5)
1355
      oprot.writeBool(self.isDigital)
1356
      oprot.writeFieldEnd()
420 ashish 1357
    oprot.writeFieldStop()
1358
    oprot.writeStructEnd()
1359
 
3431 rajveer 1360
  def validate(self):
1361
    return
1362
 
1363
 
420 ashish 1364
  def __repr__(self):
1365
    L = ['%s=%r' % (key, value)
1366
      for key, value in self.__dict__.iteritems()]
1367
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1368
 
1369
  def __eq__(self, other):
1370
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1371
 
1372
  def __ne__(self, other):
1373
    return not (self == other)
1374
 
1375
class createPayment_result:
1376
  """
1377
  Attributes:
1378
   - success
1379
   - pe
1380
  """
1381
 
1382
  thrift_spec = (
1383
    (0, TType.I64, 'success', None, None, ), # 0
1384
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1385
  )
1386
 
1387
  def __init__(self, success=None, pe=None,):
1388
    self.success = success
1389
    self.pe = pe
1390
 
1391
  def read(self, iprot):
1392
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1393
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1394
      return
1395
    iprot.readStructBegin()
1396
    while True:
1397
      (fname, ftype, fid) = iprot.readFieldBegin()
1398
      if ftype == TType.STOP:
1399
        break
1400
      if fid == 0:
1401
        if ftype == TType.I64:
1402
          self.success = iprot.readI64();
1403
        else:
1404
          iprot.skip(ftype)
1405
      elif fid == 1:
1406
        if ftype == TType.STRUCT:
1407
          self.pe = PaymentException()
1408
          self.pe.read(iprot)
1409
        else:
1410
          iprot.skip(ftype)
1411
      else:
1412
        iprot.skip(ftype)
1413
      iprot.readFieldEnd()
1414
    iprot.readStructEnd()
1415
 
1416
  def write(self, oprot):
1417
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1418
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1419
      return
1420
    oprot.writeStructBegin('createPayment_result')
3431 rajveer 1421
    if self.success is not None:
420 ashish 1422
      oprot.writeFieldBegin('success', TType.I64, 0)
1423
      oprot.writeI64(self.success)
1424
      oprot.writeFieldEnd()
3431 rajveer 1425
    if self.pe is not None:
420 ashish 1426
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1427
      self.pe.write(oprot)
1428
      oprot.writeFieldEnd()
1429
    oprot.writeFieldStop()
1430
    oprot.writeStructEnd()
1431
 
3431 rajveer 1432
  def validate(self):
1433
    return
1434
 
1435
 
420 ashish 1436
  def __repr__(self):
1437
    L = ['%s=%r' % (key, value)
1438
      for key, value in self.__dict__.iteritems()]
1439
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1440
 
1441
  def __eq__(self, other):
1442
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1443
 
1444
  def __ne__(self, other):
1445
    return not (self == other)
1446
 
1447
class getPaymentsForUser_args:
1448
  """
1449
  Attributes:
1450
   - userId
696 rajveer 1451
   - fromTime
1452
   - toTime
420 ashish 1453
   - status
696 rajveer 1454
   - gatewayId
420 ashish 1455
  """
1456
 
1457
  thrift_spec = (
1458
    None, # 0
1459
    (1, TType.I64, 'userId', None, None, ), # 1
696 rajveer 1460
    (2, TType.I64, 'fromTime', None, None, ), # 2
1461
    (3, TType.I64, 'toTime', None, None, ), # 3
420 ashish 1462
    (4, TType.I32, 'status', None, None, ), # 4
696 rajveer 1463
    (5, TType.I64, 'gatewayId', None, None, ), # 5
420 ashish 1464
  )
1465
 
696 rajveer 1466
  def __init__(self, userId=None, fromTime=None, toTime=None, status=None, gatewayId=None,):
420 ashish 1467
    self.userId = userId
696 rajveer 1468
    self.fromTime = fromTime
1469
    self.toTime = toTime
420 ashish 1470
    self.status = status
696 rajveer 1471
    self.gatewayId = gatewayId
420 ashish 1472
 
1473
  def read(self, iprot):
1474
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1475
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1476
      return
1477
    iprot.readStructBegin()
1478
    while True:
1479
      (fname, ftype, fid) = iprot.readFieldBegin()
1480
      if ftype == TType.STOP:
1481
        break
1482
      if fid == 1:
1483
        if ftype == TType.I64:
1484
          self.userId = iprot.readI64();
1485
        else:
1486
          iprot.skip(ftype)
1487
      elif fid == 2:
1488
        if ftype == TType.I64:
696 rajveer 1489
          self.fromTime = iprot.readI64();
420 ashish 1490
        else:
1491
          iprot.skip(ftype)
1492
      elif fid == 3:
1493
        if ftype == TType.I64:
696 rajveer 1494
          self.toTime = iprot.readI64();
420 ashish 1495
        else:
1496
          iprot.skip(ftype)
1497
      elif fid == 4:
1498
        if ftype == TType.I32:
1499
          self.status = iprot.readI32();
1500
        else:
1501
          iprot.skip(ftype)
1502
      elif fid == 5:
1503
        if ftype == TType.I64:
696 rajveer 1504
          self.gatewayId = iprot.readI64();
420 ashish 1505
        else:
1506
          iprot.skip(ftype)
1507
      else:
1508
        iprot.skip(ftype)
1509
      iprot.readFieldEnd()
1510
    iprot.readStructEnd()
1511
 
1512
  def write(self, oprot):
1513
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1514
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1515
      return
1516
    oprot.writeStructBegin('getPaymentsForUser_args')
3431 rajveer 1517
    if self.userId is not None:
420 ashish 1518
      oprot.writeFieldBegin('userId', TType.I64, 1)
1519
      oprot.writeI64(self.userId)
1520
      oprot.writeFieldEnd()
3431 rajveer 1521
    if self.fromTime is not None:
696 rajveer 1522
      oprot.writeFieldBegin('fromTime', TType.I64, 2)
1523
      oprot.writeI64(self.fromTime)
420 ashish 1524
      oprot.writeFieldEnd()
3431 rajveer 1525
    if self.toTime is not None:
696 rajveer 1526
      oprot.writeFieldBegin('toTime', TType.I64, 3)
1527
      oprot.writeI64(self.toTime)
420 ashish 1528
      oprot.writeFieldEnd()
3431 rajveer 1529
    if self.status is not None:
420 ashish 1530
      oprot.writeFieldBegin('status', TType.I32, 4)
1531
      oprot.writeI32(self.status)
1532
      oprot.writeFieldEnd()
3431 rajveer 1533
    if self.gatewayId is not None:
696 rajveer 1534
      oprot.writeFieldBegin('gatewayId', TType.I64, 5)
1535
      oprot.writeI64(self.gatewayId)
420 ashish 1536
      oprot.writeFieldEnd()
1537
    oprot.writeFieldStop()
1538
    oprot.writeStructEnd()
1539
 
3431 rajveer 1540
  def validate(self):
1541
    return
1542
 
1543
 
420 ashish 1544
  def __repr__(self):
1545
    L = ['%s=%r' % (key, value)
1546
      for key, value in self.__dict__.iteritems()]
1547
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1548
 
1549
  def __eq__(self, other):
1550
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1551
 
1552
  def __ne__(self, other):
1553
    return not (self == other)
1554
 
1555
class getPaymentsForUser_result:
1556
  """
1557
  Attributes:
1558
   - success
1559
   - pe
1560
  """
1561
 
1562
  thrift_spec = (
1563
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1564
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1565
  )
1566
 
1567
  def __init__(self, success=None, pe=None,):
1568
    self.success = success
1569
    self.pe = pe
1570
 
1571
  def read(self, iprot):
1572
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1573
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1574
      return
1575
    iprot.readStructBegin()
1576
    while True:
1577
      (fname, ftype, fid) = iprot.readFieldBegin()
1578
      if ftype == TType.STOP:
1579
        break
1580
      if fid == 0:
1581
        if ftype == TType.LIST:
1582
          self.success = []
2747 chandransh 1583
          (_etype24, _size21) = iprot.readListBegin()
1584
          for _i25 in xrange(_size21):
1585
            _elem26 = Payment()
1586
            _elem26.read(iprot)
1587
            self.success.append(_elem26)
420 ashish 1588
          iprot.readListEnd()
1589
        else:
1590
          iprot.skip(ftype)
1591
      elif fid == 1:
1592
        if ftype == TType.STRUCT:
1593
          self.pe = PaymentException()
1594
          self.pe.read(iprot)
1595
        else:
1596
          iprot.skip(ftype)
1597
      else:
1598
        iprot.skip(ftype)
1599
      iprot.readFieldEnd()
1600
    iprot.readStructEnd()
1601
 
1602
  def write(self, oprot):
1603
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1604
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1605
      return
1606
    oprot.writeStructBegin('getPaymentsForUser_result')
3431 rajveer 1607
    if self.success is not None:
420 ashish 1608
      oprot.writeFieldBegin('success', TType.LIST, 0)
1609
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2747 chandransh 1610
      for iter27 in self.success:
1611
        iter27.write(oprot)
420 ashish 1612
      oprot.writeListEnd()
1613
      oprot.writeFieldEnd()
3431 rajveer 1614
    if self.pe is not None:
420 ashish 1615
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1616
      self.pe.write(oprot)
1617
      oprot.writeFieldEnd()
1618
    oprot.writeFieldStop()
1619
    oprot.writeStructEnd()
1620
 
3431 rajveer 1621
  def validate(self):
1622
    return
1623
 
1624
 
420 ashish 1625
  def __repr__(self):
1626
    L = ['%s=%r' % (key, value)
1627
      for key, value in self.__dict__.iteritems()]
1628
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1629
 
1630
  def __eq__(self, other):
1631
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1632
 
1633
  def __ne__(self, other):
1634
    return not (self == other)
1635
 
1636
class getPayments_args:
1637
  """
1638
  Attributes:
696 rajveer 1639
   - fromTime
1640
   - toTime
420 ashish 1641
   - status
696 rajveer 1642
   - gatewayId
420 ashish 1643
  """
1644
 
1645
  thrift_spec = (
1646
    None, # 0
696 rajveer 1647
    (1, TType.I64, 'fromTime', None, None, ), # 1
1648
    (2, TType.I64, 'toTime', None, None, ), # 2
420 ashish 1649
    (3, TType.I32, 'status', None, None, ), # 3
696 rajveer 1650
    (4, TType.I64, 'gatewayId', None, None, ), # 4
420 ashish 1651
  )
1652
 
696 rajveer 1653
  def __init__(self, fromTime=None, toTime=None, status=None, gatewayId=None,):
1654
    self.fromTime = fromTime
1655
    self.toTime = toTime
420 ashish 1656
    self.status = status
696 rajveer 1657
    self.gatewayId = gatewayId
420 ashish 1658
 
1659
  def read(self, iprot):
1660
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1661
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1662
      return
1663
    iprot.readStructBegin()
1664
    while True:
1665
      (fname, ftype, fid) = iprot.readFieldBegin()
1666
      if ftype == TType.STOP:
1667
        break
1668
      if fid == 1:
1669
        if ftype == TType.I64:
696 rajveer 1670
          self.fromTime = iprot.readI64();
420 ashish 1671
        else:
1672
          iprot.skip(ftype)
1673
      elif fid == 2:
1674
        if ftype == TType.I64:
696 rajveer 1675
          self.toTime = iprot.readI64();
420 ashish 1676
        else:
1677
          iprot.skip(ftype)
1678
      elif fid == 3:
1679
        if ftype == TType.I32:
1680
          self.status = iprot.readI32();
1681
        else:
1682
          iprot.skip(ftype)
1683
      elif fid == 4:
1684
        if ftype == TType.I64:
696 rajveer 1685
          self.gatewayId = iprot.readI64();
420 ashish 1686
        else:
1687
          iprot.skip(ftype)
1688
      else:
1689
        iprot.skip(ftype)
1690
      iprot.readFieldEnd()
1691
    iprot.readStructEnd()
1692
 
1693
  def write(self, oprot):
1694
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1695
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1696
      return
1697
    oprot.writeStructBegin('getPayments_args')
3431 rajveer 1698
    if self.fromTime is not None:
696 rajveer 1699
      oprot.writeFieldBegin('fromTime', TType.I64, 1)
1700
      oprot.writeI64(self.fromTime)
420 ashish 1701
      oprot.writeFieldEnd()
3431 rajveer 1702
    if self.toTime is not None:
696 rajveer 1703
      oprot.writeFieldBegin('toTime', TType.I64, 2)
1704
      oprot.writeI64(self.toTime)
420 ashish 1705
      oprot.writeFieldEnd()
3431 rajveer 1706
    if self.status is not None:
420 ashish 1707
      oprot.writeFieldBegin('status', TType.I32, 3)
1708
      oprot.writeI32(self.status)
1709
      oprot.writeFieldEnd()
3431 rajveer 1710
    if self.gatewayId is not None:
696 rajveer 1711
      oprot.writeFieldBegin('gatewayId', TType.I64, 4)
1712
      oprot.writeI64(self.gatewayId)
420 ashish 1713
      oprot.writeFieldEnd()
1714
    oprot.writeFieldStop()
1715
    oprot.writeStructEnd()
1716
 
3431 rajveer 1717
  def validate(self):
1718
    return
1719
 
1720
 
420 ashish 1721
  def __repr__(self):
1722
    L = ['%s=%r' % (key, value)
1723
      for key, value in self.__dict__.iteritems()]
1724
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1725
 
1726
  def __eq__(self, other):
1727
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1728
 
1729
  def __ne__(self, other):
1730
    return not (self == other)
1731
 
1732
class getPayments_result:
1733
  """
1734
  Attributes:
1735
   - success
1736
   - pe
1737
  """
1738
 
1739
  thrift_spec = (
1740
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1741
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1742
  )
1743
 
1744
  def __init__(self, success=None, pe=None,):
1745
    self.success = success
1746
    self.pe = pe
1747
 
1748
  def read(self, iprot):
1749
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1750
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1751
      return
1752
    iprot.readStructBegin()
1753
    while True:
1754
      (fname, ftype, fid) = iprot.readFieldBegin()
1755
      if ftype == TType.STOP:
1756
        break
1757
      if fid == 0:
1758
        if ftype == TType.LIST:
1759
          self.success = []
2747 chandransh 1760
          (_etype31, _size28) = iprot.readListBegin()
1761
          for _i32 in xrange(_size28):
1762
            _elem33 = Payment()
1763
            _elem33.read(iprot)
1764
            self.success.append(_elem33)
420 ashish 1765
          iprot.readListEnd()
1766
        else:
1767
          iprot.skip(ftype)
1768
      elif fid == 1:
1769
        if ftype == TType.STRUCT:
1770
          self.pe = PaymentException()
1771
          self.pe.read(iprot)
1772
        else:
1773
          iprot.skip(ftype)
1774
      else:
1775
        iprot.skip(ftype)
1776
      iprot.readFieldEnd()
1777
    iprot.readStructEnd()
1778
 
1779
  def write(self, oprot):
1780
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1781
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1782
      return
1783
    oprot.writeStructBegin('getPayments_result')
3431 rajveer 1784
    if self.success is not None:
420 ashish 1785
      oprot.writeFieldBegin('success', TType.LIST, 0)
1786
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2747 chandransh 1787
      for iter34 in self.success:
1788
        iter34.write(oprot)
420 ashish 1789
      oprot.writeListEnd()
1790
      oprot.writeFieldEnd()
3431 rajveer 1791
    if self.pe is not None:
420 ashish 1792
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1793
      self.pe.write(oprot)
1794
      oprot.writeFieldEnd()
1795
    oprot.writeFieldStop()
1796
    oprot.writeStructEnd()
1797
 
3431 rajveer 1798
  def validate(self):
1799
    return
1800
 
1801
 
420 ashish 1802
  def __repr__(self):
1803
    L = ['%s=%r' % (key, value)
1804
      for key, value in self.__dict__.iteritems()]
1805
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1806
 
1807
  def __eq__(self, other):
1808
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1809
 
1810
  def __ne__(self, other):
1811
    return not (self == other)
1812
 
4141 chandransh 1813
class getPaymentsByCapturedDate_args:
1814
  """
1815
  Attributes:
1816
   - fromTime
1817
   - toTime
1818
   - gatewayId
1819
  """
1820
 
1821
  thrift_spec = (
1822
    None, # 0
1823
    (1, TType.I64, 'fromTime', None, None, ), # 1
1824
    (2, TType.I64, 'toTime', None, None, ), # 2
1825
    (3, TType.I64, 'gatewayId', None, None, ), # 3
1826
  )
1827
 
1828
  def __init__(self, fromTime=None, toTime=None, gatewayId=None,):
1829
    self.fromTime = fromTime
1830
    self.toTime = toTime
1831
    self.gatewayId = gatewayId
1832
 
1833
  def read(self, iprot):
1834
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1835
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1836
      return
1837
    iprot.readStructBegin()
1838
    while True:
1839
      (fname, ftype, fid) = iprot.readFieldBegin()
1840
      if ftype == TType.STOP:
1841
        break
1842
      if fid == 1:
1843
        if ftype == TType.I64:
1844
          self.fromTime = iprot.readI64();
1845
        else:
1846
          iprot.skip(ftype)
1847
      elif fid == 2:
1848
        if ftype == TType.I64:
1849
          self.toTime = iprot.readI64();
1850
        else:
1851
          iprot.skip(ftype)
1852
      elif fid == 3:
1853
        if ftype == TType.I64:
1854
          self.gatewayId = iprot.readI64();
1855
        else:
1856
          iprot.skip(ftype)
1857
      else:
1858
        iprot.skip(ftype)
1859
      iprot.readFieldEnd()
1860
    iprot.readStructEnd()
1861
 
1862
  def write(self, oprot):
1863
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1864
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1865
      return
1866
    oprot.writeStructBegin('getPaymentsByCapturedDate_args')
1867
    if self.fromTime is not None:
1868
      oprot.writeFieldBegin('fromTime', TType.I64, 1)
1869
      oprot.writeI64(self.fromTime)
1870
      oprot.writeFieldEnd()
1871
    if self.toTime is not None:
1872
      oprot.writeFieldBegin('toTime', TType.I64, 2)
1873
      oprot.writeI64(self.toTime)
1874
      oprot.writeFieldEnd()
1875
    if self.gatewayId is not None:
1876
      oprot.writeFieldBegin('gatewayId', TType.I64, 3)
1877
      oprot.writeI64(self.gatewayId)
1878
      oprot.writeFieldEnd()
1879
    oprot.writeFieldStop()
1880
    oprot.writeStructEnd()
1881
 
1882
  def validate(self):
1883
    return
1884
 
1885
 
1886
  def __repr__(self):
1887
    L = ['%s=%r' % (key, value)
1888
      for key, value in self.__dict__.iteritems()]
1889
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1890
 
1891
  def __eq__(self, other):
1892
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1893
 
1894
  def __ne__(self, other):
1895
    return not (self == other)
1896
 
1897
class getPaymentsByCapturedDate_result:
1898
  """
1899
  Attributes:
1900
   - success
1901
   - pe
1902
  """
1903
 
1904
  thrift_spec = (
1905
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1906
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1907
  )
1908
 
1909
  def __init__(self, success=None, pe=None,):
1910
    self.success = success
1911
    self.pe = pe
1912
 
1913
  def read(self, iprot):
1914
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1915
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1916
      return
1917
    iprot.readStructBegin()
1918
    while True:
1919
      (fname, ftype, fid) = iprot.readFieldBegin()
1920
      if ftype == TType.STOP:
1921
        break
1922
      if fid == 0:
1923
        if ftype == TType.LIST:
1924
          self.success = []
1925
          (_etype38, _size35) = iprot.readListBegin()
1926
          for _i39 in xrange(_size35):
1927
            _elem40 = Payment()
1928
            _elem40.read(iprot)
1929
            self.success.append(_elem40)
1930
          iprot.readListEnd()
1931
        else:
1932
          iprot.skip(ftype)
1933
      elif fid == 1:
1934
        if ftype == TType.STRUCT:
1935
          self.pe = PaymentException()
1936
          self.pe.read(iprot)
1937
        else:
1938
          iprot.skip(ftype)
1939
      else:
1940
        iprot.skip(ftype)
1941
      iprot.readFieldEnd()
1942
    iprot.readStructEnd()
1943
 
1944
  def write(self, oprot):
1945
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1946
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1947
      return
1948
    oprot.writeStructBegin('getPaymentsByCapturedDate_result')
1949
    if self.success is not None:
1950
      oprot.writeFieldBegin('success', TType.LIST, 0)
1951
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1952
      for iter41 in self.success:
1953
        iter41.write(oprot)
1954
      oprot.writeListEnd()
1955
      oprot.writeFieldEnd()
1956
    if self.pe is not None:
1957
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1958
      self.pe.write(oprot)
1959
      oprot.writeFieldEnd()
1960
    oprot.writeFieldStop()
1961
    oprot.writeStructEnd()
1962
 
1963
  def validate(self):
1964
    return
1965
 
1966
 
1967
  def __repr__(self):
1968
    L = ['%s=%r' % (key, value)
1969
      for key, value in self.__dict__.iteritems()]
1970
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1971
 
1972
  def __eq__(self, other):
1973
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1974
 
1975
  def __ne__(self, other):
1976
    return not (self == other)
1977
 
696 rajveer 1978
class getPaymentGateway_args:
420 ashish 1979
  """
1980
  Attributes:
1981
   - id
1982
  """
1983
 
1984
  thrift_spec = (
1985
    None, # 0
1986
    (1, TType.I64, 'id', None, None, ), # 1
1987
  )
1988
 
696 rajveer 1989
  def __init__(self, id=None,):
420 ashish 1990
    self.id = id
1991
 
1992
  def read(self, iprot):
1993
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1994
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1995
      return
1996
    iprot.readStructBegin()
1997
    while True:
1998
      (fname, ftype, fid) = iprot.readFieldBegin()
1999
      if ftype == TType.STOP:
2000
        break
2001
      if fid == 1:
2002
        if ftype == TType.I64:
2003
          self.id = iprot.readI64();
2004
        else:
2005
          iprot.skip(ftype)
2006
      else:
2007
        iprot.skip(ftype)
2008
      iprot.readFieldEnd()
2009
    iprot.readStructEnd()
2010
 
2011
  def write(self, oprot):
2012
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2013
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2014
      return
696 rajveer 2015
    oprot.writeStructBegin('getPaymentGateway_args')
3431 rajveer 2016
    if self.id is not None:
420 ashish 2017
      oprot.writeFieldBegin('id', TType.I64, 1)
2018
      oprot.writeI64(self.id)
2019
      oprot.writeFieldEnd()
2020
    oprot.writeFieldStop()
2021
    oprot.writeStructEnd()
2022
 
3431 rajveer 2023
  def validate(self):
2024
    return
2025
 
2026
 
420 ashish 2027
  def __repr__(self):
2028
    L = ['%s=%r' % (key, value)
2029
      for key, value in self.__dict__.iteritems()]
2030
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2031
 
2032
  def __eq__(self, other):
2033
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2034
 
2035
  def __ne__(self, other):
2036
    return not (self == other)
2037
 
696 rajveer 2038
class getPaymentGateway_result:
420 ashish 2039
  """
2040
  Attributes:
2041
   - success
2042
   - pe
2043
  """
2044
 
2045
  thrift_spec = (
696 rajveer 2046
    (0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0
420 ashish 2047
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2048
  )
2049
 
2050
  def __init__(self, success=None, pe=None,):
2051
    self.success = success
2052
    self.pe = pe
2053
 
2054
  def read(self, iprot):
2055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2057
      return
2058
    iprot.readStructBegin()
2059
    while True:
2060
      (fname, ftype, fid) = iprot.readFieldBegin()
2061
      if ftype == TType.STOP:
2062
        break
2063
      if fid == 0:
696 rajveer 2064
        if ftype == TType.STRUCT:
2065
          self.success = PaymentGateway()
2066
          self.success.read(iprot)
420 ashish 2067
        else:
2068
          iprot.skip(ftype)
2069
      elif fid == 1:
2070
        if ftype == TType.STRUCT:
2071
          self.pe = PaymentException()
2072
          self.pe.read(iprot)
2073
        else:
2074
          iprot.skip(ftype)
2075
      else:
2076
        iprot.skip(ftype)
2077
      iprot.readFieldEnd()
2078
    iprot.readStructEnd()
2079
 
2080
  def write(self, oprot):
2081
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2082
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2083
      return
696 rajveer 2084
    oprot.writeStructBegin('getPaymentGateway_result')
3431 rajveer 2085
    if self.success is not None:
696 rajveer 2086
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2087
      self.success.write(oprot)
420 ashish 2088
      oprot.writeFieldEnd()
3431 rajveer 2089
    if self.pe is not None:
420 ashish 2090
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2091
      self.pe.write(oprot)
2092
      oprot.writeFieldEnd()
2093
    oprot.writeFieldStop()
2094
    oprot.writeStructEnd()
2095
 
3431 rajveer 2096
  def validate(self):
2097
    return
2098
 
2099
 
420 ashish 2100
  def __repr__(self):
2101
    L = ['%s=%r' % (key, value)
2102
      for key, value in self.__dict__.iteritems()]
2103
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2104
 
2105
  def __eq__(self, other):
2106
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2107
 
2108
  def __ne__(self, other):
2109
    return not (self == other)
2110
 
4600 varun.gupt 2111
class getActivePaymentGateways_args:
2112
 
2113
  thrift_spec = (
2114
  )
2115
 
2116
  def read(self, iprot):
2117
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2118
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2119
      return
2120
    iprot.readStructBegin()
2121
    while True:
2122
      (fname, ftype, fid) = iprot.readFieldBegin()
2123
      if ftype == TType.STOP:
2124
        break
2125
      else:
2126
        iprot.skip(ftype)
2127
      iprot.readFieldEnd()
2128
    iprot.readStructEnd()
2129
 
2130
  def write(self, oprot):
2131
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2132
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2133
      return
2134
    oprot.writeStructBegin('getActivePaymentGateways_args')
2135
    oprot.writeFieldStop()
2136
    oprot.writeStructEnd()
2137
 
2138
  def validate(self):
2139
    return
2140
 
2141
 
2142
  def __repr__(self):
2143
    L = ['%s=%r' % (key, value)
2144
      for key, value in self.__dict__.iteritems()]
2145
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2146
 
2147
  def __eq__(self, other):
2148
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2149
 
2150
  def __ne__(self, other):
2151
    return not (self == other)
2152
 
2153
class getActivePaymentGateways_result:
2154
  """
2155
  Attributes:
2156
   - success
2157
   - pe
2158
  """
2159
 
2160
  thrift_spec = (
2161
    (0, TType.LIST, 'success', (TType.STRUCT,(PaymentGateway, PaymentGateway.thrift_spec)), None, ), # 0
2162
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2163
  )
2164
 
2165
  def __init__(self, success=None, pe=None,):
2166
    self.success = success
2167
    self.pe = pe
2168
 
2169
  def read(self, iprot):
2170
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2171
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2172
      return
2173
    iprot.readStructBegin()
2174
    while True:
2175
      (fname, ftype, fid) = iprot.readFieldBegin()
2176
      if ftype == TType.STOP:
2177
        break
2178
      if fid == 0:
2179
        if ftype == TType.LIST:
2180
          self.success = []
2181
          (_etype45, _size42) = iprot.readListBegin()
2182
          for _i46 in xrange(_size42):
2183
            _elem47 = PaymentGateway()
2184
            _elem47.read(iprot)
2185
            self.success.append(_elem47)
2186
          iprot.readListEnd()
2187
        else:
2188
          iprot.skip(ftype)
2189
      elif fid == 1:
2190
        if ftype == TType.STRUCT:
2191
          self.pe = PaymentException()
2192
          self.pe.read(iprot)
2193
        else:
2194
          iprot.skip(ftype)
2195
      else:
2196
        iprot.skip(ftype)
2197
      iprot.readFieldEnd()
2198
    iprot.readStructEnd()
2199
 
2200
  def write(self, oprot):
2201
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2202
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2203
      return
2204
    oprot.writeStructBegin('getActivePaymentGateways_result')
2205
    if self.success is not None:
2206
      oprot.writeFieldBegin('success', TType.LIST, 0)
2207
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2208
      for iter48 in self.success:
2209
        iter48.write(oprot)
2210
      oprot.writeListEnd()
2211
      oprot.writeFieldEnd()
2212
    if self.pe is not None:
2213
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2214
      self.pe.write(oprot)
2215
      oprot.writeFieldEnd()
2216
    oprot.writeFieldStop()
2217
    oprot.writeStructEnd()
2218
 
2219
  def validate(self):
2220
    return
2221
 
2222
 
2223
  def __repr__(self):
2224
    L = ['%s=%r' % (key, value)
2225
      for key, value in self.__dict__.iteritems()]
2226
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2227
 
2228
  def __eq__(self, other):
2229
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2230
 
2231
  def __ne__(self, other):
2232
    return not (self == other)
2233
 
696 rajveer 2234
class getPayment_args:
420 ashish 2235
  """
2236
  Attributes:
2237
   - id
2238
  """
2239
 
2240
  thrift_spec = (
2241
    None, # 0
2242
    (1, TType.I64, 'id', None, None, ), # 1
2243
  )
2244
 
2245
  def __init__(self, id=None,):
2246
    self.id = id
2247
 
2248
  def read(self, iprot):
2249
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2250
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2251
      return
2252
    iprot.readStructBegin()
2253
    while True:
2254
      (fname, ftype, fid) = iprot.readFieldBegin()
2255
      if ftype == TType.STOP:
2256
        break
2257
      if fid == 1:
2258
        if ftype == TType.I64:
2259
          self.id = iprot.readI64();
2260
        else:
2261
          iprot.skip(ftype)
2262
      else:
2263
        iprot.skip(ftype)
2264
      iprot.readFieldEnd()
2265
    iprot.readStructEnd()
2266
 
2267
  def write(self, oprot):
2268
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2269
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2270
      return
696 rajveer 2271
    oprot.writeStructBegin('getPayment_args')
3431 rajveer 2272
    if self.id is not None:
420 ashish 2273
      oprot.writeFieldBegin('id', TType.I64, 1)
2274
      oprot.writeI64(self.id)
2275
      oprot.writeFieldEnd()
2276
    oprot.writeFieldStop()
2277
    oprot.writeStructEnd()
2278
 
3431 rajveer 2279
  def validate(self):
2280
    return
2281
 
2282
 
420 ashish 2283
  def __repr__(self):
2284
    L = ['%s=%r' % (key, value)
2285
      for key, value in self.__dict__.iteritems()]
2286
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2287
 
2288
  def __eq__(self, other):
2289
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2290
 
2291
  def __ne__(self, other):
2292
    return not (self == other)
2293
 
696 rajveer 2294
class getPayment_result:
420 ashish 2295
  """
2296
  Attributes:
2297
   - success
2298
   - pe
2299
  """
2300
 
2301
  thrift_spec = (
696 rajveer 2302
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
420 ashish 2303
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2304
  )
2305
 
2306
  def __init__(self, success=None, pe=None,):
2307
    self.success = success
2308
    self.pe = pe
2309
 
2310
  def read(self, iprot):
2311
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2312
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2313
      return
2314
    iprot.readStructBegin()
2315
    while True:
2316
      (fname, ftype, fid) = iprot.readFieldBegin()
2317
      if ftype == TType.STOP:
2318
        break
2319
      if fid == 0:
2320
        if ftype == TType.STRUCT:
696 rajveer 2321
          self.success = Payment()
420 ashish 2322
          self.success.read(iprot)
2323
        else:
2324
          iprot.skip(ftype)
2325
      elif fid == 1:
2326
        if ftype == TType.STRUCT:
2327
          self.pe = PaymentException()
2328
          self.pe.read(iprot)
2329
        else:
2330
          iprot.skip(ftype)
2331
      else:
2332
        iprot.skip(ftype)
2333
      iprot.readFieldEnd()
2334
    iprot.readStructEnd()
2335
 
2336
  def write(self, oprot):
2337
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2338
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2339
      return
696 rajveer 2340
    oprot.writeStructBegin('getPayment_result')
3431 rajveer 2341
    if self.success is not None:
420 ashish 2342
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2343
      self.success.write(oprot)
2344
      oprot.writeFieldEnd()
3431 rajveer 2345
    if self.pe is not None:
420 ashish 2346
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2347
      self.pe.write(oprot)
2348
      oprot.writeFieldEnd()
2349
    oprot.writeFieldStop()
2350
    oprot.writeStructEnd()
2351
 
3431 rajveer 2352
  def validate(self):
2353
    return
2354
 
2355
 
420 ashish 2356
  def __repr__(self):
2357
    L = ['%s=%r' % (key, value)
2358
      for key, value in self.__dict__.iteritems()]
2359
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2360
 
2361
  def __eq__(self, other):
2362
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2363
 
2364
  def __ne__(self, other):
2365
    return not (self == other)
2366
 
696 rajveer 2367
class getPaymentForTxnId_args:
420 ashish 2368
  """
2369
  Attributes:
696 rajveer 2370
   - txnId
420 ashish 2371
  """
2372
 
2373
  thrift_spec = (
2374
    None, # 0
696 rajveer 2375
    (1, TType.I64, 'txnId', None, None, ), # 1
420 ashish 2376
  )
2377
 
696 rajveer 2378
  def __init__(self, txnId=None,):
2379
    self.txnId = txnId
420 ashish 2380
 
2381
  def read(self, iprot):
2382
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2383
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2384
      return
2385
    iprot.readStructBegin()
2386
    while True:
2387
      (fname, ftype, fid) = iprot.readFieldBegin()
2388
      if ftype == TType.STOP:
2389
        break
2390
      if fid == 1:
2391
        if ftype == TType.I64:
696 rajveer 2392
          self.txnId = iprot.readI64();
420 ashish 2393
        else:
2394
          iprot.skip(ftype)
2395
      else:
2396
        iprot.skip(ftype)
2397
      iprot.readFieldEnd()
2398
    iprot.readStructEnd()
2399
 
2400
  def write(self, oprot):
2401
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2402
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2403
      return
696 rajveer 2404
    oprot.writeStructBegin('getPaymentForTxnId_args')
3431 rajveer 2405
    if self.txnId is not None:
696 rajveer 2406
      oprot.writeFieldBegin('txnId', TType.I64, 1)
2407
      oprot.writeI64(self.txnId)
420 ashish 2408
      oprot.writeFieldEnd()
2409
    oprot.writeFieldStop()
2410
    oprot.writeStructEnd()
2411
 
3431 rajveer 2412
  def validate(self):
2413
    return
2414
 
2415
 
420 ashish 2416
  def __repr__(self):
2417
    L = ['%s=%r' % (key, value)
2418
      for key, value in self.__dict__.iteritems()]
2419
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2420
 
2421
  def __eq__(self, other):
2422
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2423
 
2424
  def __ne__(self, other):
2425
    return not (self == other)
2426
 
696 rajveer 2427
class getPaymentForTxnId_result:
420 ashish 2428
  """
2429
  Attributes:
2430
   - success
2431
   - pe
2432
  """
2433
 
2434
  thrift_spec = (
696 rajveer 2435
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
420 ashish 2436
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2437
  )
2438
 
2439
  def __init__(self, success=None, pe=None,):
2440
    self.success = success
2441
    self.pe = pe
2442
 
2443
  def read(self, iprot):
2444
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2445
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2446
      return
2447
    iprot.readStructBegin()
2448
    while True:
2449
      (fname, ftype, fid) = iprot.readFieldBegin()
2450
      if ftype == TType.STOP:
2451
        break
2452
      if fid == 0:
696 rajveer 2453
        if ftype == TType.LIST:
2454
          self.success = []
4600 varun.gupt 2455
          (_etype52, _size49) = iprot.readListBegin()
2456
          for _i53 in xrange(_size49):
2457
            _elem54 = Payment()
2458
            _elem54.read(iprot)
2459
            self.success.append(_elem54)
696 rajveer 2460
          iprot.readListEnd()
420 ashish 2461
        else:
2462
          iprot.skip(ftype)
2463
      elif fid == 1:
2464
        if ftype == TType.STRUCT:
2465
          self.pe = PaymentException()
2466
          self.pe.read(iprot)
2467
        else:
2468
          iprot.skip(ftype)
2469
      else:
2470
        iprot.skip(ftype)
2471
      iprot.readFieldEnd()
2472
    iprot.readStructEnd()
2473
 
2474
  def write(self, oprot):
2475
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2476
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2477
      return
696 rajveer 2478
    oprot.writeStructBegin('getPaymentForTxnId_result')
3431 rajveer 2479
    if self.success is not None:
696 rajveer 2480
      oprot.writeFieldBegin('success', TType.LIST, 0)
2481
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4600 varun.gupt 2482
      for iter55 in self.success:
2483
        iter55.write(oprot)
696 rajveer 2484
      oprot.writeListEnd()
420 ashish 2485
      oprot.writeFieldEnd()
3431 rajveer 2486
    if self.pe is not None:
420 ashish 2487
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2488
      self.pe.write(oprot)
2489
      oprot.writeFieldEnd()
2490
    oprot.writeFieldStop()
2491
    oprot.writeStructEnd()
2492
 
3431 rajveer 2493
  def validate(self):
2494
    return
2495
 
2496
 
420 ashish 2497
  def __repr__(self):
2498
    L = ['%s=%r' % (key, value)
2499
      for key, value in self.__dict__.iteritems()]
2500
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2501
 
2502
  def __eq__(self, other):
2503
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2504
 
2505
  def __ne__(self, other):
2506
    return not (self == other)
2507
 
4600 varun.gupt 2508
class getSuccessfulPaymentForTxnId_args:
2509
  """
2510
  Attributes:
2511
   - txnId
2512
  """
2513
 
2514
  thrift_spec = (
2515
    None, # 0
2516
    (1, TType.I64, 'txnId', None, None, ), # 1
2517
  )
2518
 
2519
  def __init__(self, txnId=None,):
2520
    self.txnId = txnId
2521
 
2522
  def read(self, iprot):
2523
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2524
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2525
      return
2526
    iprot.readStructBegin()
2527
    while True:
2528
      (fname, ftype, fid) = iprot.readFieldBegin()
2529
      if ftype == TType.STOP:
2530
        break
2531
      if fid == 1:
2532
        if ftype == TType.I64:
2533
          self.txnId = iprot.readI64();
2534
        else:
2535
          iprot.skip(ftype)
2536
      else:
2537
        iprot.skip(ftype)
2538
      iprot.readFieldEnd()
2539
    iprot.readStructEnd()
2540
 
2541
  def write(self, oprot):
2542
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2543
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2544
      return
2545
    oprot.writeStructBegin('getSuccessfulPaymentForTxnId_args')
2546
    if self.txnId is not None:
2547
      oprot.writeFieldBegin('txnId', TType.I64, 1)
2548
      oprot.writeI64(self.txnId)
2549
      oprot.writeFieldEnd()
2550
    oprot.writeFieldStop()
2551
    oprot.writeStructEnd()
2552
 
2553
  def validate(self):
2554
    return
2555
 
2556
 
2557
  def __repr__(self):
2558
    L = ['%s=%r' % (key, value)
2559
      for key, value in self.__dict__.iteritems()]
2560
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2561
 
2562
  def __eq__(self, other):
2563
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2564
 
2565
  def __ne__(self, other):
2566
    return not (self == other)
2567
 
2568
class getSuccessfulPaymentForTxnId_result:
2569
  """
2570
  Attributes:
2571
   - success
2572
   - pe
2573
  """
2574
 
2575
  thrift_spec = (
2576
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
2577
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2578
  )
2579
 
2580
  def __init__(self, success=None, pe=None,):
2581
    self.success = success
2582
    self.pe = pe
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 == 0:
2594
        if ftype == TType.STRUCT:
2595
          self.success = Payment()
2596
          self.success.read(iprot)
2597
        else:
2598
          iprot.skip(ftype)
2599
      elif fid == 1:
2600
        if ftype == TType.STRUCT:
2601
          self.pe = PaymentException()
2602
          self.pe.read(iprot)
2603
        else:
2604
          iprot.skip(ftype)
2605
      else:
2606
        iprot.skip(ftype)
2607
      iprot.readFieldEnd()
2608
    iprot.readStructEnd()
2609
 
2610
  def write(self, oprot):
2611
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2612
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2613
      return
2614
    oprot.writeStructBegin('getSuccessfulPaymentForTxnId_result')
2615
    if self.success is not None:
2616
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2617
      self.success.write(oprot)
2618
      oprot.writeFieldEnd()
2619
    if self.pe is not None:
2620
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2621
      self.pe.write(oprot)
2622
      oprot.writeFieldEnd()
2623
    oprot.writeFieldStop()
2624
    oprot.writeStructEnd()
2625
 
2626
  def validate(self):
2627
    return
2628
 
2629
 
2630
  def __repr__(self):
2631
    L = ['%s=%r' % (key, value)
2632
      for key, value in self.__dict__.iteritems()]
2633
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2634
 
2635
  def __eq__(self, other):
2636
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2637
 
2638
  def __ne__(self, other):
2639
    return not (self == other)
2640
 
696 rajveer 2641
class updatePaymentDetails_args:
420 ashish 2642
  """
2643
  Attributes:
2644
   - id
696 rajveer 2645
   - gatewayPaymentId
2646
   - sessionId
2647
   - gatewayTxnStatus
2648
   - description
2649
   - gatewayTxnId
2650
   - authCode
2651
   - referenceCode
2652
   - errorCode
2653
   - status
1120 rajveer 2654
   - gatewayTxnDate
696 rajveer 2655
   - attributes
420 ashish 2656
  """
2657
 
2658
  thrift_spec = (
2659
    None, # 0
2660
    (1, TType.I64, 'id', None, None, ), # 1
696 rajveer 2661
    (2, TType.STRING, 'gatewayPaymentId', None, None, ), # 2
2662
    (3, TType.STRING, 'sessionId', None, None, ), # 3
2663
    (4, TType.STRING, 'gatewayTxnStatus', None, None, ), # 4
2664
    (5, TType.STRING, 'description', None, None, ), # 5
2665
    (6, TType.STRING, 'gatewayTxnId', None, None, ), # 6
2666
    (7, TType.STRING, 'authCode', None, None, ), # 7
2667
    (8, TType.STRING, 'referenceCode', None, None, ), # 8
2668
    (9, TType.STRING, 'errorCode', None, None, ), # 9
2669
    (10, TType.I32, 'status', None, None, ), # 10
1120 rajveer 2670
    (11, TType.STRING, 'gatewayTxnDate', None, None, ), # 11
2671
    (12, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 12
420 ashish 2672
  )
2673
 
1120 rajveer 2674
  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 2675
    self.id = id
696 rajveer 2676
    self.gatewayPaymentId = gatewayPaymentId
2677
    self.sessionId = sessionId
2678
    self.gatewayTxnStatus = gatewayTxnStatus
2679
    self.description = description
2680
    self.gatewayTxnId = gatewayTxnId
2681
    self.authCode = authCode
2682
    self.referenceCode = referenceCode
2683
    self.errorCode = errorCode
2684
    self.status = status
1120 rajveer 2685
    self.gatewayTxnDate = gatewayTxnDate
696 rajveer 2686
    self.attributes = attributes
420 ashish 2687
 
2688
  def read(self, iprot):
2689
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2690
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2691
      return
2692
    iprot.readStructBegin()
2693
    while True:
2694
      (fname, ftype, fid) = iprot.readFieldBegin()
2695
      if ftype == TType.STOP:
2696
        break
2697
      if fid == 1:
2698
        if ftype == TType.I64:
2699
          self.id = iprot.readI64();
2700
        else:
2701
          iprot.skip(ftype)
2702
      elif fid == 2:
2703
        if ftype == TType.STRING:
696 rajveer 2704
          self.gatewayPaymentId = iprot.readString();
420 ashish 2705
        else:
2706
          iprot.skip(ftype)
2707
      elif fid == 3:
2708
        if ftype == TType.STRING:
696 rajveer 2709
          self.sessionId = iprot.readString();
420 ashish 2710
        else:
2711
          iprot.skip(ftype)
2712
      elif fid == 4:
2713
        if ftype == TType.STRING:
696 rajveer 2714
          self.gatewayTxnStatus = iprot.readString();
420 ashish 2715
        else:
2716
          iprot.skip(ftype)
2717
      elif fid == 5:
2718
        if ftype == TType.STRING:
696 rajveer 2719
          self.description = iprot.readString();
420 ashish 2720
        else:
2721
          iprot.skip(ftype)
2722
      elif fid == 6:
2723
        if ftype == TType.STRING:
696 rajveer 2724
          self.gatewayTxnId = iprot.readString();
420 ashish 2725
        else:
2726
          iprot.skip(ftype)
2727
      elif fid == 7:
2728
        if ftype == TType.STRING:
696 rajveer 2729
          self.authCode = iprot.readString();
420 ashish 2730
        else:
2731
          iprot.skip(ftype)
2732
      elif fid == 8:
2733
        if ftype == TType.STRING:
696 rajveer 2734
          self.referenceCode = iprot.readString();
420 ashish 2735
        else:
2736
          iprot.skip(ftype)
696 rajveer 2737
      elif fid == 9:
2738
        if ftype == TType.STRING:
2739
          self.errorCode = iprot.readString();
2740
        else:
2741
          iprot.skip(ftype)
2742
      elif fid == 10:
2743
        if ftype == TType.I32:
2744
          self.status = iprot.readI32();
2745
        else:
2746
          iprot.skip(ftype)
2747
      elif fid == 11:
1120 rajveer 2748
        if ftype == TType.STRING:
2749
          self.gatewayTxnDate = iprot.readString();
2750
        else:
2751
          iprot.skip(ftype)
2752
      elif fid == 12:
696 rajveer 2753
        if ftype == TType.LIST:
2754
          self.attributes = []
4600 varun.gupt 2755
          (_etype59, _size56) = iprot.readListBegin()
2756
          for _i60 in xrange(_size56):
2757
            _elem61 = Attribute()
2758
            _elem61.read(iprot)
2759
            self.attributes.append(_elem61)
696 rajveer 2760
          iprot.readListEnd()
2761
        else:
2762
          iprot.skip(ftype)
420 ashish 2763
      else:
2764
        iprot.skip(ftype)
2765
      iprot.readFieldEnd()
2766
    iprot.readStructEnd()
2767
 
2768
  def write(self, oprot):
2769
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2770
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2771
      return
696 rajveer 2772
    oprot.writeStructBegin('updatePaymentDetails_args')
3431 rajveer 2773
    if self.id is not None:
420 ashish 2774
      oprot.writeFieldBegin('id', TType.I64, 1)
2775
      oprot.writeI64(self.id)
2776
      oprot.writeFieldEnd()
3431 rajveer 2777
    if self.gatewayPaymentId is not None:
696 rajveer 2778
      oprot.writeFieldBegin('gatewayPaymentId', TType.STRING, 2)
2779
      oprot.writeString(self.gatewayPaymentId)
420 ashish 2780
      oprot.writeFieldEnd()
3431 rajveer 2781
    if self.sessionId is not None:
696 rajveer 2782
      oprot.writeFieldBegin('sessionId', TType.STRING, 3)
2783
      oprot.writeString(self.sessionId)
420 ashish 2784
      oprot.writeFieldEnd()
3431 rajveer 2785
    if self.gatewayTxnStatus is not None:
696 rajveer 2786
      oprot.writeFieldBegin('gatewayTxnStatus', TType.STRING, 4)
2787
      oprot.writeString(self.gatewayTxnStatus)
420 ashish 2788
      oprot.writeFieldEnd()
3431 rajveer 2789
    if self.description is not None:
696 rajveer 2790
      oprot.writeFieldBegin('description', TType.STRING, 5)
2791
      oprot.writeString(self.description)
420 ashish 2792
      oprot.writeFieldEnd()
3431 rajveer 2793
    if self.gatewayTxnId is not None:
696 rajveer 2794
      oprot.writeFieldBegin('gatewayTxnId', TType.STRING, 6)
2795
      oprot.writeString(self.gatewayTxnId)
420 ashish 2796
      oprot.writeFieldEnd()
3431 rajveer 2797
    if self.authCode is not None:
696 rajveer 2798
      oprot.writeFieldBegin('authCode', TType.STRING, 7)
2799
      oprot.writeString(self.authCode)
420 ashish 2800
      oprot.writeFieldEnd()
3431 rajveer 2801
    if self.referenceCode is not None:
696 rajveer 2802
      oprot.writeFieldBegin('referenceCode', TType.STRING, 8)
2803
      oprot.writeString(self.referenceCode)
420 ashish 2804
      oprot.writeFieldEnd()
3431 rajveer 2805
    if self.errorCode is not None:
696 rajveer 2806
      oprot.writeFieldBegin('errorCode', TType.STRING, 9)
2807
      oprot.writeString(self.errorCode)
2808
      oprot.writeFieldEnd()
3431 rajveer 2809
    if self.status is not None:
696 rajveer 2810
      oprot.writeFieldBegin('status', TType.I32, 10)
2811
      oprot.writeI32(self.status)
2812
      oprot.writeFieldEnd()
3431 rajveer 2813
    if self.gatewayTxnDate is not None:
1120 rajveer 2814
      oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)
2815
      oprot.writeString(self.gatewayTxnDate)
2816
      oprot.writeFieldEnd()
3431 rajveer 2817
    if self.attributes is not None:
1120 rajveer 2818
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
696 rajveer 2819
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
4600 varun.gupt 2820
      for iter62 in self.attributes:
2821
        iter62.write(oprot)
696 rajveer 2822
      oprot.writeListEnd()
2823
      oprot.writeFieldEnd()
420 ashish 2824
    oprot.writeFieldStop()
2825
    oprot.writeStructEnd()
2826
 
3431 rajveer 2827
  def validate(self):
2828
    return
2829
 
2830
 
420 ashish 2831
  def __repr__(self):
2832
    L = ['%s=%r' % (key, value)
2833
      for key, value in self.__dict__.iteritems()]
2834
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2835
 
2836
  def __eq__(self, other):
2837
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2838
 
2839
  def __ne__(self, other):
2840
    return not (self == other)
2841
 
696 rajveer 2842
class updatePaymentDetails_result:
420 ashish 2843
  """
2844
  Attributes:
696 rajveer 2845
   - success
420 ashish 2846
   - pe
2847
  """
2848
 
2849
  thrift_spec = (
696 rajveer 2850
    (0, TType.BOOL, 'success', None, None, ), # 0
420 ashish 2851
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2852
  )
2853
 
696 rajveer 2854
  def __init__(self, success=None, pe=None,):
2855
    self.success = success
420 ashish 2856
    self.pe = pe
2857
 
2858
  def read(self, iprot):
2859
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2860
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2861
      return
2862
    iprot.readStructBegin()
2863
    while True:
2864
      (fname, ftype, fid) = iprot.readFieldBegin()
2865
      if ftype == TType.STOP:
2866
        break
696 rajveer 2867
      if fid == 0:
2868
        if ftype == TType.BOOL:
2869
          self.success = iprot.readBool();
2870
        else:
2871
          iprot.skip(ftype)
2872
      elif fid == 1:
420 ashish 2873
        if ftype == TType.STRUCT:
2874
          self.pe = PaymentException()
2875
          self.pe.read(iprot)
2876
        else:
2877
          iprot.skip(ftype)
2878
      else:
2879
        iprot.skip(ftype)
2880
      iprot.readFieldEnd()
2881
    iprot.readStructEnd()
2882
 
2883
  def write(self, oprot):
2884
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2885
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2886
      return
696 rajveer 2887
    oprot.writeStructBegin('updatePaymentDetails_result')
3431 rajveer 2888
    if self.success is not None:
696 rajveer 2889
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2890
      oprot.writeBool(self.success)
2891
      oprot.writeFieldEnd()
3431 rajveer 2892
    if self.pe is not None:
420 ashish 2893
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2894
      self.pe.write(oprot)
2895
      oprot.writeFieldEnd()
2896
    oprot.writeFieldStop()
2897
    oprot.writeStructEnd()
2898
 
3431 rajveer 2899
  def validate(self):
2900
    return
2901
 
2902
 
420 ashish 2903
  def __repr__(self):
2904
    L = ['%s=%r' % (key, value)
2905
      for key, value in self.__dict__.iteritems()]
2906
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2907
 
2908
  def __eq__(self, other):
2909
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2910
 
2911
  def __ne__(self, other):
2912
    return not (self == other)
2913
 
1731 ankur.sing 2914
class getSuccessfulPaymentsAmountRange_args:
420 ashish 2915
 
1627 ankur.sing 2916
  thrift_spec = (
2917
  )
2918
 
2919
  def read(self, iprot):
2920
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2921
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2922
      return
2923
    iprot.readStructBegin()
2924
    while True:
2925
      (fname, ftype, fid) = iprot.readFieldBegin()
2926
      if ftype == TType.STOP:
2927
        break
2928
      else:
2929
        iprot.skip(ftype)
2930
      iprot.readFieldEnd()
2931
    iprot.readStructEnd()
2932
 
2933
  def write(self, oprot):
2934
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2935
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2936
      return
1731 ankur.sing 2937
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_args')
1627 ankur.sing 2938
    oprot.writeFieldStop()
2939
    oprot.writeStructEnd()
2940
 
3431 rajveer 2941
  def validate(self):
2942
    return
2943
 
2944
 
1627 ankur.sing 2945
  def __repr__(self):
2946
    L = ['%s=%r' % (key, value)
2947
      for key, value in self.__dict__.iteritems()]
2948
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2949
 
2950
  def __eq__(self, other):
2951
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2952
 
2953
  def __ne__(self, other):
2954
    return not (self == other)
2955
 
1731 ankur.sing 2956
class getSuccessfulPaymentsAmountRange_result:
1627 ankur.sing 2957
  """
2958
  Attributes:
2959
   - success
2960
  """
2961
 
2962
  thrift_spec = (
1731 ankur.sing 2963
    (0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0
1627 ankur.sing 2964
  )
2965
 
2966
  def __init__(self, success=None,):
2967
    self.success = success
2968
 
2969
  def read(self, iprot):
2970
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2971
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2972
      return
2973
    iprot.readStructBegin()
2974
    while True:
2975
      (fname, ftype, fid) = iprot.readFieldBegin()
2976
      if ftype == TType.STOP:
2977
        break
2978
      if fid == 0:
1731 ankur.sing 2979
        if ftype == TType.LIST:
2980
          self.success = []
4600 varun.gupt 2981
          (_etype66, _size63) = iprot.readListBegin()
2982
          for _i67 in xrange(_size63):
2983
            _elem68 = iprot.readDouble();
2984
            self.success.append(_elem68)
1731 ankur.sing 2985
          iprot.readListEnd()
1627 ankur.sing 2986
        else:
2987
          iprot.skip(ftype)
2988
      else:
2989
        iprot.skip(ftype)
2990
      iprot.readFieldEnd()
2991
    iprot.readStructEnd()
2992
 
2993
  def write(self, oprot):
2994
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2995
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2996
      return
1731 ankur.sing 2997
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_result')
3431 rajveer 2998
    if self.success is not None:
1731 ankur.sing 2999
      oprot.writeFieldBegin('success', TType.LIST, 0)
3000
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
4600 varun.gupt 3001
      for iter69 in self.success:
3002
        oprot.writeDouble(iter69)
1731 ankur.sing 3003
      oprot.writeListEnd()
1627 ankur.sing 3004
      oprot.writeFieldEnd()
3005
    oprot.writeFieldStop()
3006
    oprot.writeStructEnd()
3007
 
3431 rajveer 3008
  def validate(self):
3009
    return
3010
 
3011
 
1627 ankur.sing 3012
  def __repr__(self):
3013
    L = ['%s=%r' % (key, value)
3014
      for key, value in self.__dict__.iteritems()]
3015
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3016
 
3017
  def __eq__(self, other):
3018
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3019
 
3020
  def __ne__(self, other):
3021
    return not (self == other)
3022
 
3010 chandransh 3023
class initializeHdfcPayment_args:
2708 chandransh 3024
  """
3025
  Attributes:
3026
   - merchantPaymentId
3027
  """
3028
 
3029
  thrift_spec = (
3030
    None, # 0
3031
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
3032
  )
3033
 
3034
  def __init__(self, merchantPaymentId=None,):
3035
    self.merchantPaymentId = merchantPaymentId
3036
 
3037
  def read(self, iprot):
3038
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3039
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3040
      return
3041
    iprot.readStructBegin()
3042
    while True:
3043
      (fname, ftype, fid) = iprot.readFieldBegin()
3044
      if ftype == TType.STOP:
3045
        break
3046
      if fid == 1:
3047
        if ftype == TType.I64:
3048
          self.merchantPaymentId = iprot.readI64();
3049
        else:
3050
          iprot.skip(ftype)
3051
      else:
3052
        iprot.skip(ftype)
3053
      iprot.readFieldEnd()
3054
    iprot.readStructEnd()
3055
 
3056
  def write(self, oprot):
3057
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3058
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3059
      return
3010 chandransh 3060
    oprot.writeStructBegin('initializeHdfcPayment_args')
3431 rajveer 3061
    if self.merchantPaymentId is not None:
2708 chandransh 3062
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
3063
      oprot.writeI64(self.merchantPaymentId)
3064
      oprot.writeFieldEnd()
3065
    oprot.writeFieldStop()
3066
    oprot.writeStructEnd()
3067
 
3431 rajveer 3068
  def validate(self):
3069
    return
3070
 
3071
 
2708 chandransh 3072
  def __repr__(self):
3073
    L = ['%s=%r' % (key, value)
3074
      for key, value in self.__dict__.iteritems()]
3075
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3076
 
3077
  def __eq__(self, other):
3078
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3079
 
3080
  def __ne__(self, other):
3081
    return not (self == other)
3082
 
3010 chandransh 3083
class initializeHdfcPayment_result:
2708 chandransh 3084
  """
3085
  Attributes:
3086
   - success
3087
   - pe
3088
  """
3089
 
3090
  thrift_spec = (
3010 chandransh 3091
    (0, TType.STRING, 'success', None, None, ), # 0
2708 chandransh 3092
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3093
  )
3094
 
3095
  def __init__(self, success=None, pe=None,):
3096
    self.success = success
3097
    self.pe = pe
3098
 
3099
  def read(self, iprot):
3100
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3101
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3102
      return
3103
    iprot.readStructBegin()
3104
    while True:
3105
      (fname, ftype, fid) = iprot.readFieldBegin()
3106
      if ftype == TType.STOP:
3107
        break
3108
      if fid == 0:
3010 chandransh 3109
        if ftype == TType.STRING:
3110
          self.success = iprot.readString();
2708 chandransh 3111
        else:
3112
          iprot.skip(ftype)
3113
      elif fid == 1:
3114
        if ftype == TType.STRUCT:
3115
          self.pe = PaymentException()
3116
          self.pe.read(iprot)
3117
        else:
3118
          iprot.skip(ftype)
3119
      else:
3120
        iprot.skip(ftype)
3121
      iprot.readFieldEnd()
3122
    iprot.readStructEnd()
3123
 
3124
  def write(self, oprot):
3125
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3126
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3127
      return
3010 chandransh 3128
    oprot.writeStructBegin('initializeHdfcPayment_result')
3431 rajveer 3129
    if self.success is not None:
3010 chandransh 3130
      oprot.writeFieldBegin('success', TType.STRING, 0)
3131
      oprot.writeString(self.success)
2708 chandransh 3132
      oprot.writeFieldEnd()
3431 rajveer 3133
    if self.pe is not None:
2708 chandransh 3134
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3135
      self.pe.write(oprot)
3136
      oprot.writeFieldEnd()
3137
    oprot.writeFieldStop()
3138
    oprot.writeStructEnd()
3139
 
3431 rajveer 3140
  def validate(self):
3141
    return
3142
 
3143
 
2708 chandransh 3144
  def __repr__(self):
3145
    L = ['%s=%r' % (key, value)
3146
      for key, value in self.__dict__.iteritems()]
3147
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3148
 
3149
  def __eq__(self, other):
3150
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3151
 
3152
  def __ne__(self, other):
3153
    return not (self == other)
3154
 
6050 anupam.sin 3155
class doHdfcPaymentForDigitalOrder_args:
3156
  """
3157
  Attributes:
3158
   - merchantPaymentId
3159
   - rechargeOrderId
3160
  """
3161
 
3162
  thrift_spec = (
3163
    None, # 0
3164
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
3165
    (2, TType.I64, 'rechargeOrderId', None, None, ), # 2
3166
  )
3167
 
3168
  def __init__(self, merchantPaymentId=None, rechargeOrderId=None,):
3169
    self.merchantPaymentId = merchantPaymentId
3170
    self.rechargeOrderId = rechargeOrderId
3171
 
3172
  def read(self, iprot):
3173
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3174
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3175
      return
3176
    iprot.readStructBegin()
3177
    while True:
3178
      (fname, ftype, fid) = iprot.readFieldBegin()
3179
      if ftype == TType.STOP:
3180
        break
3181
      if fid == 1:
3182
        if ftype == TType.I64:
3183
          self.merchantPaymentId = iprot.readI64();
3184
        else:
3185
          iprot.skip(ftype)
3186
      elif fid == 2:
3187
        if ftype == TType.I64:
3188
          self.rechargeOrderId = iprot.readI64();
3189
        else:
3190
          iprot.skip(ftype)
3191
      else:
3192
        iprot.skip(ftype)
3193
      iprot.readFieldEnd()
3194
    iprot.readStructEnd()
3195
 
3196
  def write(self, oprot):
3197
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3198
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3199
      return
3200
    oprot.writeStructBegin('doHdfcPaymentForDigitalOrder_args')
3201
    if self.merchantPaymentId is not None:
3202
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
3203
      oprot.writeI64(self.merchantPaymentId)
3204
      oprot.writeFieldEnd()
3205
    if self.rechargeOrderId is not None:
3206
      oprot.writeFieldBegin('rechargeOrderId', TType.I64, 2)
3207
      oprot.writeI64(self.rechargeOrderId)
3208
      oprot.writeFieldEnd()
3209
    oprot.writeFieldStop()
3210
    oprot.writeStructEnd()
3211
 
3212
  def validate(self):
3213
    return
3214
 
3215
 
3216
  def __repr__(self):
3217
    L = ['%s=%r' % (key, value)
3218
      for key, value in self.__dict__.iteritems()]
3219
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3220
 
3221
  def __eq__(self, other):
3222
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3223
 
3224
  def __ne__(self, other):
3225
    return not (self == other)
3226
 
3227
class doHdfcPaymentForDigitalOrder_result:
3228
  """
3229
  Attributes:
3230
   - success
3231
   - pe
3232
  """
3233
 
3234
  thrift_spec = (
3235
    (0, TType.STRING, 'success', None, None, ), # 0
3236
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3237
  )
3238
 
3239
  def __init__(self, success=None, pe=None,):
3240
    self.success = success
3241
    self.pe = pe
3242
 
3243
  def read(self, iprot):
3244
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3245
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3246
      return
3247
    iprot.readStructBegin()
3248
    while True:
3249
      (fname, ftype, fid) = iprot.readFieldBegin()
3250
      if ftype == TType.STOP:
3251
        break
3252
      if fid == 0:
3253
        if ftype == TType.STRING:
3254
          self.success = iprot.readString();
3255
        else:
3256
          iprot.skip(ftype)
3257
      elif fid == 1:
3258
        if ftype == TType.STRUCT:
3259
          self.pe = PaymentException()
3260
          self.pe.read(iprot)
3261
        else:
3262
          iprot.skip(ftype)
3263
      else:
3264
        iprot.skip(ftype)
3265
      iprot.readFieldEnd()
3266
    iprot.readStructEnd()
3267
 
3268
  def write(self, oprot):
3269
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3270
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3271
      return
3272
    oprot.writeStructBegin('doHdfcPaymentForDigitalOrder_result')
3273
    if self.success is not None:
3274
      oprot.writeFieldBegin('success', TType.STRING, 0)
3275
      oprot.writeString(self.success)
3276
      oprot.writeFieldEnd()
3277
    if self.pe is not None:
3278
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3279
      self.pe.write(oprot)
3280
      oprot.writeFieldEnd()
3281
    oprot.writeFieldStop()
3282
    oprot.writeStructEnd()
3283
 
3284
  def validate(self):
3285
    return
3286
 
3287
 
3288
  def __repr__(self):
3289
    L = ['%s=%r' % (key, value)
3290
      for key, value in self.__dict__.iteritems()]
3291
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3292
 
3293
  def __eq__(self, other):
3294
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3295
 
3296
  def __ne__(self, other):
3297
    return not (self == other)
3298
 
3616 chandransh 3299
class initializeHdfcEmiPayment_args:
3300
  """
3301
  Attributes:
3302
   - merchantPaymentId
3303
  """
3304
 
3305
  thrift_spec = (
3306
    None, # 0
3307
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
3308
  )
3309
 
3310
  def __init__(self, merchantPaymentId=None,):
3311
    self.merchantPaymentId = merchantPaymentId
3312
 
3313
  def read(self, iprot):
3314
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3315
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3316
      return
3317
    iprot.readStructBegin()
3318
    while True:
3319
      (fname, ftype, fid) = iprot.readFieldBegin()
3320
      if ftype == TType.STOP:
3321
        break
3322
      if fid == 1:
3323
        if ftype == TType.I64:
3324
          self.merchantPaymentId = iprot.readI64();
3325
        else:
3326
          iprot.skip(ftype)
3327
      else:
3328
        iprot.skip(ftype)
3329
      iprot.readFieldEnd()
3330
    iprot.readStructEnd()
3331
 
3332
  def write(self, oprot):
3333
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3334
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3335
      return
3336
    oprot.writeStructBegin('initializeHdfcEmiPayment_args')
3337
    if self.merchantPaymentId is not None:
3338
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
3339
      oprot.writeI64(self.merchantPaymentId)
3340
      oprot.writeFieldEnd()
3341
    oprot.writeFieldStop()
3342
    oprot.writeStructEnd()
3343
 
3344
  def validate(self):
3345
    return
3346
 
3347
 
3348
  def __repr__(self):
3349
    L = ['%s=%r' % (key, value)
3350
      for key, value in self.__dict__.iteritems()]
3351
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3352
 
3353
  def __eq__(self, other):
3354
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3355
 
3356
  def __ne__(self, other):
3357
    return not (self == other)
3358
 
3359
class initializeHdfcEmiPayment_result:
3360
  """
3361
  Attributes:
3362
   - success
3363
   - pe
3364
  """
3365
 
3366
  thrift_spec = (
3367
    (0, TType.STRING, 'success', None, None, ), # 0
3368
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3369
  )
3370
 
3371
  def __init__(self, success=None, pe=None,):
3372
    self.success = success
3373
    self.pe = pe
3374
 
3375
  def read(self, iprot):
3376
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3377
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3378
      return
3379
    iprot.readStructBegin()
3380
    while True:
3381
      (fname, ftype, fid) = iprot.readFieldBegin()
3382
      if ftype == TType.STOP:
3383
        break
3384
      if fid == 0:
3385
        if ftype == TType.STRING:
3386
          self.success = iprot.readString();
3387
        else:
3388
          iprot.skip(ftype)
3389
      elif fid == 1:
3390
        if ftype == TType.STRUCT:
3391
          self.pe = PaymentException()
3392
          self.pe.read(iprot)
3393
        else:
3394
          iprot.skip(ftype)
3395
      else:
3396
        iprot.skip(ftype)
3397
      iprot.readFieldEnd()
3398
    iprot.readStructEnd()
3399
 
3400
  def write(self, oprot):
3401
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3402
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3403
      return
3404
    oprot.writeStructBegin('initializeHdfcEmiPayment_result')
3405
    if self.success is not None:
3406
      oprot.writeFieldBegin('success', TType.STRING, 0)
3407
      oprot.writeString(self.success)
3408
      oprot.writeFieldEnd()
3409
    if self.pe is not None:
3410
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3411
      self.pe.write(oprot)
3412
      oprot.writeFieldEnd()
3413
    oprot.writeFieldStop()
3414
    oprot.writeStructEnd()
3415
 
3416
  def validate(self):
3417
    return
3418
 
3419
 
3420
  def __repr__(self):
3421
    L = ['%s=%r' % (key, value)
3422
      for key, value in self.__dict__.iteritems()]
3423
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3424
 
3425
  def __eq__(self, other):
3426
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3427
 
3428
  def __ne__(self, other):
3429
    return not (self == other)
3430
 
3010 chandransh 3431
class createRefund_args:
2559 chandransh 3432
  """
3433
  Attributes:
3010 chandransh 3434
   - orderId
3435
   - merchantTxnId
3436
   - amount
2559 chandransh 3437
  """
3438
 
3439
  thrift_spec = (
3440
    None, # 0
3010 chandransh 3441
    (1, TType.I64, 'orderId', None, None, ), # 1
3442
    (2, TType.I64, 'merchantTxnId', None, None, ), # 2
3443
    (3, TType.DOUBLE, 'amount', None, None, ), # 3
2559 chandransh 3444
  )
3445
 
3010 chandransh 3446
  def __init__(self, orderId=None, merchantTxnId=None, amount=None,):
3447
    self.orderId = orderId
3448
    self.merchantTxnId = merchantTxnId
3449
    self.amount = amount
2559 chandransh 3450
 
3451
  def read(self, iprot):
3452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3454
      return
3455
    iprot.readStructBegin()
3456
    while True:
3457
      (fname, ftype, fid) = iprot.readFieldBegin()
3458
      if ftype == TType.STOP:
3459
        break
3460
      if fid == 1:
3461
        if ftype == TType.I64:
3010 chandransh 3462
          self.orderId = iprot.readI64();
2559 chandransh 3463
        else:
3464
          iprot.skip(ftype)
3010 chandransh 3465
      elif fid == 2:
3466
        if ftype == TType.I64:
3467
          self.merchantTxnId = iprot.readI64();
3468
        else:
3469
          iprot.skip(ftype)
3470
      elif fid == 3:
3471
        if ftype == TType.DOUBLE:
3472
          self.amount = iprot.readDouble();
3473
        else:
3474
          iprot.skip(ftype)
2559 chandransh 3475
      else:
3476
        iprot.skip(ftype)
3477
      iprot.readFieldEnd()
3478
    iprot.readStructEnd()
3479
 
3480
  def write(self, oprot):
3481
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3482
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3483
      return
3010 chandransh 3484
    oprot.writeStructBegin('createRefund_args')
3431 rajveer 3485
    if self.orderId is not None:
3010 chandransh 3486
      oprot.writeFieldBegin('orderId', TType.I64, 1)
3487
      oprot.writeI64(self.orderId)
2559 chandransh 3488
      oprot.writeFieldEnd()
3431 rajveer 3489
    if self.merchantTxnId is not None:
3010 chandransh 3490
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 2)
3491
      oprot.writeI64(self.merchantTxnId)
3492
      oprot.writeFieldEnd()
3431 rajveer 3493
    if self.amount is not None:
3010 chandransh 3494
      oprot.writeFieldBegin('amount', TType.DOUBLE, 3)
3495
      oprot.writeDouble(self.amount)
3496
      oprot.writeFieldEnd()
2559 chandransh 3497
    oprot.writeFieldStop()
3498
    oprot.writeStructEnd()
3499
 
3431 rajveer 3500
  def validate(self):
3501
    return
3502
 
3503
 
2559 chandransh 3504
  def __repr__(self):
3505
    L = ['%s=%r' % (key, value)
3506
      for key, value in self.__dict__.iteritems()]
3507
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3508
 
3509
  def __eq__(self, other):
3510
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3511
 
3512
  def __ne__(self, other):
3513
    return not (self == other)
3514
 
3010 chandransh 3515
class createRefund_result:
2559 chandransh 3516
  """
3517
  Attributes:
3518
   - success
3519
   - pe
3520
  """
3521
 
3522
  thrift_spec = (
3010 chandransh 3523
    (0, TType.I64, 'success', None, None, ), # 0
2559 chandransh 3524
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3525
  )
3526
 
3527
  def __init__(self, success=None, pe=None,):
3528
    self.success = success
3529
    self.pe = pe
3530
 
3531
  def read(self, iprot):
3532
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3533
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3534
      return
3535
    iprot.readStructBegin()
3536
    while True:
3537
      (fname, ftype, fid) = iprot.readFieldBegin()
3538
      if ftype == TType.STOP:
3539
        break
3540
      if fid == 0:
3010 chandransh 3541
        if ftype == TType.I64:
3542
          self.success = iprot.readI64();
2559 chandransh 3543
        else:
3544
          iprot.skip(ftype)
3545
      elif fid == 1:
3546
        if ftype == TType.STRUCT:
3547
          self.pe = PaymentException()
3548
          self.pe.read(iprot)
3549
        else:
3550
          iprot.skip(ftype)
3551
      else:
3552
        iprot.skip(ftype)
3553
      iprot.readFieldEnd()
3554
    iprot.readStructEnd()
3555
 
3556
  def write(self, oprot):
3557
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3558
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3559
      return
3010 chandransh 3560
    oprot.writeStructBegin('createRefund_result')
3431 rajveer 3561
    if self.success is not None:
3010 chandransh 3562
      oprot.writeFieldBegin('success', TType.I64, 0)
3563
      oprot.writeI64(self.success)
2559 chandransh 3564
      oprot.writeFieldEnd()
3431 rajveer 3565
    if self.pe is not None:
2559 chandransh 3566
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3567
      self.pe.write(oprot)
3568
      oprot.writeFieldEnd()
3569
    oprot.writeFieldStop()
3570
    oprot.writeStructEnd()
3571
 
3431 rajveer 3572
  def validate(self):
3573
    return
3574
 
3575
 
2559 chandransh 3576
  def __repr__(self):
3577
    L = ['%s=%r' % (key, value)
3578
      for key, value in self.__dict__.iteritems()]
3579
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3580
 
3581
  def __eq__(self, other):
3582
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3583
 
3584
  def __ne__(self, other):
3585
    return not (self == other)
3586
 
3010 chandransh 3587
class capturePayment_args:
2685 chandransh 3588
  """
3589
  Attributes:
3590
   - merchantTxnId
3591
  """
2559 chandransh 3592
 
2685 chandransh 3593
  thrift_spec = (
3594
    None, # 0
3010 chandransh 3595
    (1, TType.I64, 'merchantTxnId', None, None, ), # 1
2685 chandransh 3596
  )
3597
 
3010 chandransh 3598
  def __init__(self, merchantTxnId=None,):
2685 chandransh 3599
    self.merchantTxnId = merchantTxnId
3600
 
3601
  def read(self, iprot):
3602
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3603
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3604
      return
3605
    iprot.readStructBegin()
3606
    while True:
3607
      (fname, ftype, fid) = iprot.readFieldBegin()
3608
      if ftype == TType.STOP:
3609
        break
3610
      if fid == 1:
3611
        if ftype == TType.I64:
3612
          self.merchantTxnId = iprot.readI64();
3613
        else:
3614
          iprot.skip(ftype)
3615
      else:
3616
        iprot.skip(ftype)
3617
      iprot.readFieldEnd()
3618
    iprot.readStructEnd()
3619
 
3620
  def write(self, oprot):
3621
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3622
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3623
      return
3010 chandransh 3624
    oprot.writeStructBegin('capturePayment_args')
3431 rajveer 3625
    if self.merchantTxnId is not None:
3010 chandransh 3626
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)
2685 chandransh 3627
      oprot.writeI64(self.merchantTxnId)
3628
      oprot.writeFieldEnd()
3629
    oprot.writeFieldStop()
3630
    oprot.writeStructEnd()
3631
 
3431 rajveer 3632
  def validate(self):
3633
    return
3634
 
3635
 
2685 chandransh 3636
  def __repr__(self):
3637
    L = ['%s=%r' % (key, value)
3638
      for key, value in self.__dict__.iteritems()]
3639
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3640
 
3641
  def __eq__(self, other):
3642
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3643
 
3644
  def __ne__(self, other):
3645
    return not (self == other)
3646
 
3010 chandransh 3647
class capturePayment_result:
2685 chandransh 3648
  """
3649
  Attributes:
3650
   - success
3651
   - pe
3652
  """
3653
 
3654
  thrift_spec = (
3010 chandransh 3655
    (0, TType.BOOL, 'success', None, None, ), # 0
2685 chandransh 3656
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3657
  )
3658
 
3659
  def __init__(self, success=None, pe=None,):
3660
    self.success = success
3661
    self.pe = pe
3662
 
3663
  def read(self, iprot):
3664
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3665
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3666
      return
3667
    iprot.readStructBegin()
3668
    while True:
3669
      (fname, ftype, fid) = iprot.readFieldBegin()
3670
      if ftype == TType.STOP:
3671
        break
3672
      if fid == 0:
3010 chandransh 3673
        if ftype == TType.BOOL:
3674
          self.success = iprot.readBool();
2685 chandransh 3675
        else:
3676
          iprot.skip(ftype)
3677
      elif fid == 1:
3678
        if ftype == TType.STRUCT:
3679
          self.pe = PaymentException()
3680
          self.pe.read(iprot)
3681
        else:
3682
          iprot.skip(ftype)
3683
      else:
3684
        iprot.skip(ftype)
3685
      iprot.readFieldEnd()
3686
    iprot.readStructEnd()
3687
 
3688
  def write(self, oprot):
3689
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3690
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3691
      return
3010 chandransh 3692
    oprot.writeStructBegin('capturePayment_result')
3431 rajveer 3693
    if self.success is not None:
3010 chandransh 3694
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3695
      oprot.writeBool(self.success)
2685 chandransh 3696
      oprot.writeFieldEnd()
3431 rajveer 3697
    if self.pe is not None:
2685 chandransh 3698
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3699
      self.pe.write(oprot)
3700
      oprot.writeFieldEnd()
3701
    oprot.writeFieldStop()
3702
    oprot.writeStructEnd()
3703
 
3431 rajveer 3704
  def validate(self):
3705
    return
3706
 
3707
 
2685 chandransh 3708
  def __repr__(self):
3709
    L = ['%s=%r' % (key, value)
3710
      for key, value in self.__dict__.iteritems()]
3711
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3712
 
3713
  def __eq__(self, other):
3714
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3715
 
3716
  def __ne__(self, other):
3717
    return not (self == other)
3956 chandransh 3718
 
3719
class partiallyCapturePayment_args:
3720
  """
3721
  Attributes:
3722
   - merchantTxnId
3723
   - amount
3724
   - xferBy
3725
   - xferTxnId
3726
   - xferDate
3727
  """
3728
 
3729
  thrift_spec = (
3730
    None, # 0
3731
    (1, TType.I64, 'merchantTxnId', None, None, ), # 1
3732
    (2, TType.DOUBLE, 'amount', None, None, ), # 2
3733
    (3, TType.STRING, 'xferBy', None, None, ), # 3
3734
    (4, TType.STRING, 'xferTxnId', None, None, ), # 4
3735
    (5, TType.I64, 'xferDate', None, None, ), # 5
3736
  )
3737
 
3738
  def __init__(self, merchantTxnId=None, amount=None, xferBy=None, xferTxnId=None, xferDate=None,):
3739
    self.merchantTxnId = merchantTxnId
3740
    self.amount = amount
3741
    self.xferBy = xferBy
3742
    self.xferTxnId = xferTxnId
3743
    self.xferDate = xferDate
3744
 
3745
  def read(self, iprot):
3746
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3747
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3748
      return
3749
    iprot.readStructBegin()
3750
    while True:
3751
      (fname, ftype, fid) = iprot.readFieldBegin()
3752
      if ftype == TType.STOP:
3753
        break
3754
      if fid == 1:
3755
        if ftype == TType.I64:
3756
          self.merchantTxnId = iprot.readI64();
3757
        else:
3758
          iprot.skip(ftype)
3759
      elif fid == 2:
3760
        if ftype == TType.DOUBLE:
3761
          self.amount = iprot.readDouble();
3762
        else:
3763
          iprot.skip(ftype)
3764
      elif fid == 3:
3765
        if ftype == TType.STRING:
3766
          self.xferBy = iprot.readString();
3767
        else:
3768
          iprot.skip(ftype)
3769
      elif fid == 4:
3770
        if ftype == TType.STRING:
3771
          self.xferTxnId = iprot.readString();
3772
        else:
3773
          iprot.skip(ftype)
3774
      elif fid == 5:
3775
        if ftype == TType.I64:
3776
          self.xferDate = iprot.readI64();
3777
        else:
3778
          iprot.skip(ftype)
3779
      else:
3780
        iprot.skip(ftype)
3781
      iprot.readFieldEnd()
3782
    iprot.readStructEnd()
3783
 
3784
  def write(self, oprot):
3785
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3786
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3787
      return
3788
    oprot.writeStructBegin('partiallyCapturePayment_args')
3789
    if self.merchantTxnId is not None:
3790
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)
3791
      oprot.writeI64(self.merchantTxnId)
3792
      oprot.writeFieldEnd()
3793
    if self.amount is not None:
3794
      oprot.writeFieldBegin('amount', TType.DOUBLE, 2)
3795
      oprot.writeDouble(self.amount)
3796
      oprot.writeFieldEnd()
3797
    if self.xferBy is not None:
3798
      oprot.writeFieldBegin('xferBy', TType.STRING, 3)
3799
      oprot.writeString(self.xferBy)
3800
      oprot.writeFieldEnd()
3801
    if self.xferTxnId is not None:
3802
      oprot.writeFieldBegin('xferTxnId', TType.STRING, 4)
3803
      oprot.writeString(self.xferTxnId)
3804
      oprot.writeFieldEnd()
3805
    if self.xferDate is not None:
3806
      oprot.writeFieldBegin('xferDate', TType.I64, 5)
3807
      oprot.writeI64(self.xferDate)
3808
      oprot.writeFieldEnd()
3809
    oprot.writeFieldStop()
3810
    oprot.writeStructEnd()
3811
 
3812
  def validate(self):
3813
    return
3814
 
3815
 
3816
  def __repr__(self):
3817
    L = ['%s=%r' % (key, value)
3818
      for key, value in self.__dict__.iteritems()]
3819
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3820
 
3821
  def __eq__(self, other):
3822
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3823
 
3824
  def __ne__(self, other):
3825
    return not (self == other)
3826
 
3827
class partiallyCapturePayment_result:
3828
  """
3829
  Attributes:
3830
   - success
3831
   - pe
3832
  """
3833
 
3834
  thrift_spec = (
3835
    (0, TType.BOOL, 'success', None, None, ), # 0
3836
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
3837
  )
3838
 
3839
  def __init__(self, success=None, pe=None,):
3840
    self.success = success
3841
    self.pe = pe
3842
 
3843
  def read(self, iprot):
3844
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3845
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3846
      return
3847
    iprot.readStructBegin()
3848
    while True:
3849
      (fname, ftype, fid) = iprot.readFieldBegin()
3850
      if ftype == TType.STOP:
3851
        break
3852
      if fid == 0:
3853
        if ftype == TType.BOOL:
3854
          self.success = iprot.readBool();
3855
        else:
3856
          iprot.skip(ftype)
3857
      elif fid == 1:
3858
        if ftype == TType.STRUCT:
3859
          self.pe = PaymentException()
3860
          self.pe.read(iprot)
3861
        else:
3862
          iprot.skip(ftype)
3863
      else:
3864
        iprot.skip(ftype)
3865
      iprot.readFieldEnd()
3866
    iprot.readStructEnd()
3867
 
3868
  def write(self, oprot):
3869
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3870
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3871
      return
3872
    oprot.writeStructBegin('partiallyCapturePayment_result')
3873
    if self.success is not None:
3874
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3875
      oprot.writeBool(self.success)
3876
      oprot.writeFieldEnd()
3877
    if self.pe is not None:
3878
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
3879
      self.pe.write(oprot)
3880
      oprot.writeFieldEnd()
3881
    oprot.writeFieldStop()
3882
    oprot.writeStructEnd()
3883
 
3884
  def validate(self):
3885
    return
3886
 
3887
 
3888
  def __repr__(self):
3889
    L = ['%s=%r' % (key, value)
3890
      for key, value in self.__dict__.iteritems()]
3891
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3892
 
3893
  def __eq__(self, other):
3894
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3895
 
3896
  def __ne__(self, other):
3897
    return not (self == other)
4008 mandeep.dh 3898
 
3899
class getPaymentsRequiringExtraProcessing_args:
3900
  """
3901
  Attributes:
3902
   - category
3903
  """
3904
 
3905
  thrift_spec = (
3906
    None, # 0
3907
    (1, TType.I32, 'category', None, None, ), # 1
3908
  )
3909
 
3910
  def __init__(self, category=None,):
3911
    self.category = category
3912
 
3913
  def read(self, iprot):
3914
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3915
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3916
      return
3917
    iprot.readStructBegin()
3918
    while True:
3919
      (fname, ftype, fid) = iprot.readFieldBegin()
3920
      if ftype == TType.STOP:
3921
        break
3922
      if fid == 1:
3923
        if ftype == TType.I32:
3924
          self.category = iprot.readI32();
3925
        else:
3926
          iprot.skip(ftype)
3927
      else:
3928
        iprot.skip(ftype)
3929
      iprot.readFieldEnd()
3930
    iprot.readStructEnd()
3931
 
3932
  def write(self, oprot):
3933
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3934
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3935
      return
3936
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_args')
3937
    if self.category is not None:
3938
      oprot.writeFieldBegin('category', TType.I32, 1)
3939
      oprot.writeI32(self.category)
3940
      oprot.writeFieldEnd()
3941
    oprot.writeFieldStop()
3942
    oprot.writeStructEnd()
3943
 
3944
  def validate(self):
3945
    return
3946
 
3947
 
3948
  def __repr__(self):
3949
    L = ['%s=%r' % (key, value)
3950
      for key, value in self.__dict__.iteritems()]
3951
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3952
 
3953
  def __eq__(self, other):
3954
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3955
 
3956
  def __ne__(self, other):
3957
    return not (self == other)
3958
 
3959
class getPaymentsRequiringExtraProcessing_result:
3960
  """
3961
  Attributes:
3962
   - success
3963
  """
3964
 
3965
  thrift_spec = (
3966
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
3967
  )
3968
 
3969
  def __init__(self, success=None,):
3970
    self.success = success
3971
 
3972
  def read(self, iprot):
3973
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3974
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3975
      return
3976
    iprot.readStructBegin()
3977
    while True:
3978
      (fname, ftype, fid) = iprot.readFieldBegin()
3979
      if ftype == TType.STOP:
3980
        break
3981
      if fid == 0:
3982
        if ftype == TType.LIST:
3983
          self.success = []
4600 varun.gupt 3984
          (_etype73, _size70) = iprot.readListBegin()
3985
          for _i74 in xrange(_size70):
3986
            _elem75 = iprot.readI64();
3987
            self.success.append(_elem75)
4008 mandeep.dh 3988
          iprot.readListEnd()
3989
        else:
3990
          iprot.skip(ftype)
3991
      else:
3992
        iprot.skip(ftype)
3993
      iprot.readFieldEnd()
3994
    iprot.readStructEnd()
3995
 
3996
  def write(self, oprot):
3997
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3998
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3999
      return
4000
    oprot.writeStructBegin('getPaymentsRequiringExtraProcessing_result')
4001
    if self.success is not None:
4002
      oprot.writeFieldBegin('success', TType.LIST, 0)
4003
      oprot.writeListBegin(TType.I64, len(self.success))
4600 varun.gupt 4004
      for iter76 in self.success:
4005
        oprot.writeI64(iter76)
4008 mandeep.dh 4006
      oprot.writeListEnd()
4007
      oprot.writeFieldEnd()
4008
    oprot.writeFieldStop()
4009
    oprot.writeStructEnd()
4010
 
4011
  def validate(self):
4012
    return
4013
 
4014
 
4015
  def __repr__(self):
4016
    L = ['%s=%r' % (key, value)
4017
      for key, value in self.__dict__.iteritems()]
4018
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4019
 
4020
  def __eq__(self, other):
4021
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4022
 
4023
  def __ne__(self, other):
4024
    return not (self == other)
4025
 
4026
class markPaymentAsProcessed_args:
4027
  """
4028
  Attributes:
4029
   - paymentId
4030
   - category
4031
  """
4032
 
4033
  thrift_spec = (
4034
    None, # 0
4035
    (1, TType.I64, 'paymentId', None, None, ), # 1
4036
    (2, TType.I32, 'category', None, None, ), # 2
4037
  )
4038
 
4039
  def __init__(self, paymentId=None, category=None,):
4040
    self.paymentId = paymentId
4041
    self.category = category
4042
 
4043
  def read(self, iprot):
4044
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4045
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4046
      return
4047
    iprot.readStructBegin()
4048
    while True:
4049
      (fname, ftype, fid) = iprot.readFieldBegin()
4050
      if ftype == TType.STOP:
4051
        break
4052
      if fid == 1:
4053
        if ftype == TType.I64:
4054
          self.paymentId = iprot.readI64();
4055
        else:
4056
          iprot.skip(ftype)
4057
      elif fid == 2:
4058
        if ftype == TType.I32:
4059
          self.category = iprot.readI32();
4060
        else:
4061
          iprot.skip(ftype)
4062
      else:
4063
        iprot.skip(ftype)
4064
      iprot.readFieldEnd()
4065
    iprot.readStructEnd()
4066
 
4067
  def write(self, oprot):
4068
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4069
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4070
      return
4071
    oprot.writeStructBegin('markPaymentAsProcessed_args')
4072
    if self.paymentId is not None:
4073
      oprot.writeFieldBegin('paymentId', TType.I64, 1)
4074
      oprot.writeI64(self.paymentId)
4075
      oprot.writeFieldEnd()
4076
    if self.category is not None:
4077
      oprot.writeFieldBegin('category', TType.I32, 2)
4078
      oprot.writeI32(self.category)
4079
      oprot.writeFieldEnd()
4080
    oprot.writeFieldStop()
4081
    oprot.writeStructEnd()
4082
 
4083
  def validate(self):
4084
    return
4085
 
4086
 
4087
  def __repr__(self):
4088
    L = ['%s=%r' % (key, value)
4089
      for key, value in self.__dict__.iteritems()]
4090
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4091
 
4092
  def __eq__(self, other):
4093
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4094
 
4095
  def __ne__(self, other):
4096
    return not (self == other)
4097
 
4098
class markPaymentAsProcessed_result:
4099
 
4100
  thrift_spec = (
4101
  )
4102
 
4103
  def read(self, iprot):
4104
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4105
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4106
      return
4107
    iprot.readStructBegin()
4108
    while True:
4109
      (fname, ftype, fid) = iprot.readFieldBegin()
4110
      if ftype == TType.STOP:
4111
        break
4112
      else:
4113
        iprot.skip(ftype)
4114
      iprot.readFieldEnd()
4115
    iprot.readStructEnd()
4116
 
4117
  def write(self, oprot):
4118
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4119
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4120
      return
4121
    oprot.writeStructBegin('markPaymentAsProcessed_result')
4122
    oprot.writeFieldStop()
4123
    oprot.writeStructEnd()
4124
 
4125
  def validate(self):
4126
    return
4127
 
4128
 
4129
  def __repr__(self):
4130
    L = ['%s=%r' % (key, value)
4131
      for key, value in self.__dict__.iteritems()]
4132
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4133
 
4134
  def __eq__(self, other):
4135
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4136
 
4137
  def __ne__(self, other):
4138
    return not (self == other)