Subversion Repositories SmartDukaan

Rev

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

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