Rev 2708 | Rev 3010 | 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):"""get all payments for user. If gatewayId is 0, then it is ignored while filtering.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."""passdef updateAndCaptureEbsPayment(self, paymentParams):"""Update the authorization attributes of the payment and attempt to capture it in case it was authorized.If either the authorization failed or the capture attempt failed, the payment is marked as failed.Parameters:- paymentParams"""passdef captureEbsPayment(self, merchantPaymentId):"""Captures an already authorized EBS Payment and returns a map containing the details of the captured transactionParameters:- merchantPaymentId"""passdef captureHdfcPayment(self, merchantPaymentId):"""Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transactionParameters:- merchantPaymentId"""passdef initializeHdfcPayment(self, merchantPaymentId):"""Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised.Parameters:- merchantPaymentId"""passdef createRefund(self, orderId, merchantTxnId, amount):"""Create a refund of the given amount corresponding to the given order to be processed through the samepayment gateway which processed the payment for the corresponding transaction.Returns the id of the newly created Refund.Parameters:- orderId- merchantTxnId- 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):"""get all payments for user. If gatewayId is 0, then it is ignored while filtering.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");def updateAndCaptureEbsPayment(self, paymentParams):"""Update the authorization attributes of the payment and attempt to capture it in case it was authorized.If either the authorization failed or the capture attempt failed, the payment is marked as failed.Parameters:- paymentParams"""self.send_updateAndCaptureEbsPayment(paymentParams)return self.recv_updateAndCaptureEbsPayment()def send_updateAndCaptureEbsPayment(self, paymentParams):self._oprot.writeMessageBegin('updateAndCaptureEbsPayment', TMessageType.CALL, self._seqid)args = updateAndCaptureEbsPayment_args()args.paymentParams = paymentParamsargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_updateAndCaptureEbsPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = updateAndCaptureEbsPayment_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, "updateAndCaptureEbsPayment failed: unknown result");def captureEbsPayment(self, merchantPaymentId):"""Captures an already authorized EBS Payment and returns a map containing the details of the captured transactionParameters:- merchantPaymentId"""self.send_captureEbsPayment(merchantPaymentId)return self.recv_captureEbsPayment()def send_captureEbsPayment(self, merchantPaymentId):self._oprot.writeMessageBegin('captureEbsPayment', TMessageType.CALL, self._seqid)args = captureEbsPayment_args()args.merchantPaymentId = merchantPaymentIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_captureEbsPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = captureEbsPayment_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, "captureEbsPayment failed: unknown result");def captureHdfcPayment(self, merchantPaymentId):"""Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transactionParameters:- merchantPaymentId"""self.send_captureHdfcPayment(merchantPaymentId)return self.recv_captureHdfcPayment()def send_captureHdfcPayment(self, merchantPaymentId):self._oprot.writeMessageBegin('captureHdfcPayment', TMessageType.CALL, self._seqid)args = captureHdfcPayment_args()args.merchantPaymentId = merchantPaymentIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_captureHdfcPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = captureHdfcPayment_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, "captureHdfcPayment failed: unknown result");def initializeHdfcPayment(self, merchantPaymentId):"""Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised.Parameters:- merchantPaymentId"""self.send_initializeHdfcPayment(merchantPaymentId)return self.recv_initializeHdfcPayment()def send_initializeHdfcPayment(self, merchantPaymentId):self._oprot.writeMessageBegin('initializeHdfcPayment', TMessageType.CALL, self._seqid)args = initializeHdfcPayment_args()args.merchantPaymentId = merchantPaymentIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_initializeHdfcPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = initializeHdfcPayment_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, "initializeHdfcPayment failed: unknown result");def createRefund(self, orderId, merchantTxnId, amount):"""Create a refund of the given amount corresponding to the given order to be processed through the samepayment gateway which processed the payment for the corresponding transaction.Returns the id of the newly created Refund.Parameters:- orderId- merchantTxnId- amount"""self.send_createRefund(orderId, merchantTxnId, amount)return self.recv_createRefund()def send_createRefund(self, orderId, merchantTxnId, amount):self._oprot.writeMessageBegin('createRefund', TMessageType.CALL, self._seqid)args = createRefund_args()args.orderId = orderIdargs.merchantTxnId = merchantTxnIdargs.amount = amountargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_createRefund(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = createRefund_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, "createRefund 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_getSuccessfulPaymentsAmountRangeself._processMap["updateAndCaptureEbsPayment"] = Processor.process_updateAndCaptureEbsPaymentself._processMap["captureEbsPayment"] = Processor.process_captureEbsPaymentself._processMap["captureHdfcPayment"] = Processor.process_captureHdfcPaymentself._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPaymentself._processMap["createRefund"] = Processor.process_createRefunddef 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()def process_updateAndCaptureEbsPayment(self, seqid, iprot, oprot):args = updateAndCaptureEbsPayment_args()args.read(iprot)iprot.readMessageEnd()result = updateAndCaptureEbsPayment_result()try:result.success = self._handler.updateAndCaptureEbsPayment(args.paymentParams)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("updateAndCaptureEbsPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_captureEbsPayment(self, seqid, iprot, oprot):args = captureEbsPayment_args()args.read(iprot)iprot.readMessageEnd()result = captureEbsPayment_result()try:result.success = self._handler.captureEbsPayment(args.merchantPaymentId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("captureEbsPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_captureHdfcPayment(self, seqid, iprot, oprot):args = captureHdfcPayment_args()args.read(iprot)iprot.readMessageEnd()result = captureHdfcPayment_result()try:result.success = self._handler.captureHdfcPayment(args.merchantPaymentId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("captureHdfcPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_initializeHdfcPayment(self, seqid, iprot, oprot):args = initializeHdfcPayment_args()args.read(iprot)iprot.readMessageEnd()result = initializeHdfcPayment_result()try:result.success = self._handler.initializeHdfcPayment(args.merchantPaymentId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("initializeHdfcPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_createRefund(self, seqid, iprot, oprot):args = createRefund_args()args.read(iprot)iprot.readMessageEnd()result = createRefund_result()try:result.success = self._handler.createRefund(args.orderId, args.merchantTxnId, args.amount)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("createRefund", 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 = [](_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('getPaymentsForUser_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 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 = [](_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('getPayments_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 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 = [](_etype38, _size35) = iprot.readListBegin()for _i39 in xrange(_size35):_elem40 = Payment()_elem40.read(iprot)self.success.append(_elem40)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 iter41 in self.success:iter41.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 = [](_etype45, _size42) = iprot.readListBegin()for _i46 in xrange(_size42):_elem47 = Attribute()_elem47.read(iprot)self.attributes.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('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 iter48 in self.attributes:iter48.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 = [](_etype52, _size49) = iprot.readListBegin()for _i53 in xrange(_size49):_elem54 = iprot.readDouble();self.success.append(_elem54)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 iter55 in self.success:oprot.writeDouble(iter55)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 updateAndCaptureEbsPayment_args:"""Attributes:- paymentParams"""thrift_spec = (None, # 0(1, TType.MAP, 'paymentParams', (TType.STRING,None,TType.STRING,None), None, ), # 1)def __init__(self, paymentParams=None,):self.paymentParams = paymentParamsdef 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.MAP:self.paymentParams = {}(_ktype57, _vtype58, _size56 ) = iprot.readMapBegin()for _i60 in xrange(_size56):_key61 = iprot.readString();_val62 = iprot.readString();self.paymentParams[_key61] = _val62iprot.readMapEnd()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('updateAndCaptureEbsPayment_args')if self.paymentParams != None:oprot.writeFieldBegin('paymentParams', TType.MAP, 1)oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.paymentParams))for kiter63,viter64 in self.paymentParams.items():oprot.writeString(kiter63)oprot.writeString(viter64)oprot.writeMapEnd()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 updateAndCaptureEbsPayment_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('updateAndCaptureEbsPayment_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 captureEbsPayment_args:"""Attributes:- merchantPaymentId"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1)def __init__(self, merchantPaymentId=None,):self.merchantPaymentId = merchantPaymentIddef 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.merchantPaymentId = 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('captureEbsPayment_args')if self.merchantPaymentId != None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)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 captureEbsPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,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.MAP:self.success = {}(_ktype66, _vtype67, _size65 ) = iprot.readMapBegin()for _i69 in xrange(_size65):_key70 = iprot.readString();_val71 = iprot.readString();self.success[_key70] = _val71iprot.readMapEnd()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('captureEbsPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.MAP, 0)oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))for kiter72,viter73 in self.success.items():oprot.writeString(kiter72)oprot.writeString(viter73)oprot.writeMapEnd()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 captureHdfcPayment_args:"""Attributes:- merchantPaymentId"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1)def __init__(self, merchantPaymentId=None,):self.merchantPaymentId = merchantPaymentIddef 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.merchantPaymentId = 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('captureHdfcPayment_args')if self.merchantPaymentId != None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)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 captureHdfcPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,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.MAP:self.success = {}(_ktype75, _vtype76, _size74 ) = iprot.readMapBegin()for _i78 in xrange(_size74):_key79 = iprot.readString();_val80 = iprot.readString();self.success[_key79] = _val80iprot.readMapEnd()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('captureHdfcPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.MAP, 0)oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))for kiter81,viter82 in self.success.items():oprot.writeString(kiter81)oprot.writeString(viter82)oprot.writeMapEnd()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 initializeHdfcPayment_args:"""Attributes:- merchantPaymentId"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1)def __init__(self, merchantPaymentId=None,):self.merchantPaymentId = merchantPaymentIddef 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.merchantPaymentId = 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('initializeHdfcPayment_args')if self.merchantPaymentId != None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)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 initializeHdfcPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.STRING, '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.STRING:self.success = iprot.readString();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('initializeHdfcPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRING, 0)oprot.writeString(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 createRefund_args:"""Attributes:- orderId- merchantTxnId- amount"""thrift_spec = (None, # 0(1, TType.I64, 'orderId', None, None, ), # 1(2, TType.I64, 'merchantTxnId', None, None, ), # 2(3, TType.DOUBLE, 'amount', None, None, ), # 3)def __init__(self, orderId=None, merchantTxnId=None, amount=None,):self.orderId = orderIdself.merchantTxnId = merchantTxnIdself.amount = amountdef 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.orderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.merchantTxnId = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.DOUBLE:self.amount = iprot.readDouble();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('createRefund_args')if self.orderId != None:oprot.writeFieldBegin('orderId', TType.I64, 1)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.merchantTxnId != None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 2)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.amount != None:oprot.writeFieldBegin('amount', TType.DOUBLE, 3)oprot.writeDouble(self.amount)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 createRefund_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('createRefund_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)