Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
420 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
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
12
from thrift.protocol import TBinaryProtocol
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
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.
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.
696 rajveer 50
 
1856 chandransh 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
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
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.
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
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
121
 
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
2559 chandransh 130
 
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.
140
 
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.
2685 chandransh 151
 
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.
163
 
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
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()
209
    if result.success != None:
210
      return result.success
211
    if result.pe != None:
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.
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()
252
    if result.success != None:
253
      return result.success
254
    if result.pe != None:
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.
696 rajveer 261
 
1856 chandransh 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()
293
    if result.success != None:
294
      return result.success
295
    if result.pe != None:
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
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()
328
    if result.success != None:
329
      return result.success
330
    if result.pe != None:
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
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()
696 rajveer 363
    if result.success != None:
364
      return result.success
420 ashish 365
    if result.pe != None:
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.
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()
398
    if result.success != None:
399
      return result.success
400
    if result.pe != None:
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
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()
696 rajveer 455
    if result.success != None:
456
      return result.success
420 ashish 457
    if result.pe != None:
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()
486
    if result.success != None:
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
493
 
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()
518
    if result.success != None:
519
      return result.success
520
    if result.pe != None:
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
2559 chandransh 527
 
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()
552
    if result.success != None:
553
      return result.success
554
    if result.pe != None:
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.
562
 
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()
587
    if result.success != None:
588
      return result.success
589
    if result.pe != None:
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.
2685 chandransh 598
 
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()
627
    if result.success != None:
628
      return result.success
629
    if result.pe != None:
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.
637
 
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()
662
    if result.success != None:
663
      return result.success
664
    if result.pe != None:
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')
696 rajveer 945
    if self.userId != None:
946
      oprot.writeFieldBegin('userId', TType.I64, 1)
947
      oprot.writeI64(self.userId)
420 ashish 948
      oprot.writeFieldEnd()
949
    if self.amount != None:
696 rajveer 950
      oprot.writeFieldBegin('amount', TType.DOUBLE, 2)
420 ashish 951
      oprot.writeDouble(self.amount)
952
      oprot.writeFieldEnd()
696 rajveer 953
    if self.gatewayId != None:
954
      oprot.writeFieldBegin('gatewayId', TType.I64, 3)
955
      oprot.writeI64(self.gatewayId)
420 ashish 956
      oprot.writeFieldEnd()
696 rajveer 957
    if self.txnId != None:
958
      oprot.writeFieldBegin('txnId', TType.I64, 4)
959
      oprot.writeI64(self.txnId)
960
      oprot.writeFieldEnd()
420 ashish 961
    oprot.writeFieldStop()
962
    oprot.writeStructEnd()
963
 
964
  def __repr__(self):
965
    L = ['%s=%r' % (key, value)
966
      for key, value in self.__dict__.iteritems()]
967
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
968
 
969
  def __eq__(self, other):
970
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
971
 
972
  def __ne__(self, other):
973
    return not (self == other)
974
 
975
class createPayment_result:
976
  """
977
  Attributes:
978
   - success
979
   - pe
980
  """
981
 
982
  thrift_spec = (
983
    (0, TType.I64, 'success', None, None, ), # 0
984
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
985
  )
986
 
987
  def __init__(self, success=None, pe=None,):
988
    self.success = success
989
    self.pe = pe
990
 
991
  def read(self, iprot):
992
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
993
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
994
      return
995
    iprot.readStructBegin()
996
    while True:
997
      (fname, ftype, fid) = iprot.readFieldBegin()
998
      if ftype == TType.STOP:
999
        break
1000
      if fid == 0:
1001
        if ftype == TType.I64:
1002
          self.success = iprot.readI64();
1003
        else:
1004
          iprot.skip(ftype)
1005
      elif fid == 1:
1006
        if ftype == TType.STRUCT:
1007
          self.pe = PaymentException()
1008
          self.pe.read(iprot)
1009
        else:
1010
          iprot.skip(ftype)
1011
      else:
1012
        iprot.skip(ftype)
1013
      iprot.readFieldEnd()
1014
    iprot.readStructEnd()
1015
 
1016
  def write(self, oprot):
1017
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1018
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1019
      return
1020
    oprot.writeStructBegin('createPayment_result')
1021
    if self.success != None:
1022
      oprot.writeFieldBegin('success', TType.I64, 0)
1023
      oprot.writeI64(self.success)
1024
      oprot.writeFieldEnd()
1025
    if self.pe != None:
1026
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1027
      self.pe.write(oprot)
1028
      oprot.writeFieldEnd()
1029
    oprot.writeFieldStop()
1030
    oprot.writeStructEnd()
1031
 
1032
  def __repr__(self):
1033
    L = ['%s=%r' % (key, value)
1034
      for key, value in self.__dict__.iteritems()]
1035
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1036
 
1037
  def __eq__(self, other):
1038
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1039
 
1040
  def __ne__(self, other):
1041
    return not (self == other)
1042
 
1043
class getPaymentsForUser_args:
1044
  """
1045
  Attributes:
1046
   - userId
696 rajveer 1047
   - fromTime
1048
   - toTime
420 ashish 1049
   - status
696 rajveer 1050
   - gatewayId
420 ashish 1051
  """
1052
 
1053
  thrift_spec = (
1054
    None, # 0
1055
    (1, TType.I64, 'userId', None, None, ), # 1
696 rajveer 1056
    (2, TType.I64, 'fromTime', None, None, ), # 2
1057
    (3, TType.I64, 'toTime', None, None, ), # 3
420 ashish 1058
    (4, TType.I32, 'status', None, None, ), # 4
696 rajveer 1059
    (5, TType.I64, 'gatewayId', None, None, ), # 5
420 ashish 1060
  )
1061
 
696 rajveer 1062
  def __init__(self, userId=None, fromTime=None, toTime=None, status=None, gatewayId=None,):
420 ashish 1063
    self.userId = userId
696 rajveer 1064
    self.fromTime = fromTime
1065
    self.toTime = toTime
420 ashish 1066
    self.status = status
696 rajveer 1067
    self.gatewayId = gatewayId
420 ashish 1068
 
1069
  def read(self, iprot):
1070
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1071
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1072
      return
1073
    iprot.readStructBegin()
1074
    while True:
1075
      (fname, ftype, fid) = iprot.readFieldBegin()
1076
      if ftype == TType.STOP:
1077
        break
1078
      if fid == 1:
1079
        if ftype == TType.I64:
1080
          self.userId = iprot.readI64();
1081
        else:
1082
          iprot.skip(ftype)
1083
      elif fid == 2:
1084
        if ftype == TType.I64:
696 rajveer 1085
          self.fromTime = iprot.readI64();
420 ashish 1086
        else:
1087
          iprot.skip(ftype)
1088
      elif fid == 3:
1089
        if ftype == TType.I64:
696 rajveer 1090
          self.toTime = iprot.readI64();
420 ashish 1091
        else:
1092
          iprot.skip(ftype)
1093
      elif fid == 4:
1094
        if ftype == TType.I32:
1095
          self.status = iprot.readI32();
1096
        else:
1097
          iprot.skip(ftype)
1098
      elif fid == 5:
1099
        if ftype == TType.I64:
696 rajveer 1100
          self.gatewayId = iprot.readI64();
420 ashish 1101
        else:
1102
          iprot.skip(ftype)
1103
      else:
1104
        iprot.skip(ftype)
1105
      iprot.readFieldEnd()
1106
    iprot.readStructEnd()
1107
 
1108
  def write(self, oprot):
1109
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1110
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1111
      return
1112
    oprot.writeStructBegin('getPaymentsForUser_args')
1113
    if self.userId != None:
1114
      oprot.writeFieldBegin('userId', TType.I64, 1)
1115
      oprot.writeI64(self.userId)
1116
      oprot.writeFieldEnd()
696 rajveer 1117
    if self.fromTime != None:
1118
      oprot.writeFieldBegin('fromTime', TType.I64, 2)
1119
      oprot.writeI64(self.fromTime)
420 ashish 1120
      oprot.writeFieldEnd()
696 rajveer 1121
    if self.toTime != None:
1122
      oprot.writeFieldBegin('toTime', TType.I64, 3)
1123
      oprot.writeI64(self.toTime)
420 ashish 1124
      oprot.writeFieldEnd()
1125
    if self.status != None:
