Subversion Repositories SmartDukaan

Rev

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