Rev 1627 | Rev 1856 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
## Autogenerated by Thrift## DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING#from thrift.Thrift import *from ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface:def closeSession(self, ):"""For closing the open session in sqlalchemy"""passdef createPayment(self, userId, amount, gatewayId, txnId):"""create a new payment and return payment id, throws an exception if gateway is not activeParameters:- userId- amount- gatewayId- txnId"""passdef getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):"""get payment for user. If status and gateway are null, it is ignored. Same for times as well.Parameters:- userId- fromTime- toTime- status- gatewayId"""passdef getPayments(self, fromTime, toTime, status, gatewayId):"""* Returns all payments based on following filters.statusfromTime: if 0 then not considered else filters on initTimestamp >= fromTimetoTime: if -1 then not considered else filters on successTimestamp or errorTimestamp <= toTime*Parameters:- fromTime- toTime- status- gatewayId"""passdef getPaymentGateway(self, id):"""Get a particular gatewayParameters:- id"""passdef getPayment(self, id):"""Get a particular payment infoParameters:- id"""passdef getPaymentForTxnId(self, txnId):"""Get a particular payment for a transaction. Will raise exception.Parameters:- txnId"""passdef updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):"""mark payment successful and store parametersParameters:- id- gatewayPaymentId- sessionId- gatewayTxnStatus- description- gatewayTxnId- authCode- referenceCode- errorCode- status- gatewayTxnDate- attributes"""passdef getSuccessfulPaymentsAmountRange(self, ):"""Returns the minimum and maximum amounts among successful payments.List contains two double values, first minimum and second maximum amount."""passclass Client(Iface):def __init__(self, iprot, oprot=None):self._iprot = self._oprot = iprotif oprot != None:self._oprot = oprotself._seqid = 0def closeSession(self, ):"""For closing the open session in sqlalchemy"""self.send_closeSession()self.recv_closeSession()def send_closeSession(self, ):self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)args = closeSession_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_closeSession(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = closeSession_result()result.read(self._iprot)self._iprot.readMessageEnd()returndef createPayment(self, userId, amount, gatewayId, txnId):"""create a new payment and return payment id, throws an exception if gateway is not activeParameters:- userId- amount- gatewayId- txnId"""self.send_createPayment(userId, amount, gatewayId, txnId)return self.recv_createPayment()def send_createPayment(self, userId, amount, gatewayId, txnId):self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)args = createPayment_args()args.userId = userIdargs.amount = amountargs.gatewayId = gatewayIdargs.txnId = txnIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_createPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = createPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");def getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):"""get payment for user. If status and gateway are null, it is ignored. Same for times as well.Parameters:- userId- fromTime- toTime- status- gatewayId"""self.send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId)return self.recv_getPaymentsForUser()def send_getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):self._oprot.writeMessageBegin('getPaymentsForUser', TMessageType.CALL, self._seqid)args = getPaymentsForUser_args()args.userId = userIdargs.fromTime = fromTimeargs.toTime = toTimeargs.status = statusargs.gatewayId = gatewayIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentsForUser(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentsForUser_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");def getPayments(self, fromTime, toTime, status, gatewayId):"""* Returns all payments based on following filters.statusfromTime: if 0 then not considered else filters on initTimestamp >= fromTimetoTime: if -1 then not considered else filters on successTimestamp or errorTimestamp <= toTime*Parameters:- fromTime- toTime- status- gatewayId"""self.send_getPayments(fromTime, toTime, status, gatewayId)return self.recv_getPayments()def send_getPayments(self, fromTime, toTime, status, gatewayId):self._oprot.writeMessageBegin('getPayments', TMessageType.CALL, self._seqid)args = getPayments_args()args.fromTime = fromTimeargs.toTime = toTimeargs.status = statusargs.gatewayId = gatewayIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPayments(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPayments_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");def getPaymentGateway(self, id):"""Get a particular gatewayParameters:- id"""self.send_getPaymentGateway(id)return self.recv_getPaymentGateway()def send_getPaymentGateway(self, id):self._oprot.writeMessageBegin('getPaymentGateway', TMessageType.CALL, self._seqid)args = getPaymentGateway_args()args.id = idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentGateway(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentGateway_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");def getPayment(self, id):"""Get a particular payment infoParameters:- id"""self.send_getPayment(id)return self.recv_getPayment()def send_getPayment(self, id):self._oprot.writeMessageBegin('getPayment', TMessageType.CALL, self._seqid)args = getPayment_args()args.id = idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");def getPaymentForTxnId(self, txnId):"""Get a particular payment for a transaction. Will raise exception.Parameters:- txnId"""self.send_getPaymentForTxnId(txnId)return self.recv_getPaymentForTxnId()def send_getPaymentForTxnId(self, txnId):self._oprot.writeMessageBegin('getPaymentForTxnId', TMessageType.CALL, self._seqid)args = getPaymentForTxnId_args()args.txnId = txnIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentForTxnId(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentForTxnId_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");def updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):"""mark payment successful and store parametersParameters:- id- gatewayPaymentId- sessionId- gatewayTxnStatus- description- gatewayTxnId- authCode- referenceCode- errorCode- status- gatewayTxnDate- attributes"""self.send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes)return self.recv_updatePaymentDetails()def send_updatePaymentDetails(self, id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes):self._oprot.writeMessageBegin('updatePaymentDetails', TMessageType.CALL, self._seqid)args = updatePaymentDetails_args()args.id = idargs.gatewayPaymentId = gatewayPaymentIdargs.sessionId = sessionIdargs.gatewayTxnStatus = gatewayTxnStatusargs.description = descriptionargs.gatewayTxnId = gatewayTxnIdargs.authCode = authCodeargs.referenceCode = referenceCodeargs.errorCode = errorCodeargs.status = statusargs.gatewayTxnDate = gatewayTxnDateargs.attributes = attributesargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_updatePaymentDetails(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = updatePaymentDetails_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");def getSuccessfulPaymentsAmountRange(self, ):"""Returns the minimum and maximum amounts among successful payments.List contains two double values, first minimum and second maximum amount."""self.send_getSuccessfulPaymentsAmountRange()return self.recv_getSuccessfulPaymentsAmountRange()def send_getSuccessfulPaymentsAmountRange(self, ):self._oprot.writeMessageBegin('getSuccessfulPaymentsAmountRange', TMessageType.CALL, self._seqid)args = getSuccessfulPaymentsAmountRange_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getSuccessfulPaymentsAmountRange(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getSuccessfulPaymentsAmountRange_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");class Processor(Iface, TProcessor):def __init__(self, handler):self._handler = handlerself._processMap = {}self._processMap["closeSession"] = Processor.process_closeSessionself._processMap["createPayment"] = Processor.process_createPaymentself._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUserself._processMap["getPayments"] = Processor.process_getPaymentsself._processMap["getPaymentGateway"] = Processor.process_getPaymentGatewayself._processMap["getPayment"] = Processor.process_getPaymentself._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnIdself._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetailsself._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRangedef process(self, iprot, oprot):(name, type, seqid) = iprot.readMessageBegin()if name not in self._processMap:iprot.skip(TType.STRUCT)iprot.readMessageEnd()x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)x.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()returnelse:self._processMap[name](self, seqid, iprot, oprot)return Truedef process_closeSession(self, seqid, iprot, oprot):args = closeSession_args()args.read(iprot)iprot.readMessageEnd()result = closeSession_result()self._handler.closeSession()oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_createPayment(self, seqid, iprot, oprot):args = createPayment_args()args.read(iprot)iprot.readMessageEnd()result = createPayment_result()try:result.success = self._handler.createPayment(args.userId, args.amount, args.gatewayId, args.txnId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("createPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentsForUser(self, seqid, iprot, oprot):args = getPaymentsForUser_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentsForUser_result()try:result.success = self._handler.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentsForUser", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPayments(self, seqid, iprot, oprot):args = getPayments_args()args.read(iprot)iprot.readMessageEnd()result = getPayments_result()try:result.success = self._handler.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPayments", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentGateway(self, seqid, iprot, oprot):args = getPaymentGateway_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentGateway_result()try:result.success = self._handler.getPaymentGateway(args.id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentGateway", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPayment(self, seqid, iprot, oprot):args = getPayment_args()args.read(iprot)iprot.readMessageEnd()result = getPayment_result()try:result.success = self._handler.getPayment(args.id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentForTxnId(self, seqid, iprot, oprot):args = getPaymentForTxnId_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentForTxnId_result()try:result.success = self._handler.getPaymentForTxnId(args.txnId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentForTxnId", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_updatePaymentDetails(self, seqid, iprot, oprot):args = updatePaymentDetails_args()args.read(iprot)iprot.readMessageEnd()result = updatePaymentDetails_result()try: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)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("updatePaymentDetails", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getSuccessfulPaymentsAmountRange(self, seqid, iprot, oprot):args = getSuccessfulPaymentsAmountRange_args()args.read(iprot)iprot.readMessageEnd()result = getSuccessfulPaymentsAmountRange_result()result.success = self._handler.getSuccessfulPaymentsAmountRange()oprot.writeMessageBegin("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass closeSession_args:thrift_spec = ()def read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('closeSession_args')oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class closeSession_result:thrift_spec = ()def read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('closeSession_result')oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class createPayment_args:"""Attributes:- userId- amount- gatewayId- txnId"""thrift_spec = (None, # 0(1, TType.I64, 'userId', None, None, ), # 1(2, TType.DOUBLE, 'amount', None, None, ), # 2(3, TType.I64, 'gatewayId', None, None, ), # 3(4, TType.I64, 'txnId', None, None, ), # 4)def __init__(self, userId=None, amount=None, gatewayId=None, txnId=None,):self.userId = userIdself.amount = amountself.gatewayId = gatewayIdself.txnId = txnIddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.userId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.DOUBLE:self.amount = iprot.readDouble();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.gatewayId = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.txnId = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('createPayment_args')if self.userId != None:oprot.writeFieldBegin('userId', TType.I64, 1)oprot.writeI64(self.userId)oprot.writeFieldEnd()if self.amount != None:oprot.writeFieldBegin('amount', TType.DOUBLE, 2)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.gatewayId != None:oprot.writeFieldBegin('gatewayId', TType.I64, 3)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()if self.txnId != None:oprot.writeFieldBegin('txnId', TType.I64, 4)oprot.writeI64(self.txnId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class createPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.I64, 'success', None, None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.I64:self.success = iprot.readI64();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('createPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.I64, 0)oprot.writeI64(self.success)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentsForUser_args:"""Attributes:- userId- fromTime- toTime- status- gatewayId"""thrift_spec = (None, # 0(1, TType.I64, 'userId', None, None, ), # 1(2, TType.I64, 'fromTime', None, None, ), # 2(3, TType.I64, 'toTime', None, None, ), # 3(4, TType.I32, 'status', None, None, ), # 4(5, TType.I64, 'gatewayId', None, None, ), # 5)def __init__(self, userId=None, fromTime=None, toTime=None, status=None, gatewayId=None,):self.userId = userIdself.fromTime = fromTimeself.toTime = toTimeself.status = statusself.gatewayId = gatewayIddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.userId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.fromTime = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.toTime = iprot.readI64();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I32:self.status = iprot.readI32();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.I64:self.gatewayId = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentsForUser_args')if self.userId != None:oprot.writeFieldBegin('userId', TType.I64, 1)oprot.writeI64(self.userId)oprot.writeFieldEnd()if self.fromTime != None:oprot.writeFieldBegin('fromTime', TType.I64, 2)oprot.writeI64(self.fromTime)oprot.writeFieldEnd()if self.toTime != None:oprot.writeFieldBegin('toTime', TType.I64, 3)oprot.writeI64(self.toTime)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 4)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayId != None:oprot.writeFieldBegin('gatewayId', TType.I64, 5)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentsForUser_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype17, _size14) = iprot.readListBegin()for _i18 in xrange(_size14):_elem19 = Payment()_elem19.read(iprot)self.success.append(_elem19)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentsForUser_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter20 in self.success:iter20.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayments_args:"""Attributes:- fromTime- toTime- status- gatewayId"""thrift_spec = (None, # 0(1, TType.I64, 'fromTime', None, None, ), # 1(2, TType.I64, 'toTime', None, None, ), # 2(3, TType.I32, 'status', None, None, ), # 3(4, TType.I64, 'gatewayId', None, None, ), # 4)def __init__(self, fromTime=None, toTime=None, status=None, gatewayId=None,):self.fromTime = fromTimeself.toTime = toTimeself.status = statusself.gatewayId = gatewayIddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.fromTime = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.toTime = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I32:self.status = iprot.readI32();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.gatewayId = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayments_args')if self.fromTime != None:oprot.writeFieldBegin('fromTime', TType.I64, 1)oprot.writeI64(self.fromTime)oprot.writeFieldEnd()if self.toTime != None:oprot.writeFieldBegin('toTime', TType.I64, 2)oprot.writeI64(self.toTime)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 3)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayId != None:oprot.writeFieldBegin('gatewayId', TType.I64, 4)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayments_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype24, _size21) = iprot.readListBegin()for _i25 in xrange(_size21):_elem26 = Payment()_elem26.read(iprot)self.success.append(_elem26)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayments_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter27 in self.success:iter27.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateway_args:"""Attributes:- id"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1)def __init__(self, id=None,):self.id = iddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentGateway_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateway_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = PaymentGateway()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentGateway_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayment_args:"""Attributes:- id"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1)def __init__(self, id=None,):self.id = iddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayment_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = Payment()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentForTxnId_args:"""Attributes:- txnId"""thrift_spec = (None, # 0(1, TType.I64, 'txnId', None, None, ), # 1)def __init__(self, txnId=None,):self.txnId = txnIddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.txnId = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentForTxnId_args')if self.txnId != None:oprot.writeFieldBegin('txnId', TType.I64, 1)oprot.writeI64(self.txnId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentForTxnId_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(Payment, Payment.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype31, _size28) = iprot.readListBegin()for _i32 in xrange(_size28):_elem33 = Payment()_elem33.read(iprot)self.success.append(_elem33)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentForTxnId_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter34 in self.success:iter34.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updatePaymentDetails_args:"""Attributes:- id- gatewayPaymentId- sessionId- gatewayTxnStatus- description- gatewayTxnId- authCode- referenceCode- errorCode- status- gatewayTxnDate- attributes"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.STRING, 'gatewayPaymentId', None, None, ), # 2(3, TType.STRING, 'sessionId', None, None, ), # 3(4, TType.STRING, 'gatewayTxnStatus', None, None, ), # 4(5, TType.STRING, 'description', None, None, ), # 5(6, TType.STRING, 'gatewayTxnId', None, None, ), # 6(7, TType.STRING, 'authCode', None, None, ), # 7(8, TType.STRING, 'referenceCode', None, None, ), # 8(9, TType.STRING, 'errorCode', None, None, ), # 9(10, TType.I32, 'status', None, None, ), # 10(11, TType.STRING, 'gatewayTxnDate', None, None, ), # 11(12, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 12)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,):self.id = idself.gatewayPaymentId = gatewayPaymentIdself.sessionId = sessionIdself.gatewayTxnStatus = gatewayTxnStatusself.description = descriptionself.gatewayTxnId = gatewayTxnIdself.authCode = authCodeself.referenceCode = referenceCodeself.errorCode = errorCodeself.status = statusself.gatewayTxnDate = gatewayTxnDateself.attributes = attributesdef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.gatewayPaymentId = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.STRING:self.sessionId = iprot.readString();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.STRING:self.gatewayTxnStatus = iprot.readString();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.STRING:self.description = iprot.readString();else:iprot.skip(ftype)elif fid == 6:if ftype == TType.STRING:self.gatewayTxnId = iprot.readString();else:iprot.skip(ftype)elif fid == 7:if ftype == TType.STRING:self.authCode = iprot.readString();else:iprot.skip(ftype)elif fid == 8:if ftype == TType.STRING:self.referenceCode = iprot.readString();else:iprot.skip(ftype)elif fid == 9:if ftype == TType.STRING:self.errorCode = iprot.readString();else:iprot.skip(ftype)elif fid == 10:if ftype == TType.I32:self.status = iprot.readI32();else:iprot.skip(ftype)elif fid == 11:if ftype == TType.STRING:self.gatewayTxnDate = iprot.readString();else:iprot.skip(ftype)elif fid == 12:if ftype == TType.LIST:self.attributes = [](_etype38, _size35) = iprot.readListBegin()for _i39 in xrange(_size35):_elem40 = Attribute()_elem40.read(iprot)self.attributes.append(_elem40)iprot.readListEnd()else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updatePaymentDetails_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.gatewayPaymentId != None:oprot.writeFieldBegin('gatewayPaymentId', TType.STRING, 2)oprot.writeString(self.gatewayPaymentId)oprot.writeFieldEnd()if self.sessionId != None:oprot.writeFieldBegin('sessionId', TType.STRING, 3)oprot.writeString(self.sessionId)oprot.writeFieldEnd()if self.gatewayTxnStatus != None:oprot.writeFieldBegin('gatewayTxnStatus', TType.STRING, 4)oprot.writeString(self.gatewayTxnStatus)oprot.writeFieldEnd()if self.description != None:oprot.writeFieldBegin('description', TType.STRING, 5)oprot.writeString(self.description)oprot.writeFieldEnd()if self.gatewayTxnId != None:oprot.writeFieldBegin('gatewayTxnId', TType.STRING, 6)oprot.writeString(self.gatewayTxnId)oprot.writeFieldEnd()if self.authCode != None:oprot.writeFieldBegin('authCode', TType.STRING, 7)oprot.writeString(self.authCode)oprot.writeFieldEnd()if self.referenceCode != None:oprot.writeFieldBegin('referenceCode', TType.STRING, 8)oprot.writeString(self.referenceCode)oprot.writeFieldEnd()if self.errorCode != None:oprot.writeFieldBegin('errorCode', TType.STRING, 9)oprot.writeString(self.errorCode)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 10)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayTxnDate != None:oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)oprot.writeString(self.gatewayTxnDate)oprot.writeFieldEnd()if self.attributes != None:oprot.writeFieldBegin('attributes', TType.LIST, 12)oprot.writeListBegin(TType.STRUCT, len(self.attributes))for iter41 in self.attributes:iter41.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class updatePaymentDetails_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.BOOL, 'success', None, None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.BOOL:self.success = iprot.readBool();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('updatePaymentDetails_result')if self.success != None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getSuccessfulPaymentsAmountRange_args:thrift_spec = ()def read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakelse:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getSuccessfulPaymentsAmountRange_args')oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getSuccessfulPaymentsAmountRange_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0)def __init__(self, success=None,):self.success = successdef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype45, _size42) = iprot.readListBegin()for _i46 in xrange(_size42):_elem47 = iprot.readDouble();self.success.append(_elem47)iprot.readListEnd()else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getSuccessfulPaymentsAmountRange_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.DOUBLE, len(self.success))for iter48 in self.success:oprot.writeDouble(iter48)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)