1126
      oprot.writeFieldBegin('status', TType.I32, 4)
1127
      oprot.writeI32(self.status)
1128
      oprot.writeFieldEnd()
696 rajveer 1129
    if self.gatewayId != None:
1130
      oprot.writeFieldBegin('gatewayId', TType.I64, 5)
1131
      oprot.writeI64(self.gatewayId)
420 ashish 1132
      oprot.writeFieldEnd()
1133
    oprot.writeFieldStop()
1134
    oprot.writeStructEnd()
1135
 
1136
  def __repr__(self):
1137
    L = ['%s=%r' % (key, value)
1138
      for key, value in self.__dict__.iteritems()]
1139
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1140
 
1141
  def __eq__(self, other):
1142
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1143
 
1144
  def __ne__(self, other):
1145
    return not (self == other)
1146
 
1147
class getPaymentsForUser_result:
1148
  """
1149
  Attributes:
1150
   - success
1151
   - pe
1152
  """
1153
 
1154
  thrift_spec = (
1155
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1156
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1157
  )
1158
 
1159
  def __init__(self, success=None, pe=None,):
1160
    self.success = success
1161
    self.pe = pe
1162
 
1163
  def read(self, iprot):
1164
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1165
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1166
      return
1167
    iprot.readStructBegin()
1168
    while True:
1169
      (fname, ftype, fid) = iprot.readFieldBegin()
1170
      if ftype == TType.STOP:
1171
        break
1172
      if fid == 0:
1173
        if ftype == TType.LIST:
1174
          self.success = []
2747 chandransh 1175
          (_etype24, _size21) = iprot.readListBegin()
1176
          for _i25 in xrange(_size21):
1177
            _elem26 = Payment()
1178
            _elem26.read(iprot)
1179
            self.success.append(_elem26)
420 ashish 1180
          iprot.readListEnd()
1181
        else:
1182
          iprot.skip(ftype)
1183
      elif fid == 1:
1184
        if ftype == TType.STRUCT:
1185
          self.pe = PaymentException()
1186
          self.pe.read(iprot)
1187
        else:
1188
          iprot.skip(ftype)
1189
      else:
1190
        iprot.skip(ftype)
1191
      iprot.readFieldEnd()
1192
    iprot.readStructEnd()
1193
 
1194
  def write(self, oprot):
1195
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1196
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1197
      return
1198
    oprot.writeStructBegin('getPaymentsForUser_result')
1199
    if self.success != None:
1200
      oprot.writeFieldBegin('success', TType.LIST, 0)
1201
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2747 chandransh 1202
      for iter27 in self.success:
1203
        iter27.write(oprot)
420 ashish 1204
      oprot.writeListEnd()
1205
      oprot.writeFieldEnd()
1206
    if self.pe != None:
1207
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1208
      self.pe.write(oprot)
1209
      oprot.writeFieldEnd()
1210
    oprot.writeFieldStop()
1211
    oprot.writeStructEnd()
1212
 
1213
  def __repr__(self):
1214
    L = ['%s=%r' % (key, value)
1215
      for key, value in self.__dict__.iteritems()]
1216
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1217
 
1218
  def __eq__(self, other):
1219
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1220
 
1221
  def __ne__(self, other):
1222
    return not (self == other)
1223
 
1224
class getPayments_args:
1225
  """
1226
  Attributes:
696 rajveer 1227
   - fromTime
1228
   - toTime
420 ashish 1229
   - status
696 rajveer 1230
   - gatewayId
420 ashish 1231
  """
1232
 
1233
  thrift_spec = (
1234
    None, # 0
696 rajveer 1235
    (1, TType.I64, 'fromTime', None, None, ), # 1
1236
    (2, TType.I64, 'toTime', None, None, ), # 2
420 ashish 1237
    (3, TType.I32, 'status', None, None, ), # 3
696 rajveer 1238
    (4, TType.I64, 'gatewayId', None, None, ), # 4
420 ashish 1239
  )
1240
 
696 rajveer 1241
  def __init__(self, fromTime=None, toTime=None, status=None, gatewayId=None,):
1242
    self.fromTime = fromTime
1243
    self.toTime = toTime
420 ashish 1244
    self.status = status
696 rajveer 1245
    self.gatewayId = gatewayId
420 ashish 1246
 
1247
  def read(self, iprot):
1248
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1249
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1250
      return
1251
    iprot.readStructBegin()
1252
    while True:
1253
      (fname, ftype, fid) = iprot.readFieldBegin()
1254
      if ftype == TType.STOP:
1255
        break
1256
      if fid == 1:
1257
        if ftype == TType.I64:
696 rajveer 1258
          self.fromTime = iprot.readI64();
420 ashish 1259
        else:
1260
          iprot.skip(ftype)
1261
      elif fid == 2:
1262
        if ftype == TType.I64:
696 rajveer 1263
          self.toTime = iprot.readI64();
420 ashish 1264
        else:
1265
          iprot.skip(ftype)
1266
      elif fid == 3:
1267
        if ftype == TType.I32:
1268
          self.status = iprot.readI32();
1269
        else:
1270
          iprot.skip(ftype)
1271
      elif fid == 4:
1272
        if ftype == TType.I64:
696 rajveer 1273
          self.gatewayId = iprot.readI64();
420 ashish 1274
        else:
1275
          iprot.skip(ftype)
1276
      else:
1277
        iprot.skip(ftype)
1278
      iprot.readFieldEnd()
1279
    iprot.readStructEnd()
1280
 
1281
  def write(self, oprot):
1282
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1283
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1284
      return
1285
    oprot.writeStructBegin('getPayments_args')
696 rajveer 1286
    if self.fromTime != None:
1287
      oprot.writeFieldBegin('fromTime', TType.I64, 1)
1288
      oprot.writeI64(self.fromTime)
420 ashish 1289
      oprot.writeFieldEnd()
696 rajveer 1290
    if self.toTime != None:
1291
      oprot.writeFieldBegin('toTime', TType.I64, 2)
1292
      oprot.writeI64(self.toTime)
420 ashish 1293
      oprot.writeFieldEnd()
1294
    if self.status != None:
1295
      oprot.writeFieldBegin('status', TType.I32, 3)
1296
      oprot.writeI32(self.status)
1297
      oprot.writeFieldEnd()
696 rajveer 1298
    if self.gatewayId != None:
1299
      oprot.writeFieldBegin('gatewayId', TType.I64, 4)
1300
      oprot.writeI64(self.gatewayId)
420 ashish 1301
      oprot.writeFieldEnd()
1302
    oprot.writeFieldStop()
1303
    oprot.writeStructEnd()
1304
 
1305
  def __repr__(self):
1306
    L = ['%s=%r' % (key, value)
1307
      for key, value in self.__dict__.iteritems()]
1308
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1309
 
1310
  def __eq__(self, other):
1311
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1312
 
1313
  def __ne__(self, other):
1314
    return not (self == other)
1315
 
1316
class getPayments_result:
1317
  """
1318
  Attributes:
1319
   - success
1320
   - pe
1321
  """
1322
 
1323
  thrift_spec = (
1324
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
1325
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1326
  )
1327
 
1328
  def __init__(self, success=None, pe=None,):
1329
    self.success = success
1330
    self.pe = pe
1331
 
1332
  def read(self, iprot):
1333
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1334
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1335
      return
1336
    iprot.readStructBegin()
1337
    while True:
1338
      (fname, ftype, fid) = iprot.readFieldBegin()
1339
      if ftype == TType.STOP:
1340
        break
1341
      if fid == 0:
1342
        if ftype == TType.LIST:
1343
          self.success = []
2747 chandransh 1344
          (_etype31, _size28) = iprot.readListBegin()
1345
          for _i32 in xrange(_size28):
1346
            _elem33 = Payment()
1347
            _elem33.read(iprot)
1348
            self.success.append(_elem33)
420 ashish 1349
          iprot.readListEnd()
1350
        else:
1351
          iprot.skip(ftype)
1352
      elif fid == 1:
1353
        if ftype == TType.STRUCT:
1354
          self.pe = PaymentException()
1355
          self.pe.read(iprot)
1356
        else:
1357
          iprot.skip(ftype)
1358
      else:
1359
        iprot.skip(ftype)
1360
      iprot.readFieldEnd()
1361
    iprot.readStructEnd()
