Subversion Repositories SmartDukaan

Rev

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