Rev 8914 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
## Autogenerated by Thrift Compiler (0.7.0)## DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING#from thrift.Thrift import *import shop2020.thriftpy.generic.GenericServicefrom ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocol, TProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface(shop2020.thriftpy.generic.GenericService.Iface):def createPayment(self, userId, amount, gatewayId, txnId, isDigital):"""create a new payment and return payment id, throws an exception if gateway is not activeParameters:- userId- amount- gatewayId- txnId- isDigital"""passdef getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):"""Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.Parameters:- userId- fromTime- toTime- status- gatewayId"""passdef getPayments(self, fromTime, toTime, status, gatewayId):"""Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.Parameters:- fromTime- toTime- status- gatewayId"""passdef getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):"""Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.Parameters:- fromTime- toTime- gatewayId"""passdef getPaymentGateway(self, id):"""Get the gateway for the given id.Parameters:- id"""passdef getActivePaymentGateways(self, ):"""Get all active Payment Gateways"""passdef getPayment(self, id):"""Get a particular payment infoParameters:- id"""passdef getPaymentForTxnId(self, txnId):"""Get payments for a transaction. Will raise exception.Parameters:- txnId"""passdef getPaymentForRechargeTxnId(self, txnId):"""Get payments for a recharge transaction id. Will raise exception.Parameters:- txnId"""passdef getSuccessfulPaymentForTxnId(self, txnId):"""Get successful 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 initializeHdfcPayment(self, merchantPaymentId, isMobile):"""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- isMobile"""passdef doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone, isMobile):"""Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.Parameters:- merchantPaymentId- rechargeOrderId- phone- isMobile"""passdef initializeHdfcEmiPayment(self, merchantPaymentId, isMobile):"""Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised.Parameters:- merchantPaymentId- isMobile"""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"""passdef capturePayment(self, merchantTxnId, isDigital):"""Capture the payment for the given merchant transaction id. It processes the last payment for the giventransaction. If the capture attempt failed, the payment is marked as failed. PaymentException with errorcode 104 is thrown in case no payments are found for the transaction id passed. PaymentException is alsothrown with error code 106 in case capture was not possible due to connectionissue.Parameters:- merchantTxnId- isDigital"""passdef refundPayment(self, merchantTxnId, amount, isDigital):"""Refund the payment for the given merchant transaction id. It processes the last payment for the giventransaction. If refund will be failed nothing will be updated in database.Parameters:- merchantTxnId- amount- isDigital"""passdef partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):"""Adds the given amount to the captured amount of a COD payment.Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.Also sets the name of the entity which transferred the money, the date on which it was transferredand the corresponding transaction id.Returns false if the payment couldn't be captured.Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.Parameters:- merchantTxnId- amount- xferBy- xferTxnId- xferDate"""passdef getPaymentsRequiringExtraProcessing(self, category):"""Returns the list of payments that require some extra processing andwhich belong to a particular category. This is currently used by CRMapplication.Parameters:- category"""passdef markPaymentAsProcessed(self, paymentId, category):"""Marks a particular payment as processed for a particular cateogory.It essentially deletes the payment if it is processed for a particularcategory. This is currently used by CRM application.Parameters:- paymentId- category"""passdef getPaymentStatusAtGateway(self, merchantTxnId, amount, isDigital):"""Parameters:- merchantTxnId- amount- isDigital"""passclass Client(shop2020.thriftpy.generic.GenericService.Client, Iface):def __init__(self, iprot, oprot=None):shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)def createPayment(self, userId, amount, gatewayId, txnId, isDigital):"""create a new payment and return payment id, throws an exception if gateway is not activeParameters:- userId- amount- gatewayId- txnId- isDigital"""self.send_createPayment(userId, amount, gatewayId, txnId, isDigital)return self.recv_createPayment()def send_createPayment(self, userId, amount, gatewayId, txnId, isDigital):self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)args = createPayment_args()args.userId = userIdargs.amount = amountargs.gatewayId = gatewayIdargs.txnId = txnIdargs.isDigital = isDigitalargs.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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");def getPaymentsForUser(self, userId, fromTime, toTime, status, gatewayId):"""Get all payments for user. If status and gateway are null, they are 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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");def getPayments(self, fromTime, toTime, status, gatewayId):"""Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");def getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):"""Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.Parameters:- fromTime- toTime- gatewayId"""self.send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId)return self.recv_getPaymentsByCapturedDate()def send_getPaymentsByCapturedDate(self, fromTime, toTime, gatewayId):self._oprot.writeMessageBegin('getPaymentsByCapturedDate', TMessageType.CALL, self._seqid)args = getPaymentsByCapturedDate_args()args.fromTime = fromTimeargs.toTime = toTimeargs.gatewayId = gatewayIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentsByCapturedDate(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentsByCapturedDate_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");def getPaymentGateway(self, id):"""Get the gateway for the given id.Parameters:- 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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");def getActivePaymentGateways(self, ):"""Get all active Payment Gateways"""self.send_getActivePaymentGateways()return self.recv_getActivePaymentGateways()def send_getActivePaymentGateways(self, ):self._oprot.writeMessageBegin('getActivePaymentGateways', TMessageType.CALL, self._seqid)args = getActivePaymentGateways_args()args.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getActivePaymentGateways(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getActivePaymentGateways_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getActivePaymentGateways 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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");def getPaymentForTxnId(self, txnId):"""Get payments 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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");def getPaymentForRechargeTxnId(self, txnId):"""Get payments for a recharge transaction id. Will raise exception.Parameters:- txnId"""self.send_getPaymentForRechargeTxnId(txnId)return self.recv_getPaymentForRechargeTxnId()def send_getPaymentForRechargeTxnId(self, txnId):self._oprot.writeMessageBegin('getPaymentForRechargeTxnId', TMessageType.CALL, self._seqid)args = getPaymentForRechargeTxnId_args()args.txnId = txnIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentForRechargeTxnId(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentForRechargeTxnId_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForRechargeTxnId failed: unknown result");def getSuccessfulPaymentForTxnId(self, txnId):"""Get successful payment for a transaction. Will raise exception.Parameters:- txnId"""self.send_getSuccessfulPaymentForTxnId(txnId)return self.recv_getSuccessfulPaymentForTxnId()def send_getSuccessfulPaymentForTxnId(self, txnId):self._oprot.writeMessageBegin('getSuccessfulPaymentForTxnId', TMessageType.CALL, self._seqid)args = getSuccessfulPaymentForTxnId_args()args.txnId = txnIdargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getSuccessfulPaymentForTxnId(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getSuccessfulPaymentForTxnId_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentForTxnId 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 is not None:return result.successif result.pe is not 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 is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");def initializeHdfcPayment(self, merchantPaymentId, isMobile):"""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- isMobile"""self.send_initializeHdfcPayment(merchantPaymentId, isMobile)return self.recv_initializeHdfcPayment()def send_initializeHdfcPayment(self, merchantPaymentId, isMobile):self._oprot.writeMessageBegin('initializeHdfcPayment', TMessageType.CALL, self._seqid)args = initializeHdfcPayment_args()args.merchantPaymentId = merchantPaymentIdargs.isMobile = isMobileargs.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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");def doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone, isMobile):"""Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.Parameters:- merchantPaymentId- rechargeOrderId- phone- isMobile"""self.send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId, phone, isMobile)return self.recv_doHdfcPaymentForDigitalOrder()def send_doHdfcPaymentForDigitalOrder(self, merchantPaymentId, rechargeOrderId, phone, isMobile):self._oprot.writeMessageBegin('doHdfcPaymentForDigitalOrder', TMessageType.CALL, self._seqid)args = doHdfcPaymentForDigitalOrder_args()args.merchantPaymentId = merchantPaymentIdargs.rechargeOrderId = rechargeOrderIdargs.phone = phoneargs.isMobile = isMobileargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_doHdfcPaymentForDigitalOrder(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = doHdfcPaymentForDigitalOrder_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "doHdfcPaymentForDigitalOrder failed: unknown result");def initializeHdfcEmiPayment(self, merchantPaymentId, isMobile):"""Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.In case of any processing error, an exception is raised.Parameters:- merchantPaymentId- isMobile"""self.send_initializeHdfcEmiPayment(merchantPaymentId, isMobile)return self.recv_initializeHdfcEmiPayment()def send_initializeHdfcEmiPayment(self, merchantPaymentId, isMobile):self._oprot.writeMessageBegin('initializeHdfcEmiPayment', TMessageType.CALL, self._seqid)args = initializeHdfcEmiPayment_args()args.merchantPaymentId = merchantPaymentIdargs.isMobile = isMobileargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_initializeHdfcEmiPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = initializeHdfcEmiPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment 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 is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");def capturePayment(self, merchantTxnId, isDigital):"""Capture the payment for the given merchant transaction id. It processes the last payment for the giventransaction. If the capture attempt failed, the payment is marked as failed. PaymentException with errorcode 104 is thrown in case no payments are found for the transaction id passed. PaymentException is alsothrown with error code 106 in case capture was not possible due to connectionissue.Parameters:- merchantTxnId- isDigital"""self.send_capturePayment(merchantTxnId, isDigital)return self.recv_capturePayment()def send_capturePayment(self, merchantTxnId, isDigital):self._oprot.writeMessageBegin('capturePayment', TMessageType.CALL, self._seqid)args = capturePayment_args()args.merchantTxnId = merchantTxnIdargs.isDigital = isDigitalargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_capturePayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = capturePayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");def refundPayment(self, merchantTxnId, amount, isDigital):"""Refund the payment for the given merchant transaction id. It processes the last payment for the giventransaction. If refund will be failed nothing will be updated in database.Parameters:- merchantTxnId- amount- isDigital"""self.send_refundPayment(merchantTxnId, amount, isDigital)return self.recv_refundPayment()def send_refundPayment(self, merchantTxnId, amount, isDigital):self._oprot.writeMessageBegin('refundPayment', TMessageType.CALL, self._seqid)args = refundPayment_args()args.merchantTxnId = merchantTxnIdargs.amount = amountargs.isDigital = isDigitalargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_refundPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = refundPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "refundPayment failed: unknown result");def partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):"""Adds the given amount to the captured amount of a COD payment.Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.Also sets the name of the entity which transferred the money, the date on which it was transferredand the corresponding transaction id.Returns false if the payment couldn't be captured.Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.Parameters:- merchantTxnId- amount- xferBy- xferTxnId- xferDate"""self.send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate)return self.recv_partiallyCapturePayment()def send_partiallyCapturePayment(self, merchantTxnId, amount, xferBy, xferTxnId, xferDate):self._oprot.writeMessageBegin('partiallyCapturePayment', TMessageType.CALL, self._seqid)args = partiallyCapturePayment_args()args.merchantTxnId = merchantTxnIdargs.amount = amountargs.xferBy = xferByargs.xferTxnId = xferTxnIdargs.xferDate = xferDateargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_partiallyCapturePayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = partiallyCapturePayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");def getPaymentsRequiringExtraProcessing(self, category):"""Returns the list of payments that require some extra processing andwhich belong to a particular category. This is currently used by CRMapplication.Parameters:- category"""self.send_getPaymentsRequiringExtraProcessing(category)return self.recv_getPaymentsRequiringExtraProcessing()def send_getPaymentsRequiringExtraProcessing(self, category):self._oprot.writeMessageBegin('getPaymentsRequiringExtraProcessing', TMessageType.CALL, self._seqid)args = getPaymentsRequiringExtraProcessing_args()args.category = categoryargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentsRequiringExtraProcessing(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentsRequiringExtraProcessing_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");def markPaymentAsProcessed(self, paymentId, category):"""Marks a particular payment as processed for a particular cateogory.It essentially deletes the payment if it is processed for a particularcategory. This is currently used by CRM application.Parameters:- paymentId- category"""self.send_markPaymentAsProcessed(paymentId, category)self.recv_markPaymentAsProcessed()def send_markPaymentAsProcessed(self, paymentId, category):self._oprot.writeMessageBegin('markPaymentAsProcessed', TMessageType.CALL, self._seqid)args = markPaymentAsProcessed_args()args.paymentId = paymentIdargs.category = categoryargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_markPaymentAsProcessed(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = markPaymentAsProcessed_result()result.read(self._iprot)self._iprot.readMessageEnd()returndef getPaymentStatusAtGateway(self, merchantTxnId, amount, isDigital):"""Parameters:- merchantTxnId- amount- isDigital"""self.send_getPaymentStatusAtGateway(merchantTxnId, amount, isDigital)return self.recv_getPaymentStatusAtGateway()def send_getPaymentStatusAtGateway(self, merchantTxnId, amount, isDigital):self._oprot.writeMessageBegin('getPaymentStatusAtGateway', TMessageType.CALL, self._seqid)args = getPaymentStatusAtGateway_args()args.merchantTxnId = merchantTxnIdargs.amount = amountargs.isDigital = isDigitalargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentStatusAtGateway(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentStatusAtGateway_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.pe is not None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentStatusAtGateway failed: unknown result");class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):def __init__(self, handler):shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)self._processMap["createPayment"] = Processor.process_createPaymentself._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUserself._processMap["getPayments"] = Processor.process_getPaymentsself._processMap["getPaymentsByCapturedDate"] = Processor.process_getPaymentsByCapturedDateself._processMap["getPaymentGateway"] = Processor.process_getPaymentGatewayself._processMap["getActivePaymentGateways"] = Processor.process_getActivePaymentGatewaysself._processMap["getPayment"] = Processor.process_getPaymentself._processMap["getPaymentForTxnId"] = Processor.process_getPaymentForTxnIdself._processMap["getPaymentForRechargeTxnId"] = Processor.process_getPaymentForRechargeTxnIdself._processMap["getSuccessfulPaymentForTxnId"] = Processor.process_getSuccessfulPaymentForTxnIdself._processMap["updatePaymentDetails"] = Processor.process_updatePaymentDetailsself._processMap["getSuccessfulPaymentsAmountRange"] = Processor.process_getSuccessfulPaymentsAmountRangeself._processMap["initializeHdfcPayment"] = Processor.process_initializeHdfcPaymentself._processMap["doHdfcPaymentForDigitalOrder"] = Processor.process_doHdfcPaymentForDigitalOrderself._processMap["initializeHdfcEmiPayment"] = Processor.process_initializeHdfcEmiPaymentself._processMap["createRefund"] = Processor.process_createRefundself._processMap["capturePayment"] = Processor.process_capturePaymentself._processMap["refundPayment"] = Processor.process_refundPaymentself._processMap["partiallyCapturePayment"] = Processor.process_partiallyCapturePaymentself._processMap["getPaymentsRequiringExtraProcessing"] = Processor.process_getPaymentsRequiringExtraProcessingself._processMap["markPaymentAsProcessed"] = Processor.process_markPaymentAsProcessedself._processMap["getPaymentStatusAtGateway"] = Processor.process_getPaymentStatusAtGatewaydef 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_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, args.isDigital)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_getPaymentsByCapturedDate(self, seqid, iprot, oprot):args = getPaymentsByCapturedDate_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentsByCapturedDate_result()try:result.success = self._handler.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentsByCapturedDate", 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_getActivePaymentGateways(self, seqid, iprot, oprot):args = getActivePaymentGateways_args()args.read(iprot)iprot.readMessageEnd()result = getActivePaymentGateways_result()try:result.success = self._handler.getActivePaymentGateways()except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getActivePaymentGateways", 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_getPaymentForRechargeTxnId(self, seqid, iprot, oprot):args = getPaymentForRechargeTxnId_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentForRechargeTxnId_result()try:result.success = self._handler.getPaymentForRechargeTxnId(args.txnId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentForRechargeTxnId", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getSuccessfulPaymentForTxnId(self, seqid, iprot, oprot):args = getSuccessfulPaymentForTxnId_args()args.read(iprot)iprot.readMessageEnd()result = getSuccessfulPaymentForTxnId_result()try:result.success = self._handler.getSuccessfulPaymentForTxnId(args.txnId)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getSuccessfulPaymentForTxnId", 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_initializeHdfcPayment(self, seqid, iprot, oprot):args = initializeHdfcPayment_args()args.read(iprot)iprot.readMessageEnd()result = initializeHdfcPayment_result()try:result.success = self._handler.initializeHdfcPayment(args.merchantPaymentId, args.isMobile)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("initializeHdfcPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_doHdfcPaymentForDigitalOrder(self, seqid, iprot, oprot):args = doHdfcPaymentForDigitalOrder_args()args.read(iprot)iprot.readMessageEnd()result = doHdfcPaymentForDigitalOrder_result()try:result.success = self._handler.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId, args.phone, args.isMobile)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("doHdfcPaymentForDigitalOrder", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_initializeHdfcEmiPayment(self, seqid, iprot, oprot):args = initializeHdfcEmiPayment_args()args.read(iprot)iprot.readMessageEnd()result = initializeHdfcEmiPayment_result()try:result.success = self._handler.initializeHdfcEmiPayment(args.merchantPaymentId, args.isMobile)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("initializeHdfcEmiPayment", 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()def process_capturePayment(self, seqid, iprot, oprot):args = capturePayment_args()args.read(iprot)iprot.readMessageEnd()result = capturePayment_result()try:result.success = self._handler.capturePayment(args.merchantTxnId, args.isDigital)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("capturePayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_refundPayment(self, seqid, iprot, oprot):args = refundPayment_args()args.read(iprot)iprot.readMessageEnd()result = refundPayment_result()try:result.success = self._handler.refundPayment(args.merchantTxnId, args.amount, args.isDigital)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("refundPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_partiallyCapturePayment(self, seqid, iprot, oprot):args = partiallyCapturePayment_args()args.read(iprot)iprot.readMessageEnd()result = partiallyCapturePayment_result()try:result.success = self._handler.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("partiallyCapturePayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentsRequiringExtraProcessing(self, seqid, iprot, oprot):args = getPaymentsRequiringExtraProcessing_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentsRequiringExtraProcessing_result()result.success = self._handler.getPaymentsRequiringExtraProcessing(args.category)oprot.writeMessageBegin("getPaymentsRequiringExtraProcessing", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_markPaymentAsProcessed(self, seqid, iprot, oprot):args = markPaymentAsProcessed_args()args.read(iprot)iprot.readMessageEnd()result = markPaymentAsProcessed_result()self._handler.markPaymentAsProcessed(args.paymentId, args.category)oprot.writeMessageBegin("markPaymentAsProcessed", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentStatusAtGateway(self, seqid, iprot, oprot):args = getPaymentStatusAtGateway_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentStatusAtGateway_result()try:result.success = self._handler.getPaymentStatusAtGateway(args.merchantTxnId, args.amount, args.isDigital)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentStatusAtGateway", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass createPayment_args:"""Attributes:- userId- amount- gatewayId- txnId- isDigital"""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(5, TType.BOOL, 'isDigital', None, None, ), # 5)def __init__(self, userId=None, amount=None, gatewayId=None, txnId=None, isDigital=None,):self.userId = userIdself.amount = amountself.gatewayId = gatewayIdself.txnId = txnIdself.isDigital = isDigitaldef 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)elif fid == 5:if ftype == TType.BOOL:self.isDigital = iprot.readBool();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 is not None:oprot.writeFieldBegin('userId', TType.I64, 1)oprot.writeI64(self.userId)oprot.writeFieldEnd()if self.amount is not None:oprot.writeFieldBegin('amount', TType.DOUBLE, 2)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.gatewayId is not None:oprot.writeFieldBegin('gatewayId', TType.I64, 3)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()if self.txnId is not None:oprot.writeFieldBegin('txnId', TType.I64, 4)oprot.writeI64(self.txnId)oprot.writeFieldEnd()if self.isDigital is not None:oprot.writeFieldBegin('isDigital', TType.BOOL, 5)oprot.writeBool(self.isDigital)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.I64, 0)oprot.writeI64(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('userId', TType.I64, 1)oprot.writeI64(self.userId)oprot.writeFieldEnd()if self.fromTime is not None:oprot.writeFieldBegin('fromTime', TType.I64, 2)oprot.writeI64(self.fromTime)oprot.writeFieldEnd()if self.toTime is not None:oprot.writeFieldBegin('toTime', TType.I64, 3)oprot.writeI64(self.toTime)oprot.writeFieldEnd()if self.status is not None:oprot.writeFieldBegin('status', TType.I32, 4)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayId is not None:oprot.writeFieldBegin('gatewayId', TType.I64, 5)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not 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 is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('fromTime', TType.I64, 1)oprot.writeI64(self.fromTime)oprot.writeFieldEnd()if self.toTime is not None:oprot.writeFieldBegin('toTime', TType.I64, 2)oprot.writeI64(self.toTime)oprot.writeFieldEnd()if self.status is not None:oprot.writeFieldBegin('status', TType.I32, 3)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayId is not None:oprot.writeFieldBegin('gatewayId', TType.I64, 4)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not 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 is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentsByCapturedDate_args:"""Attributes:- fromTime- toTime- gatewayId"""thrift_spec = (None, # 0(1, TType.I64, 'fromTime', None, None, ), # 1(2, TType.I64, 'toTime', None, None, ), # 2(3, TType.I64, 'gatewayId', None, None, ), # 3)def __init__(self, fromTime=None, toTime=None, gatewayId=None,):self.fromTime = fromTimeself.toTime = toTimeself.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.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('getPaymentsByCapturedDate_args')if self.fromTime is not None:oprot.writeFieldBegin('fromTime', TType.I64, 1)oprot.writeI64(self.fromTime)oprot.writeFieldEnd()if self.toTime is not None:oprot.writeFieldBegin('toTime', TType.I64, 2)oprot.writeI64(self.toTime)oprot.writeFieldEnd()if self.gatewayId is not None:oprot.writeFieldBegin('gatewayId', TType.I64, 3)oprot.writeI64(self.gatewayId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentsByCapturedDate_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('getPaymentsByCapturedDate_result')if self.success is not 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 is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getActivePaymentGateways_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('getActivePaymentGateways_args')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getActivePaymentGateways_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(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.LIST:self.success = [](_etype45, _size42) = iprot.readListBegin()for _i46 in xrange(_size42):_elem47 = PaymentGateway()_elem47.read(iprot)self.success.append(_elem47)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('getActivePaymentGateways_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter48 in self.success:iter48.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('txnId', TType.I64, 1)oprot.writeI64(self.txnId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 = [](_etype52, _size49) = iprot.readListBegin()for _i53 in xrange(_size49):_elem54 = Payment()_elem54.read(iprot)self.success.append(_elem54)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 is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter55 in self.success:iter55.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentForRechargeTxnId_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('getPaymentForRechargeTxnId_args')if self.txnId is not None:oprot.writeFieldBegin('txnId', TType.I64, 1)oprot.writeI64(self.txnId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentForRechargeTxnId_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 = [](_etype59, _size56) = iprot.readListBegin()for _i60 in xrange(_size56):_elem61 = Payment()_elem61.read(iprot)self.success.append(_elem61)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('getPaymentForRechargeTxnId_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter62 in self.success:iter62.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getSuccessfulPaymentForTxnId_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('getSuccessfulPaymentForTxnId_args')if self.txnId is not None:oprot.writeFieldBegin('txnId', TType.I64, 1)oprot.writeI64(self.txnId)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getSuccessfulPaymentForTxnId_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('getSuccessfulPaymentForTxnId_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 = [](_etype66, _size63) = iprot.readListBegin()for _i67 in xrange(_size63):_elem68 = Attribute()_elem68.read(iprot)self.attributes.append(_elem68)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 is not None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.gatewayPaymentId is not None:oprot.writeFieldBegin('gatewayPaymentId', TType.STRING, 2)oprot.writeString(self.gatewayPaymentId)oprot.writeFieldEnd()if self.sessionId is not None:oprot.writeFieldBegin('sessionId', TType.STRING, 3)oprot.writeString(self.sessionId)oprot.writeFieldEnd()if self.gatewayTxnStatus is not None:oprot.writeFieldBegin('gatewayTxnStatus', TType.STRING, 4)oprot.writeString(self.gatewayTxnStatus)oprot.writeFieldEnd()if self.description is not None:oprot.writeFieldBegin('description', TType.STRING, 5)oprot.writeString(self.description)oprot.writeFieldEnd()if self.gatewayTxnId is not None:oprot.writeFieldBegin('gatewayTxnId', TType.STRING, 6)oprot.writeString(self.gatewayTxnId)oprot.writeFieldEnd()if self.authCode is not None:oprot.writeFieldBegin('authCode', TType.STRING, 7)oprot.writeString(self.authCode)oprot.writeFieldEnd()if self.referenceCode is not None:oprot.writeFieldBegin('referenceCode', TType.STRING, 8)oprot.writeString(self.referenceCode)oprot.writeFieldEnd()if self.errorCode is not None:oprot.writeFieldBegin('errorCode', TType.STRING, 9)oprot.writeString(self.errorCode)oprot.writeFieldEnd()if self.status is not None:oprot.writeFieldBegin('status', TType.I32, 10)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gatewayTxnDate is not None:oprot.writeFieldBegin('gatewayTxnDate', TType.STRING, 11)oprot.writeString(self.gatewayTxnDate)oprot.writeFieldEnd()if self.attributes is not None:oprot.writeFieldBegin('attributes', TType.LIST, 12)oprot.writeListBegin(TType.STRUCT, len(self.attributes))for iter69 in self.attributes:iter69.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 validate(self):returndef __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 = [](_etype73, _size70) = iprot.readListBegin()for _i74 in xrange(_size70):_elem75 = iprot.readDouble();self.success.append(_elem75)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 is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.DOUBLE, len(self.success))for iter76 in self.success:oprot.writeDouble(iter76)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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- isMobile"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1(2, TType.BOOL, 'isMobile', None, None, ), # 2)def __init__(self, merchantPaymentId=None, isMobile=None,):self.merchantPaymentId = merchantPaymentIdself.isMobile = isMobiledef 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)elif fid == 2:if ftype == TType.BOOL:self.isMobile = iprot.readBool();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 is not None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)oprot.writeFieldEnd()if self.isMobile is not None:oprot.writeFieldBegin('isMobile', TType.BOOL, 2)oprot.writeBool(self.isMobile)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.STRING, 0)oprot.writeString(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 doHdfcPaymentForDigitalOrder_args:"""Attributes:- merchantPaymentId- rechargeOrderId- phone- isMobile"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1(2, TType.I64, 'rechargeOrderId', None, None, ), # 2(3, TType.STRING, 'phone', None, None, ), # 3(4, TType.BOOL, 'isMobile', None, None, ), # 4)def __init__(self, merchantPaymentId=None, rechargeOrderId=None, phone=None, isMobile=None,):self.merchantPaymentId = merchantPaymentIdself.rechargeOrderId = rechargeOrderIdself.phone = phoneself.isMobile = isMobiledef 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)elif fid == 2:if ftype == TType.I64:self.rechargeOrderId = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.STRING:self.phone = iprot.readString();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.BOOL:self.isMobile = iprot.readBool();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('doHdfcPaymentForDigitalOrder_args')if self.merchantPaymentId is not None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)oprot.writeFieldEnd()if self.rechargeOrderId is not None:oprot.writeFieldBegin('rechargeOrderId', TType.I64, 2)oprot.writeI64(self.rechargeOrderId)oprot.writeFieldEnd()if self.phone is not None:oprot.writeFieldBegin('phone', TType.STRING, 3)oprot.writeString(self.phone)oprot.writeFieldEnd()if self.isMobile is not None:oprot.writeFieldBegin('isMobile', TType.BOOL, 4)oprot.writeBool(self.isMobile)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 doHdfcPaymentForDigitalOrder_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('doHdfcPaymentForDigitalOrder_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRING, 0)oprot.writeString(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 initializeHdfcEmiPayment_args:"""Attributes:- merchantPaymentId- isMobile"""thrift_spec = (None, # 0(1, TType.I64, 'merchantPaymentId', None, None, ), # 1(2, TType.BOOL, 'isMobile', None, None, ), # 2)def __init__(self, merchantPaymentId=None, isMobile=None,):self.merchantPaymentId = merchantPaymentIdself.isMobile = isMobiledef 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)elif fid == 2:if ftype == TType.BOOL:self.isMobile = iprot.readBool();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('initializeHdfcEmiPayment_args')if self.merchantPaymentId is not None:oprot.writeFieldBegin('merchantPaymentId', TType.I64, 1)oprot.writeI64(self.merchantPaymentId)oprot.writeFieldEnd()if self.isMobile is not None:oprot.writeFieldBegin('isMobile', TType.BOOL, 2)oprot.writeBool(self.isMobile)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 initializeHdfcEmiPayment_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('initializeHdfcEmiPayment_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRING, 0)oprot.writeString(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('orderId', TType.I64, 1)oprot.writeI64(self.orderId)oprot.writeFieldEnd()if self.merchantTxnId is not None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 2)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.amount is not None:oprot.writeFieldBegin('amount', TType.DOUBLE, 3)oprot.writeDouble(self.amount)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 is not None:oprot.writeFieldBegin('success', TType.I64, 0)oprot.writeI64(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 capturePayment_args:"""Attributes:- merchantTxnId- isDigital"""thrift_spec = (None, # 0(1, TType.I64, 'merchantTxnId', None, None, ), # 1(2, TType.BOOL, 'isDigital', None, None, ), # 2)def __init__(self, merchantTxnId=None, isDigital=None,):self.merchantTxnId = merchantTxnIdself.isDigital = isDigitaldef 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.merchantTxnId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.BOOL:self.isDigital = iprot.readBool();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('capturePayment_args')if self.merchantTxnId is not None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.isDigital is not None:oprot.writeFieldBegin('isDigital', TType.BOOL, 2)oprot.writeBool(self.isDigital)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 capturePayment_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('capturePayment_result')if self.success is not None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 refundPayment_args:"""Attributes:- merchantTxnId- amount- isDigital"""thrift_spec = (None, # 0(1, TType.I64, 'merchantTxnId', None, None, ), # 1(2, TType.DOUBLE, 'amount', None, None, ), # 2(3, TType.BOOL, 'isDigital', None, None, ), # 3)def __init__(self, merchantTxnId=None, amount=None, isDigital=None,):self.merchantTxnId = merchantTxnIdself.amount = amountself.isDigital = isDigitaldef 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.merchantTxnId = 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.BOOL:self.isDigital = iprot.readBool();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('refundPayment_args')if self.merchantTxnId is not None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.amount is not None:oprot.writeFieldBegin('amount', TType.DOUBLE, 2)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.isDigital is not None:oprot.writeFieldBegin('isDigital', TType.BOOL, 3)oprot.writeBool(self.isDigital)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 refundPayment_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('refundPayment_result')if self.success is not None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 partiallyCapturePayment_args:"""Attributes:- merchantTxnId- amount- xferBy- xferTxnId- xferDate"""thrift_spec = (None, # 0(1, TType.I64, 'merchantTxnId', None, None, ), # 1(2, TType.DOUBLE, 'amount', None, None, ), # 2(3, TType.STRING, 'xferBy', None, None, ), # 3(4, TType.STRING, 'xferTxnId', None, None, ), # 4(5, TType.I64, 'xferDate', None, None, ), # 5)def __init__(self, merchantTxnId=None, amount=None, xferBy=None, xferTxnId=None, xferDate=None,):self.merchantTxnId = merchantTxnIdself.amount = amountself.xferBy = xferByself.xferTxnId = xferTxnIdself.xferDate = xferDatedef 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.merchantTxnId = 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.STRING:self.xferBy = iprot.readString();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.STRING:self.xferTxnId = iprot.readString();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.I64:self.xferDate = 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('partiallyCapturePayment_args')if self.merchantTxnId is not None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.amount is not None:oprot.writeFieldBegin('amount', TType.DOUBLE, 2)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.xferBy is not None:oprot.writeFieldBegin('xferBy', TType.STRING, 3)oprot.writeString(self.xferBy)oprot.writeFieldEnd()if self.xferTxnId is not None:oprot.writeFieldBegin('xferTxnId', TType.STRING, 4)oprot.writeString(self.xferTxnId)oprot.writeFieldEnd()if self.xferDate is not None:oprot.writeFieldBegin('xferDate', TType.I64, 5)oprot.writeI64(self.xferDate)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 partiallyCapturePayment_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('partiallyCapturePayment_result')if self.success is not None:oprot.writeFieldBegin('success', TType.BOOL, 0)oprot.writeBool(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentsRequiringExtraProcessing_args:"""Attributes:- category"""thrift_spec = (None, # 0(1, TType.I32, 'category', None, None, ), # 1)def __init__(self, category=None,):self.category = categorydef 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.I32:self.category = iprot.readI32();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('getPaymentsRequiringExtraProcessing_args')if self.category is not None:oprot.writeFieldBegin('category', TType.I32, 1)oprot.writeI32(self.category)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentsRequiringExtraProcessing_result:"""Attributes:- success"""thrift_spec = ((0, TType.LIST, 'success', (TType.I64,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 = [](_etype80, _size77) = iprot.readListBegin()for _i81 in xrange(_size77):_elem82 = iprot.readI64();self.success.append(_elem82)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('getPaymentsRequiringExtraProcessing_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.I64, len(self.success))for iter83 in self.success:oprot.writeI64(iter83)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 markPaymentAsProcessed_args:"""Attributes:- paymentId- category"""thrift_spec = (None, # 0(1, TType.I64, 'paymentId', None, None, ), # 1(2, TType.I32, 'category', None, None, ), # 2)def __init__(self, paymentId=None, category=None,):self.paymentId = paymentIdself.category = categorydef 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.paymentId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.category = iprot.readI32();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('markPaymentAsProcessed_args')if self.paymentId is not None:oprot.writeFieldBegin('paymentId', TType.I64, 1)oprot.writeI64(self.paymentId)oprot.writeFieldEnd()if self.category is not None:oprot.writeFieldBegin('category', TType.I32, 2)oprot.writeI32(self.category)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 markPaymentAsProcessed_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('markPaymentAsProcessed_result')oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentStatusAtGateway_args:"""Attributes:- merchantTxnId- amount- isDigital"""thrift_spec = (None, # 0(1, TType.I64, 'merchantTxnId', None, None, ), # 1(2, TType.DOUBLE, 'amount', None, None, ), # 2(3, TType.BOOL, 'isDigital', None, None, ), # 3)def __init__(self, merchantTxnId=None, amount=None, isDigital=None,):self.merchantTxnId = merchantTxnIdself.amount = amountself.isDigital = isDigitaldef 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.merchantTxnId = 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.BOOL:self.isDigital = iprot.readBool();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('getPaymentStatusAtGateway_args')if self.merchantTxnId is not None:oprot.writeFieldBegin('merchantTxnId', TType.I64, 1)oprot.writeI64(self.merchantTxnId)oprot.writeFieldEnd()if self.amount is not None:oprot.writeFieldBegin('amount', TType.DOUBLE, 2)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.isDigital is not None:oprot.writeFieldBegin('isDigital', TType.BOOL, 3)oprot.writeBool(self.isDigital)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getPaymentStatusAtGateway_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.I32, '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.I32:self.success = iprot.readI32();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('getPaymentStatusAtGateway_result')if self.success is not None:oprot.writeFieldBegin('success', TType.I32, 0)oprot.writeI32(self.success)oprot.writeFieldEnd()if self.pe is not None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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)