1362
 
1363
  def write(self, oprot):
1364
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1365
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1366
      return
1367
    oprot.writeStructBegin('getPayments_result')
1368
    if self.success != None:
1369
      oprot.writeFieldBegin('success', TType.LIST, 0)
1370
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2747 chandransh 1371
      for iter34 in self.success:
1372
        iter34.write(oprot)
420 ashish 1373
      oprot.writeListEnd()
1374
      oprot.writeFieldEnd()
1375
    if self.pe != None:
1376
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1377
      self.pe.write(oprot)
1378
      oprot.writeFieldEnd()
1379
    oprot.writeFieldStop()
1380
    oprot.writeStructEnd()
1381
 
1382
  def __repr__(self):
1383
    L = ['%s=%r' % (key, value)
1384
      for key, value in self.__dict__.iteritems()]
1385
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1386
 
1387
  def __eq__(self, other):
1388
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1389
 
1390
  def __ne__(self, other):
1391
    return not (self == other)
1392
 
696 rajveer 1393
class getPaymentGateway_args:
420 ashish 1394
  """
1395
  Attributes:
1396
   - id
1397
  """
1398
 
1399
  thrift_spec = (
1400
    None, # 0
1401
    (1, TType.I64, 'id', None, None, ), # 1
1402
  )
1403
 
696 rajveer 1404
  def __init__(self, id=None,):
420 ashish 1405
    self.id = id
1406
 
1407
  def read(self, iprot):
1408
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1409
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1410
      return
1411
    iprot.readStructBegin()
1412
    while True:
1413
      (fname, ftype, fid) = iprot.readFieldBegin()
1414
      if ftype == TType.STOP:
1415
        break
1416
      if fid == 1:
1417
        if ftype == TType.I64:
1418
          self.id = iprot.readI64();
1419
        else:
1420
          iprot.skip(ftype)
1421
      else:
1422
        iprot.skip(ftype)
1423
      iprot.readFieldEnd()
1424
    iprot.readStructEnd()
1425
 
1426
  def write(self, oprot):
1427
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1428
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1429
      return
696 rajveer 1430
    oprot.writeStructBegin('getPaymentGateway_args')
420 ashish 1431
    if self.id != None:
1432
      oprot.writeFieldBegin('id', TType.I64, 1)
1433
      oprot.writeI64(self.id)
1434
      oprot.writeFieldEnd()
1435
    oprot.writeFieldStop()
1436
    oprot.writeStructEnd()
1437
 
1438
  def __repr__(self):
1439
    L = ['%s=%r' % (key, value)
1440
      for key, value in self.__dict__.iteritems()]
1441
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1442
 
1443
  def __eq__(self, other):
1444
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1445
 
1446
  def __ne__(self, other):
1447
    return not (self == other)
1448
 
696 rajveer 1449
class getPaymentGateway_result:
420 ashish 1450
  """
1451
  Attributes:
1452
   - success
1453
   - pe
1454
  """
1455
 
