Subversion Repositories SmartDukaan

Rev

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

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