Subversion Repositories SmartDukaan

Rev

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