1456
  thrift_spec = (
696 rajveer 1457
    (0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0
420 ashish 1458
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1459
  )
1460
 
1461
  def __init__(self, success=None, pe=None,):
1462
    self.success = success
1463
    self.pe = pe
1464
 
1465
  def read(self, iprot):
1466
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1467
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1468
      return
1469
    iprot.readStructBegin()
1470
    while True:
1471
      (fname, ftype, fid) = iprot.readFieldBegin()
1472
      if ftype == TType.STOP:
1473
        break
1474
      if fid == 0:
696 rajveer 1475
        if ftype == TType.STRUCT:
1476
          self.success = PaymentGateway()
1477
          self.success.read(iprot)
420 ashish 1478
        else:
1479
          iprot.skip(ftype)
1480
      elif fid == 1:
1481
        if ftype == TType.STRUCT:
1482
          self.pe = PaymentException()
1483
          self.pe.read(iprot)
1484
        else:
1485
          iprot.skip(ftype)
1486
      else:
1487
        iprot.skip(ftype)
1488
      iprot.readFieldEnd()
1489
    iprot.readStructEnd()
1490
 
1491
  def write(self, oprot):
1492
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1493
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1494
      return
696 rajveer 1495
    oprot.writeStructBegin('getPaymentGateway_result')
420 ashish 1496
    if self.success != None:
696 rajveer 1497
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1498
      self.success.write(oprot)
420 ashish 1499
      oprot.writeFieldEnd()
1500
    if self.pe != None:
1501
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1502
      self.pe.write(oprot)
1503
      oprot.writeFieldEnd()
1504
    oprot.writeFieldStop()
1505
    oprot.writeStructEnd()
1506
 
1507
  def __repr__(self):
1508
    L = ['%s=%r' % (key, value)
1509
      for key, value in self.__dict__.iteritems()]
1510
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1511
 
1512
  def __eq__(self, other):
1513
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1514
 
1515
  def __ne__(self, other):
1516
    return not (self == other)
1517
 
696 rajveer 1518
class getPayment_args:
420 ashish 1519
  """
1520
  Attributes:
1521
   - id
1522
  """
1523
 
1524
  thrift_spec = (
1525
    None, # 0
1526
    (1, TType.I64, 'id', None, None, ), # 1
1527
  )
1528
 
1529
  def __init__(self, id=None,):
1530
    self.id = id
1531
 
1532
  def read(self, iprot):
1533
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1534
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1535
      return
1536
    iprot.readStructBegin()
1537
    while True:
1538
      (fname, ftype, fid) = iprot.readFieldBegin()
1539
      if ftype == TType.STOP:
1540
        break
1541
      if fid == 1:
1542
        if ftype == TType.I64:
1543
          self.id = iprot.readI64();
1544
        else:
1545
          iprot.skip(ftype)
1546
      else:
1547
        iprot.skip(ftype)
1548
      iprot.readFieldEnd()
1549
    iprot.readStructEnd()
1550
 
1551
  def write(self, oprot):
1552
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1553
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1554
      return
696 rajveer 1555
    oprot.writeStructBegin('getPayment_args')
420 ashish 1556
    if self.id != None:
1557
      oprot.writeFieldBegin('id', TType.I64, 1)
1558
      oprot.writeI64(self.id)
1559
      oprot.writeFieldEnd()
1560
    oprot.writeFieldStop()
1561
    oprot.writeStructEnd()
1562
 
1563
  def __repr__(self):
1564
    L = ['%s=%r' % (key, value)
1565
      for key, value in self.__dict__.iteritems()]
1566
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1567
 
1568
  def __eq__(self, other):
1569
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1570
 
1571
  def __ne__(self, other):
1572
    return not (self == other)
1573
 
696 rajveer 1574
class getPayment_result:
420 ashish 1575
  """
1576
  Attributes:
1577
   - success
1578
   - pe
1579
  """
1580
 
1581
  thrift_spec = (
696 rajveer 1582
    (0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0
420 ashish 1583
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1584
  )
1585
 
1586
  def __init__(self, success=None, pe=None,):
1587
    self.success = success
1588
    self.pe = pe
1589
 
1590
  def read(self, iprot):
1591
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1592
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1593
      return
1594
    iprot.readStructBegin()
1595
    while True:
1596
      (fname, ftype, fid) = iprot.readFieldBegin()
1597
      if ftype == TType.STOP:
1598
        break
1599
      if fid == 0:
1600
        if ftype == TType.STRUCT:
696 rajveer 1601
          self.success = Payment()
420 ashish 1602
          self.success.read(iprot)
1603
        else:
1604
          iprot.skip(ftype)
1605
      elif fid == 1:
1606
        if ftype == TType.STRUCT:
1607
          self.pe = PaymentException()
1608
          self.pe.read(iprot)
1609
        else:
1610
          iprot.skip(ftype)
1611
      else:
1612
        iprot.skip(ftype)
1613
      iprot.readFieldEnd()
1614
    iprot.readStructEnd()
1615
 
1616
  def write(self, oprot):
1617
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1618
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1619
      return
696 rajveer 1620
    oprot.writeStructBegin('getPayment_result')
420 ashish 1621
    if self.success != None:
1622
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1623
      self.success.write(oprot)
1624
      oprot.writeFieldEnd()
1625
    if self.pe != None:
1626
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1627
      self.pe.write(oprot)
1628
      oprot.writeFieldEnd()
1629
    oprot.writeFieldStop()
1630
    oprot.writeStructEnd()
1631
 
1632
  def __repr__(self):
1633
    L = ['%s=%r' % (key, value)
1634
      for key, value in self.__dict__.iteritems()]
1635
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1636
 
1637
  def __eq__(self, other):
1638
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1639
 
1640
  def __ne__(self, other):
1641
    return not (self == other)
1642
 
696 rajveer 1643
class getPaymentForTxnId_args:
420 ashish 1644
  """
1645
  Attributes:
696 rajveer 1646
   - txnId
420 ashish 1647
  """
1648
 
1649
  thrift_spec = (
1650
    None, # 0
696 rajveer 1651
    (1, TType.I64, 'txnId', None, None, ), # 1
420 ashish 1652
  )
1653
 
696 rajveer 1654
  def __init__(self, txnId=None,):
1655
    self.txnId = txnId
420 ashish 1656
 
1657
  def read(self, iprot):
1658
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1659
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1660
      return
1661
    iprot.readStructBegin()
1662
    while True:
1663
      (fname, ftype, fid) = iprot.readFieldBegin()
1664
      if ftype == TType.STOP:
1665
        break
1666
      if fid == 1:
1667
        if ftype == TType.I64:
696 rajveer 1668
          self.txnId = iprot.readI64();
420 ashish 1669
        else:
1670
          iprot.skip(ftype)
1671
      else:
1672
        iprot.skip(ftype)
1673
      iprot.readFieldEnd()
1674
    iprot.readStructEnd()
1675
 
1676
  def write(self, oprot):
1677
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1678
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1679
      return
696 rajveer 1680
    oprot.writeStructBegin('getPaymentForTxnId_args')
1681
    if self.txnId != None:
1682
      oprot.writeFieldBegin('txnId', TType.I64, 1)
1683
      oprot.writeI64(self.txnId)
420 ashish 1684
      oprot.writeFieldEnd()
1685
    oprot.writeFieldStop()
1686
    oprot.writeStructEnd()
1687
 
1688
  def __repr__(self):
1689
    L = ['%s=%r' % (key, value)
1690
      for key, value in self.__dict__.iteritems()]
1691
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1692
 
1693
  def __eq__(self, other):
1694
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1695
 
1696
  def __ne__(self, other):
1697
    return not (self == other)
1698
 
696 rajveer 1699
class getPaymentForTxnId_result:
420 ashish 1700
  """
1701
  Attributes:
1702
   - success
1703
   - pe
1704
  """
1705
 
1706
  thrift_spec = (
696 rajveer 1707
    (0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0
420 ashish 1708
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1709
  )
1710
 
1711
  def __init__(self, success=None, pe=None,):
1712
    self.success = success
1713
    self.pe = pe
1714
 
1715
  def read(self, iprot):
1716
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1717
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1718
      return
1719
    iprot.readStructBegin()
1720
    while True:
1721
      (fname, ftype, fid) = iprot.readFieldBegin()
1722
      if ftype == TType.STOP:
1723
        break
1724
      if fid == 0:
696 rajveer 1725
        if ftype == TType.LIST:
1726
          self.success = []
2747 chandransh 1727
          (_etype38, _size35) = iprot.readListBegin()
1728
          for _i39 in xrange(_size35):
1729
            _elem40 = Payment()
1730
            _elem40.read(iprot)
1731
            self.success.append(_elem40)
696 rajveer 1732
          iprot.readListEnd()
420 ashish 1733
        else:
1734
          iprot.skip(ftype)
1735
      elif fid == 1:
1736
        if ftype == TType.STRUCT:
1737
          self.pe = PaymentException()
1738
          self.pe.read(iprot)
1739
        else:
1740
          iprot.skip(ftype)
1741
      else:
1742
        iprot.skip(ftype)
1743
      iprot.readFieldEnd()
1744
    iprot.readStructEnd()
1745
 
1746
  def write(self, oprot):
1747
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1748
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1749
      return
696 rajveer 1750
    oprot.writeStructBegin('getPaymentForTxnId_result')
420 ashish 1751
    if self.success != None:
696 rajveer 1752
      oprot.writeFieldBegin('success', TType.LIST, 0)
1753
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2747 chandransh 1754
      for iter41 in self.success:
1755
        iter41.write(oprot)
696 rajveer 1756
      oprot.writeListEnd()
420 ashish 1757
      oprot.writeFieldEnd()
1758
    if self.pe != None:
1759
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
1760
      self.pe.write(oprot)
1761
      oprot.writeFieldEnd()
1762
    oprot.writeFieldStop()
1763
    oprot.writeStructEnd()
1764
 
1765
  def __repr__(self):
1766
    L = ['%s=%r' % (key, value)
1767
      for key, value in self.__dict__.iteritems()]
1768
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1769
 
1770
  def __eq__(self, other):
1771
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1772
 
1773
  def __ne__(self, other):
1774
    return not (self == other)
1775
 
696 rajveer 1776
class updatePaymentDetails_args:
420 ashish 1777
  """
1778
  Attributes:
1779
   - id
696 rajveer 1780
   - gatewayPaymentId
1781
   - sessionId
1782
   - gatewayTxnStatus
1783
   - description
1784
   - gatewayTxnId
1785
   - authCode
1786
   - referenceCode
1787
   - errorCode
1788
   - status
1120 rajveer 1789
   - gatewayTxnDate
696 rajveer 1790
   - attributes
420 ashish 1791
  """
1792
 
1793
  thrift_spec = (
1794
    None, # 0
1795
    (1, TType.I64, 'id', None, None, ), # 1
696 rajveer 1796
    (2, TType.STRING, 'gatewayPaymentId', None, None, ), # 2
1797
    (3, TType.STRING, 'sessionId', None, None, ), # 3
1798
    (4, TType.STRING, 'gatewayTxnStatus', None, None, ), # 4
1799
    (5, TType.STRING, 'description', None, None, ), # 5
1800
    (6, TType.STRING, 'gatewayTxnId', None, None, ), # 6
1801
    (7, TType.STRING, 'authCode', None, None, ), # 7
1802
    (8, TType.STRING, 'referenceCode', None, None, ), # 8
1803
    (9, TType.STRING, 'errorCode', None, None, ), # 9
1804
    (10, TType.I32, 'status', None, None, ), # 10
1120 rajveer 1805
    (11, TType.STRING, 'gatewayTxnDate', None, None, ), # 11
1806
    (12, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 12
420 ashish 1807
  )
1808
 
1120 rajveer 1809
  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 1810
    self.id = id
696 rajveer 1811
    self.gatewayPaymentId = gatewayPaymentId
1812
    self.sessionId = sessionId
1813
    self.gatewayTxnStatus = gatewayTxnStatus
1814
    self.description = description
1815
    self.gatewayTxnId = gatewayTxnId
1816
    self.authCode = authCode
1817
    self.referenceCode = referenceCode
1818
    self.errorCode = errorCode
1819
    self.status = status
1120 rajveer 1820
    self.gatewayTxnDate = gatewayTxnDate
696 rajveer 1821
    self.attributes = attributes
420 ashish 1822
 
1823
  def read(self, iprot):
1824
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1825
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1826
      return
1827
    iprot.readStructBegin()
1828
    while True:
1829
      (fname, ftype, fid) = iprot.readFieldBegin()
1830
      if ftype == TType.STOP:
1831
        break
1832
      if fid == 1:
1833
        if ftype == TType.I64:
1834
          self.id = iprot.readI64();
1835
        else:
1836
          iprot.skip(ftype)
1837
      elif fid == 2:
1838
        if ftype == TType.STRING:
696 rajveer 1839
          self.gatewayPaymentId = iprot.readString();
420 ashish 1840
        else:
1841
          iprot.skip(ftype)
1842
      elif fid == 3:
1843
        if ftype == TType.STRING:
696 rajveer 1844
          self.sessionId = iprot.readString();
420 ashish 1845
        else:
1846
          iprot.skip(ftype)
1847
      elif fid == 4:
1848
        if ftype == TType.STRING:
696 rajveer 1849
          self.gatewayTxnStatus = iprot.readString();
420 ashish 1850
        else:
1851
          iprot.skip(ftype)
1852
      elif fid == 5:
1853
        if ftype == TType.STRING:
696 rajveer 1854
          self.description = iprot.readString();
420 ashish 1855
        else:
1856
          iprot.skip(ftype)
1857
      elif fid == 6:
1858
        if ftype == TType.STRING:
696 rajveer 1859
          self.gatewayTxnId = iprot.readString();
420 ashish 1860
        else:
1861
          iprot.skip(ftype)
1862
      elif fid == 7:
1863
        if ftype == TType.STRING:
696 rajveer 1864
          self.authCode = iprot.readString();
420 ashish 1865
        else:
1866
          iprot.skip(ftype)
1867
      elif fid == 8:
1868
        if ftype == TType.STRING:
696 rajveer 1869
          self.referenceCode = iprot.readString();
420 ashish 1870
        else:
1871
          iprot.skip(ftype)
696 rajveer 1872
      elif fid == 9:
1873
        if ftype == TType.STRING:
1874
          self.errorCode = iprot.readString();
1875
        else:
1876
          iprot.skip(ftype)
1877
      elif fid == 10:
1878
        if ftype == TType.I32:
1879
          self.status = iprot.readI32();
1880
        else:
1881
          iprot.skip(ftype)
1882
      elif fid == 11:
1120 rajveer 1883
        if ftype == TType.STRING:
1884
          self.gatewayTxnDate = iprot.readString();
1885
        else:
1886
          iprot.skip(ftype)
1887
      elif fid == 12:
696 rajveer 1888
        if ftype == TType.LIST:
1889
          self.attributes = []
2747 chandransh 1890
          (_etype45, _size42) = iprot.readListBegin()
1891
          for _i46 in xrange(_size42):
1892
            _elem47 = Attribute()
1893
            _elem47.read(iprot)
1894
            self.attributes.append(_elem47)
696 rajveer 1895
          iprot.readListEnd()
1896
        else:
1897
          iprot.skip(ftype)
420 ashish 1898
      else:
1899
        iprot.skip(ftype)
1900
      iprot.readFieldEnd()
1901
    iprot.readStructEnd()
1902
 
1903
  def write(self, oprot):
1904
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1905
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1906
      return
696 rajveer 1907
    oprot.writeStructBegin('updatePaymentDetails_args')
420 ashish 1908
    if self.id != None:
1909
      oprot.writeFieldBegin('id', TType.I64, 1)
1910
      oprot.writeI64(self.id)
1911
      oprot.writeFieldEnd()
696 rajveer 1912
    if self.gatewayPaymentId != None:
1913
      oprot.writeFieldBegin('gatewayPaymentId', TType.STRING, 2)
1914
      oprot.writeString(self.gatewayPaymentId)
420 ashish 1915
      oprot.writeFieldEnd()
696 rajveer 1916
    if self.sessionId != None:
1917
      oprot.writeFieldBegin('sessionId', TType.STRING, 3)
1918
      oprot.writeString(self.sessionId)
420 ashish 1919
      oprot.writeFieldEnd()
696 rajveer 1920
    if self.gatewayTxnStatus != None:
1921
      oprot.writeFieldBegin('gatewayTxnStatus', TType.STRING, 4)
1922
      oprot.writeString(self.gatewayTxnStatus)
420 ashish 1923
      oprot.writeFieldEnd()
696 rajveer 1924
    if self.description != None:
1925
      oprot.writeFieldBegin('description', TType.STRING, 5)
1926
      oprot.writeString(self.description)
420 ashish 1927
      oprot.writeFieldEnd()
696 rajveer 1928
    if self.gatewayTxnId != None:
1929
      oprot.writeFieldBegin('gatewayTxnId', TType.STRING, 6)
1930
      oprot.writeString(self.gatewayTxnId)
420 ashish 1931
      oprot.writeFieldEnd()
696 rajveer 1932
    if self.authCode != None:
1933
      oprot.writeFieldBegin('authCode', TType.STRING, 7)
1934
      oprot.writeString(self.authCode)
420 ashish 1935
      oprot.writeFieldEnd()
696 rajveer 1936
    if self.referenceCode != None:
1937
      oprot.writeFieldBegin('referenceCode', TType.STRING, 8)
1938
      oprot.writeString(self.referenceCode)
420 ashish 1939
      oprot.writeFieldEnd()
696 rajveer 1940
    if self.errorCode != None:
1941
      oprot.writeFieldBegin('errorCode', TType.STRING, 9)
1942
      oprot.writeString(self.errorCode)
1943
      oprot.writeFieldEnd()
1944
    if self.status != None:
1945
      oprot.writeFieldBegin('status', TType.I32, 10)
1946
      oprot.writeI32(self.status)
1947
      oprot.writeFieldEnd()
1120 rajveer 1948
    if self.gatewayTxnDate != None:
1949
      oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)
1950
      oprot.writeString(self.gatewayTxnDate)
1951
      oprot.writeFieldEnd()
696 rajveer 1952
    if self.attributes != None:
1120 rajveer 1953
      oprot.writeFieldBegin('attributes', TType.LIST, 12)
696 rajveer 1954
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
2747 chandransh 1955
      for iter48 in self.attributes:
1956
        iter48.write(oprot)
696 rajveer 1957
      oprot.writeListEnd()
1958
      oprot.writeFieldEnd()
420 ashish 1959
    oprot.writeFieldStop()
1960
    oprot.writeStructEnd()
1961
 
1962
  def __repr__(self):
1963
    L = ['%s=%r' % (key, value)
1964
      for key, value in self.__dict__.iteritems()]
1965
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1966
 
1967
  def __eq__(self, other):
1968
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1969
 
1970
  def __ne__(self, other):
1971
    return not (self == other)
1972
 
696 rajveer 1973
class updatePaymentDetails_result:
420 ashish 1974
  """
1975
  Attributes:
696 rajveer 1976
   - success
420 ashish 1977
   - pe
1978
  """
1979
 
1980
  thrift_spec = (
696 rajveer 1981
    (0, TType.BOOL, 'success', None, None, ), # 0
420 ashish 1982
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
1983
  )
1984
 
696 rajveer 1985
  def __init__(self, success=None, pe=None,):
1986
    self.success = success
420 ashish 1987
    self.pe = pe
1988
 
1989
  def read(self, iprot):
1990
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1991
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1992
      return
1993
    iprot.readStructBegin()
1994
    while True:
1995
      (fname, ftype, fid) = iprot.readFieldBegin()
1996
      if ftype == TType.STOP:
1997
        break
696 rajveer 1998
      if fid == 0:
1999
        if ftype == TType.BOOL:
2000
          self.success = iprot.readBool();
2001
        else:
2002
          iprot.skip(ftype)
2003
      elif fid == 1:
420 ashish 2004
        if ftype == TType.STRUCT:
2005
          self.pe = PaymentException()
2006
          self.pe.read(iprot)
2007
        else:
2008
          iprot.skip(ftype)
2009
      else:
2010
        iprot.skip(ftype)
2011
      iprot.readFieldEnd()
2012
    iprot.readStructEnd()
2013
 
2014
  def write(self, oprot):
2015
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2016
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2017
      return
696 rajveer 2018
    oprot.writeStructBegin('updatePaymentDetails_result')
2019
    if self.success != None:
2020
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2021
      oprot.writeBool(self.success)
2022
      oprot.writeFieldEnd()
420 ashish 2023
    if self.pe != None:
2024
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2025
      self.pe.write(oprot)
2026
      oprot.writeFieldEnd()
2027
    oprot.writeFieldStop()
2028
    oprot.writeStructEnd()
2029
 
2030
  def __repr__(self):
2031
    L = ['%s=%r' % (key, value)
2032
      for key, value in self.__dict__.iteritems()]
2033
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2034
 
2035
  def __eq__(self, other):
2036
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2037
 
2038
  def __ne__(self, other):
2039
    return not (self == other)
2040
 
1731 ankur.sing 2041
class getSuccessfulPaymentsAmountRange_args:
420 ashish 2042
 
1627 ankur.sing 2043
  thrift_spec = (
2044
  )
2045
 
2046
  def read(self, iprot):
2047
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2048
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2049
      return
2050
    iprot.readStructBegin()
2051
    while True:
2052
      (fname, ftype, fid) = iprot.readFieldBegin()
2053
      if ftype == TType.STOP:
2054
        break
2055
      else:
2056
        iprot.skip(ftype)
2057
      iprot.readFieldEnd()
2058
    iprot.readStructEnd()
2059
 
2060
  def write(self, oprot):
2061
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2062
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2063
      return
1731 ankur.sing 2064
    oprot.writeStructBegin('getSuccessfulPaymentsAmountRange_args')
1627 ankur.sing 2065
    oprot.writeFieldStop()
2066
    oprot.writeStructEnd()
2067
 
2068
  def __repr__(self):
2069
    L = ['%s=%r' % (key, value)
2070
      for key, value in self.__dict__.iteritems()]
2071
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2072
 
2073
  def __eq__(self, other):
2074
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2075
 
2076
  def __ne__(self, other):
2077
    return not (self == other)
2078
 
1731 ankur.sing 2079
class getSuccessfulPaymentsAmountRange_result:
1627 ankur.sing 2080
  """
2081
  Attributes:
2082
   - success
2083
  """
2084
 
2085
  thrift_spec = (
1731 ankur.sing 2086
    (0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0
1627 ankur.sing 2087
  )
2088
 
2089
  def __init__(self, success=None,):
2090
    self.success = success
2091
 
2092
  def read(self, iprot):
2093
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2094
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2095
      return
2096
    iprot.readStructBegin()
2097
    while True:
2098
      (fname, ftype, fid) = iprot.readFieldBegin()
2099
      if ftype == TType.STOP:
2100
        break
2101
      if fid == 0:
1731 ankur.sing 2102
        if ftype == TType.LIST:
2103
          self.success = []
2747 chandransh 2104
          (_etype52, _size49) = iprot.readListBegin()
2105
          for _i53 in xrange(_size49):
2106
            _elem54 = iprot.readDouble();
2107
            self.success.append(_elem54)
1731 ankur.sing 2108
          iprot.readListEnd()
1627 ankur.sing 2109
        else:
2110
          iprot.skip(ftype)
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_result')
1627 ankur.sing 2121
    if self.success != None:
1731 ankur.sing 2122
      oprot.writeFieldBegin('success', TType.LIST, 0)
2123
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
2747 chandransh 2124
      for iter55 in self.success:
2125
        oprot.writeDouble(iter55)
1731 ankur.sing 2126
      oprot.writeListEnd()
1627 ankur.sing 2127
      oprot.writeFieldEnd()
2128
    oprot.writeFieldStop()
2129
    oprot.writeStructEnd()
2130
 
2131
  def __repr__(self):
2132
    L = ['%s=%r' % (key, value)
2133
      for key, value in self.__dict__.iteritems()]
2134
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2135
 
2136
  def __eq__(self, other):
2137
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2138
 
2139
  def __ne__(self, other):
2140
    return not (self == other)
2141
 
3010 chandransh 2142
class captureEbsPayment_args:
2559 chandransh 2143
  """
2144
  Attributes:
3010 chandransh 2145
   - merchantPaymentId
2559 chandransh 2146
  """
1627 ankur.sing 2147
 
2559 chandransh 2148
  thrift_spec = (
2149
    None, # 0
3010 chandransh 2150
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
2559 chandransh 2151
  )
2152
 
3010 chandransh 2153
  def __init__(self, merchantPaymentId=None,):
2154
    self.merchantPaymentId = merchantPaymentId
2559 chandransh 2155
 
2156
  def read(self, iprot):
2157
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2158
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2159
      return
2160
    iprot.readStructBegin()
2161
    while True:
2162
      (fname, ftype, fid) = iprot.readFieldBegin()
2163
      if ftype == TType.STOP:
2164
        break
2165
      if fid == 1:
3010 chandransh 2166
        if ftype == TType.I64:
2167
          self.merchantPaymentId = iprot.readI64();
2559 chandransh 2168
        else:
2169
          iprot.skip(ftype)
2170
      else:
2171
        iprot.skip(ftype)
2172
      iprot.readFieldEnd()
2173
    iprot.readStructEnd()
2174
 
2175
  def write(self, oprot):
2176
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2177
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2178
      return
3010 chandransh 2179
    oprot.writeStructBegin('captureEbsPayment_args')
2180
    if self.merchantPaymentId != None:
2181
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2182
      oprot.writeI64(self.merchantPaymentId)
2559 chandransh 2183
      oprot.writeFieldEnd()
2184
    oprot.writeFieldStop()
2185
    oprot.writeStructEnd()
2186
 
2187
  def __repr__(self):
2188
    L = ['%s=%r' % (key, value)
2189
      for key, value in self.__dict__.iteritems()]
2190
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2191
 
2192
  def __eq__(self, other):
2193
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2194
 
2195
  def __ne__(self, other):
2196
    return not (self == other)
2197
 
3010 chandransh 2198
class captureEbsPayment_result:
2559 chandransh 2199
  """
2200
  Attributes:
2201
   - success
2202
   - pe
2203
  """
2204
 
2205
  thrift_spec = (
3010 chandransh 2206
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
2559 chandransh 2207
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2208
  )
2209
 
2210
  def __init__(self, success=None, pe=None,):
2211
    self.success = success
2212
    self.pe = pe
2213
 
2214
  def read(self, iprot):
2215
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2216
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2217
      return
2218
    iprot.readStructBegin()
2219
    while True:
2220
      (fname, ftype, fid) = iprot.readFieldBegin()
2221
      if ftype == TType.STOP:
2222
        break
2223
      if fid == 0:
3010 chandransh 2224
        if ftype == TType.MAP:
2225
          self.success = {}
2226
          (_ktype57, _vtype58, _size56 ) = iprot.readMapBegin() 
2227
          for _i60 in xrange(_size56):
2228
            _key61 = iprot.readString();
2229
            _val62 = iprot.readString();
2230
            self.success[_key61] = _val62
2231
          iprot.readMapEnd()
2559 chandransh 2232
        else:
2233
          iprot.skip(ftype)
2234
      elif fid == 1:
2235
        if ftype == TType.STRUCT:
2236
          self.pe = PaymentException()
2237
          self.pe.read(iprot)
2238
        else:
2239
          iprot.skip(ftype)
2240
      else:
2241
        iprot.skip(ftype)
2242
      iprot.readFieldEnd()
2243
    iprot.readStructEnd()
2244
 
2245
  def write(self, oprot):
2246
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2247
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2248
      return
3010 chandransh 2249
    oprot.writeStructBegin('captureEbsPayment_result')
2559 chandransh 2250
    if self.success != None:
3010 chandransh 2251
      oprot.writeFieldBegin('success', TType.MAP, 0)
2252
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
2253
      for kiter63,viter64 in self.success.items():
2254
        oprot.writeString(kiter63)
2255
        oprot.writeString(viter64)
2256
      oprot.writeMapEnd()
2559 chandransh 2257
      oprot.writeFieldEnd()
2258
    if self.pe != None:
2259
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2260
      self.pe.write(oprot)
2261
      oprot.writeFieldEnd()
2262
    oprot.writeFieldStop()
2263
    oprot.writeStructEnd()
2264
 
2265
  def __repr__(self):
2266
    L = ['%s=%r' % (key, value)
2267
      for key, value in self.__dict__.iteritems()]
2268
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2269
 
2270
  def __eq__(self, other):
2271
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2272
 
2273
  def __ne__(self, other):
2274
    return not (self == other)
2275
 
3010 chandransh 2276
class captureHdfcPayment_args:
2559 chandransh 2277
  """
2278
  Attributes:
2279
   - merchantPaymentId
2280
  """
2281
 
2282
  thrift_spec = (
2283
    None, # 0
2284
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
2285
  )
2286
 
2287
  def __init__(self, merchantPaymentId=None,):
2288
    self.merchantPaymentId = merchantPaymentId
2289
 
2290
  def read(self, iprot):
2291
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2292
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2293
      return
2294
    iprot.readStructBegin()
2295
    while True:
2296
      (fname, ftype, fid) = iprot.readFieldBegin()
2297
      if ftype == TType.STOP:
2298
        break
2299
      if fid == 1:
2300
        if ftype == TType.I64:
2301
          self.merchantPaymentId = iprot.readI64();
2302
        else:
2303
          iprot.skip(ftype)
2304
      else:
2305
        iprot.skip(ftype)
2306
      iprot.readFieldEnd()
2307
    iprot.readStructEnd()
2308
 
2309
  def write(self, oprot):
2310
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2311
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2312
      return
3010 chandransh 2313
    oprot.writeStructBegin('captureHdfcPayment_args')
2559 chandransh 2314
    if self.merchantPaymentId != None:
2315
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2316
      oprot.writeI64(self.merchantPaymentId)
2317
      oprot.writeFieldEnd()
2318
    oprot.writeFieldStop()
2319
    oprot.writeStructEnd()
2320
 
2321
  def __repr__(self):
2322
    L = ['%s=%r' % (key, value)
2323
      for key, value in self.__dict__.iteritems()]
2324
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2325
 
2326
  def __eq__(self, other):
2327
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2328
 
2329
  def __ne__(self, other):
2330
    return not (self == other)
2331
 
3010 chandransh 2332
class captureHdfcPayment_result:
2559 chandransh 2333
  """
2334
  Attributes:
2335
   - success
2336
   - pe
2337
  """
2338
 
2339
  thrift_spec = (
2340
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
2341
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2342
  )
2343
 
2344
  def __init__(self, success=None, pe=None,):
2345
    self.success = success
2346
    self.pe = pe
2347
 
2348
  def read(self, iprot):
2349
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2350
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2351
      return
2352
    iprot.readStructBegin()
2353
    while True:
2354
      (fname, ftype, fid) = iprot.readFieldBegin()
2355
      if ftype == TType.STOP:
2356
        break
2357
      if fid == 0:
2358
        if ftype == TType.MAP:
2359
          self.success = {}
2747 chandransh 2360
          (_ktype66, _vtype67, _size65 ) = iprot.readMapBegin() 
2361
          for _i69 in xrange(_size65):
2362
            _key70 = iprot.readString();
2363
            _val71 = iprot.readString();
2364
            self.success[_key70] = _val71
2559 chandransh 2365
          iprot.readMapEnd()
2366
        else:
2367
          iprot.skip(ftype)
2368
      elif fid == 1:
2369
        if ftype == TType.STRUCT:
2370
          self.pe = PaymentException()
2371
          self.pe.read(iprot)
2372
        else:
2373
          iprot.skip(ftype)
2374
      else:
2375
        iprot.skip(ftype)
2376
      iprot.readFieldEnd()
2377
    iprot.readStructEnd()
2378
 
2379
  def write(self, oprot):
2380
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2381
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2382
      return
3010 chandransh 2383
    oprot.writeStructBegin('captureHdfcPayment_result')
2559 chandransh 2384
    if self.success != None:
2385
      oprot.writeFieldBegin('success', TType.MAP, 0)
2386
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
2747 chandransh 2387
      for kiter72,viter73 in self.success.items():
2388
        oprot.writeString(kiter72)
2389
        oprot.writeString(viter73)
2559 chandransh 2390
      oprot.writeMapEnd()
2391
      oprot.writeFieldEnd()
2392
    if self.pe != None:
2393
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2394
      self.pe.write(oprot)
2395
      oprot.writeFieldEnd()
2396
    oprot.writeFieldStop()
2397
    oprot.writeStructEnd()
2398
 
2399
  def __repr__(self):
2400
    L = ['%s=%r' % (key, value)
2401
      for key, value in self.__dict__.iteritems()]
2402
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2403
 
2404
  def __eq__(self, other):
2405
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2406
 
2407
  def __ne__(self, other):
2408
    return not (self == other)
2409
 
3010 chandransh 2410
class initializeHdfcPayment_args:
2708 chandransh 2411
  """
2412
  Attributes:
2413
   - merchantPaymentId
2414
  """
2415
 
2416
  thrift_spec = (
2417
    None, # 0
2418
    (1, TType.I64, 'merchantPaymentId', None, None, ), # 1
2419
  )
2420
 
2421
  def __init__(self, merchantPaymentId=None,):
2422
    self.merchantPaymentId = merchantPaymentId
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 == 1:
2434
        if ftype == TType.I64:
2435
          self.merchantPaymentId = iprot.readI64();
2436
        else:
2437
          iprot.skip(ftype)
2438
      else:
2439
        iprot.skip(ftype)
2440
      iprot.readFieldEnd()
2441
    iprot.readStructEnd()
2442
 
2443
  def write(self, oprot):
2444
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2445
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2446
      return
3010 chandransh 2447
    oprot.writeStructBegin('initializeHdfcPayment_args')
2708 chandransh 2448
    if self.merchantPaymentId != None:
2449
      oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)
2450
      oprot.writeI64(self.merchantPaymentId)
2451
      oprot.writeFieldEnd()
2452
    oprot.writeFieldStop()
2453
    oprot.writeStructEnd()
2454
 
2455
  def __repr__(self):
2456
    L = ['%s=%r' % (key, value)
2457
      for key, value in self.__dict__.iteritems()]
2458
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2459
 
2460
  def __eq__(self, other):
2461
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2462
 
2463
  def __ne__(self, other):
2464
    return not (self == other)
2465
 
3010 chandransh 2466
class initializeHdfcPayment_result:
2708 chandransh 2467
  """
2468
  Attributes:
2469
   - success
2470
   - pe
2471
  """
2472
 
2473
  thrift_spec = (
3010 chandransh 2474
    (0, TType.STRING, 'success', None, None, ), # 0
2708 chandransh 2475
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2476
  )
2477
 
2478
  def __init__(self, success=None, pe=None,):
2479
    self.success = success
2480
    self.pe = pe
2481
 
2482
  def read(self, iprot):
2483
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2484
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2485
      return
2486
    iprot.readStructBegin()
2487
    while True:
2488
      (fname, ftype, fid) = iprot.readFieldBegin()
2489
      if ftype == TType.STOP:
2490
        break
2491
      if fid == 0:
3010 chandransh 2492
        if ftype == TType.STRING:
2493
          self.success = iprot.readString();
2708 chandransh 2494
        else:
2495
          iprot.skip(ftype)
2496
      elif fid == 1:
2497
        if ftype == TType.STRUCT:
2498
          self.pe = PaymentException()
2499
          self.pe.read(iprot)
2500
        else:
2501
          iprot.skip(ftype)
2502
      else:
2503
        iprot.skip(ftype)
2504
      iprot.readFieldEnd()
2505
    iprot.readStructEnd()
2506
 
2507
  def write(self, oprot):
2508
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2509
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2510
      return
3010 chandransh 2511
    oprot.writeStructBegin('initializeHdfcPayment_result')
2708 chandransh 2512
    if self.success != None:
3010 chandransh 2513
      oprot.writeFieldBegin('success', TType.STRING, 0)
2514
      oprot.writeString(self.success)
2708 chandransh 2515
      oprot.writeFieldEnd()
2516
    if self.pe != None:
2517
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2518
      self.pe.write(oprot)
2519
      oprot.writeFieldEnd()
2520
    oprot.writeFieldStop()
2521
    oprot.writeStructEnd()
2522
 
2523
  def __repr__(self):
2524
    L = ['%s=%r' % (key, value)
2525
      for key, value in self.__dict__.iteritems()]
2526
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2527
 
2528
  def __eq__(self, other):
2529
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2530
 
2531
  def __ne__(self, other):
2532
    return not (self == other)
2533
 
3010 chandransh 2534
class createRefund_args:
2559 chandransh 2535
  """
2536
  Attributes:
3010 chandransh 2537
   - orderId
2538
   - merchantTxnId
2539
   - amount
2559 chandransh 2540
  """
2541
 
2542
  thrift_spec = (
2543
    None, # 0
3010 chandransh 2544
    (1, TType.I64, 'orderId', None, None, ), # 1
2545
    (2, TType.I64, 'merchantTxnId', None, None, ), # 2
2546
    (3, TType.DOUBLE, 'amount', None, None, ), # 3
2559 chandransh 2547
  )
2548
 
3010 chandransh 2549
  def __init__(self, orderId=None, merchantTxnId=None, amount=None,):
2550
    self.orderId = orderId
2551
    self.merchantTxnId = merchantTxnId
2552
    self.amount = amount
2559 chandransh 2553
 
2554
  def read(self, iprot):
2555
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2556
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2557
      return
2558
    iprot.readStructBegin()
2559
    while True:
2560
      (fname, ftype, fid) = iprot.readFieldBegin()
2561
      if ftype == TType.STOP:
2562
        break
2563
      if fid == 1:
2564
        if ftype == TType.I64:
3010 chandransh 2565
          self.orderId = iprot.readI64();
2559 chandransh 2566
        else:
2567
          iprot.skip(ftype)
3010 chandransh 2568
      elif fid == 2:
2569
        if ftype == TType.I64:
2570
          self.merchantTxnId = iprot.readI64();
2571
        else:
2572
          iprot.skip(ftype)
2573
      elif fid == 3:
2574
        if ftype == TType.DOUBLE:
2575
          self.amount = iprot.readDouble();
2576
        else:
2577
          iprot.skip(ftype)
2559 chandransh 2578
      else:
2579
        iprot.skip(ftype)
2580
      iprot.readFieldEnd()
2581
    iprot.readStructEnd()
2582
 
2583
  def write(self, oprot):
2584
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2585
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2586
      return
3010 chandransh 2587
    oprot.writeStructBegin('createRefund_args')
2588
    if self.orderId != None:
2589
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2590
      oprot.writeI64(self.orderId)
2559 chandransh 2591
      oprot.writeFieldEnd()
3010 chandransh 2592
    if self.merchantTxnId != None:
2593
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 2)
2594
      oprot.writeI64(self.merchantTxnId)
2595
      oprot.writeFieldEnd()
2596
    if self.amount != None:
2597
      oprot.writeFieldBegin('amount', TType.DOUBLE, 3)
2598
      oprot.writeDouble(self.amount)
2599
      oprot.writeFieldEnd()
2559 chandransh 2600
    oprot.writeFieldStop()
2601
    oprot.writeStructEnd()
2602
 
2603
  def __repr__(self):
2604
    L = ['%s=%r' % (key, value)
2605
      for key, value in self.__dict__.iteritems()]
2606
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2607
 
2608
  def __eq__(self, other):
2609
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2610
 
2611
  def __ne__(self, other):
2612
    return not (self == other)
2613
 
3010 chandransh 2614
class createRefund_result:
2559 chandransh 2615
  """
2616
  Attributes:
2617
   - success
2618
   - pe
2619
  """
2620
 
2621
  thrift_spec = (
3010 chandransh 2622
    (0, TType.I64, 'success', None, None, ), # 0
2559 chandransh 2623
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2624
  )
2625
 
2626
  def __init__(self, success=None, pe=None,):
2627
    self.success = success
2628
    self.pe = pe
2629
 
2630
  def read(self, iprot):
2631
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2632
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2633
      return
2634
    iprot.readStructBegin()
2635
    while True:
2636
      (fname, ftype, fid) = iprot.readFieldBegin()
2637
      if ftype == TType.STOP:
2638
        break
2639
      if fid == 0:
3010 chandransh 2640
        if ftype == TType.I64:
2641
          self.success = iprot.readI64();
2559 chandransh 2642
        else:
2643
          iprot.skip(ftype)
2644
      elif fid == 1:
2645
        if ftype == TType.STRUCT:
2646
          self.pe = PaymentException()
2647
          self.pe.read(iprot)
2648
        else:
2649
          iprot.skip(ftype)
2650
      else:
2651
        iprot.skip(ftype)
2652
      iprot.readFieldEnd()
2653
    iprot.readStructEnd()
2654
 
2655
  def write(self, oprot):
2656
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2657
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2658
      return
3010 chandransh 2659
    oprot.writeStructBegin('createRefund_result')
2559 chandransh 2660
    if self.success != None:
3010 chandransh 2661
      oprot.writeFieldBegin('success', TType.I64, 0)
2662
      oprot.writeI64(self.success)
2559 chandransh 2663
      oprot.writeFieldEnd()
2664
    if self.pe != None:
2665
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2666
      self.pe.write(oprot)
2667
      oprot.writeFieldEnd()
2668
    oprot.writeFieldStop()
2669
    oprot.writeStructEnd()
2670
 
2671
  def __repr__(self):
2672
    L = ['%s=%r' % (key, value)
2673
      for key, value in self.__dict__.iteritems()]
2674
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2675
 
2676
  def __eq__(self, other):
2677
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2678
 
2679
  def __ne__(self, other):
2680
    return not (self == other)
2681
 
3010 chandransh 2682
class capturePayment_args:
2685 chandransh 2683
  """
2684
  Attributes:
2685
   - merchantTxnId
2686
  """
2559 chandransh 2687
 
2685 chandransh 2688
  thrift_spec = (
2689
    None, # 0
3010 chandransh 2690
    (1, TType.I64, 'merchantTxnId', None, None, ), # 1
2685 chandransh 2691
  )
2692
 
3010 chandransh 2693
  def __init__(self, merchantTxnId=None,):
2685 chandransh 2694
    self.merchantTxnId = merchantTxnId
2695
 
2696
  def read(self, iprot):
2697
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2698
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2699
      return
2700
    iprot.readStructBegin()
2701
    while True:
2702
      (fname, ftype, fid) = iprot.readFieldBegin()
2703
      if ftype == TType.STOP:
2704
        break
2705
      if fid == 1:
2706
        if ftype == TType.I64:
2707
          self.merchantTxnId = iprot.readI64();
2708
        else:
2709
          iprot.skip(ftype)
2710
      else:
2711
        iprot.skip(ftype)
2712
      iprot.readFieldEnd()
2713
    iprot.readStructEnd()
2714
 
2715
  def write(self, oprot):
2716
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2717
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2718
      return
3010 chandransh 2719
    oprot.writeStructBegin('capturePayment_args')
2685 chandransh 2720
    if self.merchantTxnId != None:
3010 chandransh 2721
      oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)
2685 chandransh 2722
      oprot.writeI64(self.merchantTxnId)
2723
      oprot.writeFieldEnd()
2724
    oprot.writeFieldStop()
2725
    oprot.writeStructEnd()
2726
 
2727
  def __repr__(self):
2728
    L = ['%s=%r' % (key, value)
2729
      for key, value in self.__dict__.iteritems()]
2730
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2731
 
2732
  def __eq__(self, other):
2733
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2734
 
2735
  def __ne__(self, other):
2736
    return not (self == other)
2737
 
3010 chandransh 2738
class capturePayment_result:
2685 chandransh 2739
  """
2740
  Attributes:
2741
   - success
2742
   - pe
2743
  """
2744
 
2745
  thrift_spec = (
3010 chandransh 2746
    (0, TType.BOOL, 'success', None, None, ), # 0
2685 chandransh 2747
    (1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1
2748
  )
2749
 
2750
  def __init__(self, success=None, pe=None,):
2751
    self.success = success
2752
    self.pe = pe
2753
 
2754
  def read(self, iprot):
2755
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2756
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2757
      return
2758
    iprot.readStructBegin()
2759
    while True:
2760
      (fname, ftype, fid) = iprot.readFieldBegin()
2761
      if ftype == TType.STOP:
2762
        break
2763
      if fid == 0:
3010 chandransh 2764
        if ftype == TType.BOOL:
2765
          self.success = iprot.readBool();
2685 chandransh 2766
        else:
2767
          iprot.skip(ftype)
2768
      elif fid == 1:
2769
        if ftype == TType.STRUCT:
2770
          self.pe = PaymentException()
2771
          self.pe.read(iprot)
2772
        else:
2773
          iprot.skip(ftype)
2774
      else:
2775
        iprot.skip(ftype)
2776
      iprot.readFieldEnd()
2777
    iprot.readStructEnd()
2778
 
2779
  def write(self, oprot):
2780
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2781
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2782
      return
3010 chandransh 2783
    oprot.writeStructBegin('capturePayment_result')
2685 chandransh 2784
    if self.success != None:
3010 chandransh 2785
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2786
      oprot.writeBool(self.success)
2685 chandransh 2787
      oprot.writeFieldEnd()
2788
    if self.pe != None:
2789
      oprot.writeFieldBegin('pe', TType.STRUCT, 1)
2790
      self.pe.write(oprot)
2791
      oprot.writeFieldEnd()
2792
    oprot.writeFieldStop()
2793
    oprot.writeStructEnd()
2794
 
2795
  def __repr__(self):
2796
    L = ['%s=%r' % (key, value)
2797
      for key, value in self.__dict__.iteritems()]
2798
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2799
 
2800
  def __eq__(self, other):
2801
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2802
 
2803
  def __ne__(self, other):
2804
    return not (self == other)
2805
 
2806