Rev 696 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
## Autogenerated by Thrift## DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING#from thrift.Thrift import *from ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface:def createPayment(self, user_id, cart_id, amount, gateway_id):"""Parameters:- user_id- cart_id- amount- gateway_id"""passdef createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):"""Parameters:- cart_id- application_id- merchant_tx_id- params"""passdef addCallbackUrl(self, application_id, callback_url, updateIfExisting):"""Parameters:- application_id- callback_url- updateIfExisting"""passdef getCallbackUrl(self, application_id):"""Parameters:- application_id"""passdef getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):"""Parameters:- userId- from_time- to_time- status- gateway_id"""passdef getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):"""Parameters:- cartId- from_time- to_time- status- gateway_id"""passdef getPayments(self, from_time, to_time, status, gateway_id):"""Parameters:- from_time- to_time- status- gateway_id"""passdef getPaymentForMerchantId(self, merchant_tx_id):"""Parameters:- merchant_tx_id"""passdef changePaymentStatus(self, id, newStatus):"""Parameters:- id- newStatus"""passdef changePaymentRequestStatus(self, request_id, requestStatus):"""Parameters:- request_id- requestStatus"""passdef getPaymentGateways(self, status):"""Parameters:- status"""passdef getPaymentGateway(self, id):"""Parameters:- id"""passdef changeGatewayStatus(self, id, status):"""Parameters:- id- status"""passdef getPayment(self, id):"""Parameters:- id"""passdef addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):"""Parameters:- id- bid- btxid- error_code- session_id- postdate- auth_code- ref_code"""passclass Client(Iface):def __init__(self, iprot, oprot=None):self._iprot = self._oprot = iprotif oprot != None:self._oprot = oprotself._seqid = 0def createPayment(self, user_id, cart_id, amount, gateway_id):"""Parameters:- user_id- cart_id- amount- gateway_id"""self.send_createPayment(user_id, cart_id, amount, gateway_id)return self.recv_createPayment()def send_createPayment(self, user_id, cart_id, amount, gateway_id):self._oprot.writeMessageBegin('createPayment', TMessageType.CALL, self._seqid)args = createPayment_args()args.user_id = user_idargs.cart_id = cart_idargs.amount = amountargs.gateway_id = gateway_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_createPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = createPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");def createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):"""Parameters:- cart_id- application_id- merchant_tx_id- params"""self.send_createPaymentRequest(cart_id, application_id, merchant_tx_id, params)self.recv_createPaymentRequest()def send_createPaymentRequest(self, cart_id, application_id, merchant_tx_id, params):self._oprot.writeMessageBegin('createPaymentRequest', TMessageType.CALL, self._seqid)args = createPaymentRequest_args()args.cart_id = cart_idargs.application_id = application_idargs.merchant_tx_id = merchant_tx_idargs.params = paramsargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_createPaymentRequest(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = createPaymentRequest_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef addCallbackUrl(self, application_id, callback_url, updateIfExisting):"""Parameters:- application_id- callback_url- updateIfExisting"""self.send_addCallbackUrl(application_id, callback_url, updateIfExisting)self.recv_addCallbackUrl()def send_addCallbackUrl(self, application_id, callback_url, updateIfExisting):self._oprot.writeMessageBegin('addCallbackUrl', TMessageType.CALL, self._seqid)args = addCallbackUrl_args()args.application_id = application_idargs.callback_url = callback_urlargs.updateIfExisting = updateIfExistingargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_addCallbackUrl(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = addCallbackUrl_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef getCallbackUrl(self, application_id):"""Parameters:- application_id"""self.send_getCallbackUrl(application_id)self.recv_getCallbackUrl()def send_getCallbackUrl(self, application_id):self._oprot.writeMessageBegin('getCallbackUrl', TMessageType.CALL, self._seqid)args = getCallbackUrl_args()args.application_id = application_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getCallbackUrl(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getCallbackUrl_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):"""Parameters:- userId- from_time- to_time- status- gateway_id"""self.send_getPaymentsForUser(userId, from_time, to_time, status, gateway_id)return self.recv_getPaymentsForUser()def send_getPaymentsForUser(self, userId, from_time, to_time, status, gateway_id):self._oprot.writeMessageBegin('getPaymentsForUser', TMessageType.CALL, self._seqid)args = getPaymentsForUser_args()args.userId = userIdargs.from_time = from_timeargs.to_time = to_timeargs.status = statusargs.gateway_id = gateway_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentsForUser(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentsForUser_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");def getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):"""Parameters:- cartId- from_time- to_time- status- gateway_id"""self.send_getPaymentsForCart(cartId, from_time, to_time, status, gateway_id)return self.recv_getPaymentsForCart()def send_getPaymentsForCart(self, cartId, from_time, to_time, status, gateway_id):self._oprot.writeMessageBegin('getPaymentsForCart', TMessageType.CALL, self._seqid)args = getPaymentsForCart_args()args.cartId = cartIdargs.from_time = from_timeargs.to_time = to_timeargs.status = statusargs.gateway_id = gateway_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentsForCart(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentsForCart_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForCart failed: unknown result");def getPayments(self, from_time, to_time, status, gateway_id):"""Parameters:- from_time- to_time- status- gateway_id"""self.send_getPayments(from_time, to_time, status, gateway_id)return self.recv_getPayments()def send_getPayments(self, from_time, to_time, status, gateway_id):self._oprot.writeMessageBegin('getPayments', TMessageType.CALL, self._seqid)args = getPayments_args()args.from_time = from_timeargs.to_time = to_timeargs.status = statusargs.gateway_id = gateway_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPayments(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPayments_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");def getPaymentForMerchantId(self, merchant_tx_id):"""Parameters:- merchant_tx_id"""self.send_getPaymentForMerchantId(merchant_tx_id)return self.recv_getPaymentForMerchantId()def send_getPaymentForMerchantId(self, merchant_tx_id):self._oprot.writeMessageBegin('getPaymentForMerchantId', TMessageType.CALL, self._seqid)args = getPaymentForMerchantId_args()args.merchant_tx_id = merchant_tx_idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentForMerchantId(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentForMerchantId_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForMerchantId failed: unknown result");def changePaymentStatus(self, id, newStatus):"""Parameters:- id- newStatus"""self.send_changePaymentStatus(id, newStatus)self.recv_changePaymentStatus()def send_changePaymentStatus(self, id, newStatus):self._oprot.writeMessageBegin('changePaymentStatus', TMessageType.CALL, self._seqid)args = changePaymentStatus_args()args.id = idargs.newStatus = newStatusargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_changePaymentStatus(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = changePaymentStatus_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef changePaymentRequestStatus(self, request_id, requestStatus):"""Parameters:- request_id- requestStatus"""self.send_changePaymentRequestStatus(request_id, requestStatus)self.recv_changePaymentRequestStatus()def send_changePaymentRequestStatus(self, request_id, requestStatus):self._oprot.writeMessageBegin('changePaymentRequestStatus', TMessageType.CALL, self._seqid)args = changePaymentRequestStatus_args()args.request_id = request_idargs.requestStatus = requestStatusargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_changePaymentRequestStatus(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = changePaymentRequestStatus_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef getPaymentGateways(self, status):"""Parameters:- status"""self.send_getPaymentGateways(status)return self.recv_getPaymentGateways()def send_getPaymentGateways(self, status):self._oprot.writeMessageBegin('getPaymentGateways', TMessageType.CALL, self._seqid)args = getPaymentGateways_args()args.status = statusargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPaymentGateways(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPaymentGateways_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateways failed: unknown result");def getPaymentGateway(self, 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 != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");def changeGatewayStatus(self, id, status):"""Parameters:- id- status"""self.send_changeGatewayStatus(id, status)self.recv_changeGatewayStatus()def send_changeGatewayStatus(self, id, status):self._oprot.writeMessageBegin('changeGatewayStatus', TMessageType.CALL, self._seqid)args = changeGatewayStatus_args()args.id = idargs.status = statusargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_changeGatewayStatus(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = changeGatewayStatus_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturndef getPayment(self, id):"""Parameters:- id"""self.send_getPayment(id)return self.recv_getPayment()def send_getPayment(self, id):self._oprot.writeMessageBegin('getPayment', TMessageType.CALL, self._seqid)args = getPayment_args()args.id = idargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getPayment(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getPayment_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success != None:return result.successif result.pe != None:raise result.peraise TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");def addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):"""Parameters:- id- bid- btxid- error_code- session_id- postdate- auth_code- ref_code"""self.send_addBankDetails(id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code)self.recv_addBankDetails()def send_addBankDetails(self, id, bid, btxid, error_code, session_id, postdate, auth_code, ref_code):self._oprot.writeMessageBegin('addBankDetails', TMessageType.CALL, self._seqid)args = addBankDetails_args()args.id = idargs.bid = bidargs.btxid = btxidargs.error_code = error_codeargs.session_id = session_idargs.postdate = postdateargs.auth_code = auth_codeargs.ref_code = ref_codeargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_addBankDetails(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = addBankDetails_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.pe != None:raise result.pereturnclass Processor(Iface, TProcessor):def __init__(self, handler):self._handler = handlerself._processMap = {}self._processMap["createPayment"] = Processor.process_createPaymentself._processMap["createPaymentRequest"] = Processor.process_createPaymentRequestself._processMap["addCallbackUrl"] = Processor.process_addCallbackUrlself._processMap["getCallbackUrl"] = Processor.process_getCallbackUrlself._processMap["getPaymentsForUser"] = Processor.process_getPaymentsForUserself._processMap["getPaymentsForCart"] = Processor.process_getPaymentsForCartself._processMap["getPayments"] = Processor.process_getPaymentsself._processMap["getPaymentForMerchantId"] = Processor.process_getPaymentForMerchantIdself._processMap["changePaymentStatus"] = Processor.process_changePaymentStatusself._processMap["changePaymentRequestStatus"] = Processor.process_changePaymentRequestStatusself._processMap["getPaymentGateways"] = Processor.process_getPaymentGatewaysself._processMap["getPaymentGateway"] = Processor.process_getPaymentGatewayself._processMap["changeGatewayStatus"] = Processor.process_changeGatewayStatusself._processMap["getPayment"] = Processor.process_getPaymentself._processMap["addBankDetails"] = Processor.process_addBankDetailsdef 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.user_id, args.cart_id, args.amount, args.gateway_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("createPayment", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_createPaymentRequest(self, seqid, iprot, oprot):args = createPaymentRequest_args()args.read(iprot)iprot.readMessageEnd()result = createPaymentRequest_result()try:self._handler.createPaymentRequest(args.cart_id, args.application_id, args.merchant_tx_id, args.params)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("createPaymentRequest", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_addCallbackUrl(self, seqid, iprot, oprot):args = addCallbackUrl_args()args.read(iprot)iprot.readMessageEnd()result = addCallbackUrl_result()try:self._handler.addCallbackUrl(args.application_id, args.callback_url, args.updateIfExisting)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("addCallbackUrl", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getCallbackUrl(self, seqid, iprot, oprot):args = getCallbackUrl_args()args.read(iprot)iprot.readMessageEnd()result = getCallbackUrl_result()try:self._handler.getCallbackUrl(args.application_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getCallbackUrl", 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.from_time, args.to_time, args.status, args.gateway_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentsForUser", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentsForCart(self, seqid, iprot, oprot):args = getPaymentsForCart_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentsForCart_result()try:result.success = self._handler.getPaymentsForCart(args.cartId, args.from_time, args.to_time, args.status, args.gateway_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentsForCart", 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.from_time, args.to_time, args.status, args.gateway_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPayments", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentForMerchantId(self, seqid, iprot, oprot):args = getPaymentForMerchantId_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentForMerchantId_result()try:result.success = self._handler.getPaymentForMerchantId(args.merchant_tx_id)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentForMerchantId", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_changePaymentStatus(self, seqid, iprot, oprot):args = changePaymentStatus_args()args.read(iprot)iprot.readMessageEnd()result = changePaymentStatus_result()try:self._handler.changePaymentStatus(args.id, args.newStatus)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("changePaymentStatus", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_changePaymentRequestStatus(self, seqid, iprot, oprot):args = changePaymentRequestStatus_args()args.read(iprot)iprot.readMessageEnd()result = changePaymentRequestStatus_result()try:self._handler.changePaymentRequestStatus(args.request_id, args.requestStatus)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("changePaymentRequestStatus", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getPaymentGateways(self, seqid, iprot, oprot):args = getPaymentGateways_args()args.read(iprot)iprot.readMessageEnd()result = getPaymentGateways_result()try:result.success = self._handler.getPaymentGateways(args.status)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("getPaymentGateways", 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_changeGatewayStatus(self, seqid, iprot, oprot):args = changeGatewayStatus_args()args.read(iprot)iprot.readMessageEnd()result = changeGatewayStatus_result()try:self._handler.changeGatewayStatus(args.id, args.status)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("changeGatewayStatus", 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_addBankDetails(self, seqid, iprot, oprot):args = addBankDetails_args()args.read(iprot)iprot.readMessageEnd()result = addBankDetails_result()try:self._handler.addBankDetails(args.id, args.bid, args.btxid, args.error_code, args.session_id, args.postdate, args.auth_code, args.ref_code)except PaymentException, pe:result.pe = peoprot.writeMessageBegin("addBankDetails", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass createPayment_args:"""Attributes:- user_id- cart_id- amount- gateway_id"""thrift_spec = (None, # 0(1, TType.I64, 'user_id', None, None, ), # 1(2, TType.I64, 'cart_id', None, None, ), # 2(3, TType.DOUBLE, 'amount', None, None, ), # 3(4, TType.I64, 'gateway_id', None, None, ), # 4)def __init__(self, user_id=None, cart_id=None, amount=None, gateway_id=None,):self.user_id = user_idself.cart_id = cart_idself.amount = amountself.gateway_id = gateway_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.user_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.cart_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.DOUBLE:self.amount = iprot.readDouble();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.I64:self.gateway_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('createPayment_args')if self.user_id != None:oprot.writeFieldBegin('user_id', TType.I64, 1)oprot.writeI64(self.user_id)oprot.writeFieldEnd()if self.cart_id != None:oprot.writeFieldBegin('cart_id', TType.I64, 2)oprot.writeI64(self.cart_id)oprot.writeFieldEnd()if self.amount != None:oprot.writeFieldBegin('amount', TType.DOUBLE, 3)oprot.writeDouble(self.amount)oprot.writeFieldEnd()if self.gateway_id != None:oprot.writeFieldBegin('gateway_id', TType.I64, 4)oprot.writeI64(self.gateway_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class createPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.I64, 'success', None, None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.I64:self.success = iprot.readI64();else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('createPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.I64, 0)oprot.writeI64(self.success)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class createPaymentRequest_args:"""Attributes:- cart_id- application_id- merchant_tx_id- params"""thrift_spec = (None, # 0(1, TType.I64, 'cart_id', None, None, ), # 1(2, TType.I64, 'application_id', None, None, ), # 2(3, TType.I64, 'merchant_tx_id', None, None, ), # 3None, # 4(5, TType.LIST, 'params', (TType.STRUCT,(Param, Param.thrift_spec)), None, ), # 5)def __init__(self, cart_id=None, application_id=None, merchant_tx_id=None, params=None,):self.cart_id = cart_idself.application_id = application_idself.merchant_tx_id = merchant_tx_idself.params = paramsdef 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.cart_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.application_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.merchant_tx_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.LIST:self.params = [](_etype28, _size25) = iprot.readListBegin()for _i29 in xrange(_size25):_elem30 = Param()_elem30.read(iprot)self.params.append(_elem30)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('createPaymentRequest_args')if self.cart_id != None:oprot.writeFieldBegin('cart_id', TType.I64, 1)oprot.writeI64(self.cart_id)oprot.writeFieldEnd()if self.application_id != None:oprot.writeFieldBegin('application_id', TType.I64, 2)oprot.writeI64(self.application_id)oprot.writeFieldEnd()if self.merchant_tx_id != None:oprot.writeFieldBegin('merchant_tx_id', TType.I64, 3)oprot.writeI64(self.merchant_tx_id)oprot.writeFieldEnd()if self.params != None:oprot.writeFieldBegin('params', TType.LIST, 5)oprot.writeListBegin(TType.STRUCT, len(self.params))for iter31 in self.params:iter31.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class createPaymentRequest_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('createPaymentRequest_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addCallbackUrl_args:"""Attributes:- application_id- callback_url- updateIfExisting"""thrift_spec = (None, # 0(1, TType.I64, 'application_id', None, None, ), # 1(2, TType.STRING, 'callback_url', None, None, ), # 2(3, TType.BOOL, 'updateIfExisting', None, None, ), # 3)def __init__(self, application_id=None, callback_url=None, updateIfExisting=None,):self.application_id = application_idself.callback_url = callback_urlself.updateIfExisting = updateIfExistingdef 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.application_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.callback_url = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.BOOL:self.updateIfExisting = 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('addCallbackUrl_args')if self.application_id != None:oprot.writeFieldBegin('application_id', TType.I64, 1)oprot.writeI64(self.application_id)oprot.writeFieldEnd()if self.callback_url != None:oprot.writeFieldBegin('callback_url', TType.STRING, 2)oprot.writeString(self.callback_url)oprot.writeFieldEnd()if self.updateIfExisting != None:oprot.writeFieldBegin('updateIfExisting', TType.BOOL, 3)oprot.writeBool(self.updateIfExisting)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addCallbackUrl_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('addCallbackUrl_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getCallbackUrl_args:"""Attributes:- application_id"""thrift_spec = (None, # 0(1, TType.I64, 'application_id', None, None, ), # 1)def __init__(self, application_id=None,):self.application_id = application_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.application_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('getCallbackUrl_args')if self.application_id != None:oprot.writeFieldBegin('application_id', TType.I64, 1)oprot.writeI64(self.application_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getCallbackUrl_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('getCallbackUrl_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentsForUser_args:"""Attributes:- userId- from_time- to_time- status- gateway_id"""thrift_spec = (None, # 0(1, TType.I64, 'userId', None, None, ), # 1(2, TType.I64, 'from_time', None, None, ), # 2(3, TType.I64, 'to_time', None, None, ), # 3(4, TType.I32, 'status', None, None, ), # 4(5, TType.I64, 'gateway_id', None, None, ), # 5)def __init__(self, userId=None, from_time=None, to_time=None, status=None, gateway_id=None,):self.userId = userIdself.from_time = from_timeself.to_time = to_timeself.status = statusself.gateway_id = gateway_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.userId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.from_time = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.to_time = 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.gateway_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('getPaymentsForUser_args')if self.userId != None:oprot.writeFieldBegin('userId', TType.I64, 1)oprot.writeI64(self.userId)oprot.writeFieldEnd()if self.from_time != None:oprot.writeFieldBegin('from_time', TType.I64, 2)oprot.writeI64(self.from_time)oprot.writeFieldEnd()if self.to_time != None:oprot.writeFieldBegin('to_time', TType.I64, 3)oprot.writeI64(self.to_time)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 4)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gateway_id != None:oprot.writeFieldBegin('gateway_id', TType.I64, 5)oprot.writeI64(self.gateway_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class 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 = [](_etype35, _size32) = iprot.readListBegin()for _i36 in xrange(_size32):_elem37 = Payment()_elem37.read(iprot)self.success.append(_elem37)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentsForUser_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter38 in self.success:iter38.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentsForCart_args:"""Attributes:- cartId- from_time- to_time- status- gateway_id"""thrift_spec = (None, # 0(1, TType.I64, 'cartId', None, None, ), # 1(2, TType.I64, 'from_time', None, None, ), # 2(3, TType.I64, 'to_time', None, None, ), # 3(4, TType.I32, 'status', None, None, ), # 4(5, TType.I64, 'gateway_id', None, None, ), # 5)def __init__(self, cartId=None, from_time=None, to_time=None, status=None, gateway_id=None,):self.cartId = cartIdself.from_time = from_timeself.to_time = to_timeself.status = statusself.gateway_id = gateway_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.cartId = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.from_time = iprot.readI64();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.I64:self.to_time = 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.gateway_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('getPaymentsForCart_args')if self.cartId != None:oprot.writeFieldBegin('cartId', TType.I64, 1)oprot.writeI64(self.cartId)oprot.writeFieldEnd()if self.from_time != None:oprot.writeFieldBegin('from_time', TType.I64, 2)oprot.writeI64(self.from_time)oprot.writeFieldEnd()if self.to_time != None:oprot.writeFieldBegin('to_time', TType.I64, 3)oprot.writeI64(self.to_time)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 4)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gateway_id != None:oprot.writeFieldBegin('gateway_id', TType.I64, 5)oprot.writeI64(self.gateway_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentsForCart_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 = [](_etype42, _size39) = iprot.readListBegin()for _i43 in xrange(_size39):_elem44 = Payment()_elem44.read(iprot)self.success.append(_elem44)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('getPaymentsForCart_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter45 in self.success:iter45.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayments_args:"""Attributes:- from_time- to_time- status- gateway_id"""thrift_spec = (None, # 0(1, TType.I64, 'from_time', None, None, ), # 1(2, TType.I64, 'to_time', None, None, ), # 2(3, TType.I32, 'status', None, None, ), # 3(4, TType.I64, 'gateway_id', None, None, ), # 4)def __init__(self, from_time=None, to_time=None, status=None, gateway_id=None,):self.from_time = from_timeself.to_time = to_timeself.status = statusself.gateway_id = gateway_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.from_time = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I64:self.to_time = 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.gateway_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('getPayments_args')if self.from_time != None:oprot.writeFieldBegin('from_time', TType.I64, 1)oprot.writeI64(self.from_time)oprot.writeFieldEnd()if self.to_time != None:oprot.writeFieldBegin('to_time', TType.I64, 2)oprot.writeI64(self.to_time)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 3)oprot.writeI32(self.status)oprot.writeFieldEnd()if self.gateway_id != None:oprot.writeFieldBegin('gateway_id', TType.I64, 4)oprot.writeI64(self.gateway_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class 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 = [](_etype49, _size46) = iprot.readListBegin()for _i50 in xrange(_size46):_elem51 = Payment()_elem51.read(iprot)self.success.append(_elem51)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayments_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter52 in self.success:iter52.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentForMerchantId_args:"""Attributes:- merchant_tx_id"""thrift_spec = (None, # 0(1, TType.I64, 'merchant_tx_id', None, None, ), # 1)def __init__(self, merchant_tx_id=None,):self.merchant_tx_id = merchant_tx_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.merchant_tx_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('getPaymentForMerchantId_args')if self.merchant_tx_id != None:oprot.writeFieldBegin('merchant_tx_id', TType.I64, 1)oprot.writeI64(self.merchant_tx_id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentForMerchantId_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 = [](_etype56, _size53) = iprot.readListBegin()for _i57 in xrange(_size53):_elem58 = Payment()_elem58.read(iprot)self.success.append(_elem58)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('getPaymentForMerchantId_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter59 in self.success:iter59.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changePaymentStatus_args:"""Attributes:- id- newStatus"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.I32, 'newStatus', None, None, ), # 2)def __init__(self, id=None, newStatus=None,):self.id = idself.newStatus = newStatusdef 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.I32:self.newStatus = 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('changePaymentStatus_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.newStatus != None:oprot.writeFieldBegin('newStatus', TType.I32, 2)oprot.writeI32(self.newStatus)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changePaymentStatus_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('changePaymentStatus_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changePaymentRequestStatus_args:"""Attributes:- request_id- requestStatus"""thrift_spec = (None, # 0(1, TType.I64, 'request_id', None, None, ), # 1(2, TType.I32, 'requestStatus', None, None, ), # 2)def __init__(self, request_id=None, requestStatus=None,):self.request_id = request_idself.requestStatus = requestStatusdef 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.request_id = iprot.readI64();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.requestStatus = 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('changePaymentRequestStatus_args')if self.request_id != None:oprot.writeFieldBegin('request_id', TType.I64, 1)oprot.writeI64(self.request_id)oprot.writeFieldEnd()if self.requestStatus != None:oprot.writeFieldBegin('requestStatus', TType.I32, 2)oprot.writeI32(self.requestStatus)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changePaymentRequestStatus_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('changePaymentRequestStatus_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateways_args:"""Attributes:- status"""thrift_spec = (None, # 0(1, TType.I32, 'status', None, None, ), # 1)def __init__(self, status=None,):self.status = statusdef 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.status = 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('getPaymentGateways_args')if self.status != None:oprot.writeFieldBegin('status', TType.I32, 1)oprot.writeI32(self.status)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateways_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 = [](_etype63, _size60) = iprot.readListBegin()for _i64 in xrange(_size60):_elem65 = PaymentGateway()_elem65.read(iprot)self.success.append(_elem65)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('getPaymentGateways_result')if self.success != None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter66 in self.success:iter66.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateway_args:"""Attributes:- id"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1)def __init__(self, id=None,):self.id = iddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentGateway_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPaymentGateway_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.STRUCT, 'success', (PaymentGateway, PaymentGateway.thrift_spec), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = PaymentGateway()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPaymentGateway_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changeGatewayStatus_args:"""Attributes:- id- status"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.I32, 'status', None, None, ), # 2)def __init__(self, id=None, status=None,):self.id = idself.status = statusdef 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.I32:self.status = 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('changeGatewayStatus_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.status != None:oprot.writeFieldBegin('status', TType.I32, 2)oprot.writeI32(self.status)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class changeGatewayStatus_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('changeGatewayStatus_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayment_args:"""Attributes:- id"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1)def __init__(self, id=None,):self.id = iddef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I64:self.id = iprot.readI64();else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayment_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class getPayment_result:"""Attributes:- success- pe"""thrift_spec = ((0, TType.STRUCT, 'success', (Payment, Payment.thrift_spec), None, ), # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, success=None, pe=None,):self.success = successself.pe = pedef read(self, iprot):if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = Payment()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.pe = PaymentException()self.pe.read(iprot)else:iprot.skip(ftype)else:iprot.skip(ftype)iprot.readFieldEnd()iprot.readStructEnd()def write(self, oprot):if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))returnoprot.writeStructBegin('getPayment_result')if self.success != None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addBankDetails_args:"""Attributes:- id- bid- btxid- error_code- session_id- postdate- auth_code- ref_code"""thrift_spec = (None, # 0(1, TType.I64, 'id', None, None, ), # 1(2, TType.STRING, 'bid', None, None, ), # 2(3, TType.STRING, 'btxid', None, None, ), # 3(4, TType.STRING, 'error_code', None, None, ), # 4(5, TType.STRING, 'session_id', None, None, ), # 5(6, TType.STRING, 'postdate', None, None, ), # 6(7, TType.STRING, 'auth_code', None, None, ), # 7(8, TType.STRING, 'ref_code', None, None, ), # 8)def __init__(self, id=None, bid=None, btxid=None, error_code=None, session_id=None, postdate=None, auth_code=None, ref_code=None,):self.id = idself.bid = bidself.btxid = btxidself.error_code = error_codeself.session_id = session_idself.postdate = postdateself.auth_code = auth_codeself.ref_code = ref_codedef 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.bid = iprot.readString();else:iprot.skip(ftype)elif fid == 3:if ftype == TType.STRING:self.btxid = iprot.readString();else:iprot.skip(ftype)elif fid == 4:if ftype == TType.STRING:self.error_code = iprot.readString();else:iprot.skip(ftype)elif fid == 5:if ftype == TType.STRING:self.session_id = iprot.readString();else:iprot.skip(ftype)elif fid == 6:if ftype == TType.STRING:self.postdate = iprot.readString();else:iprot.skip(ftype)elif fid == 7:if ftype == TType.STRING:self.auth_code = iprot.readString();else:iprot.skip(ftype)elif fid == 8:if ftype == TType.STRING:self.ref_code = iprot.readString();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('addBankDetails_args')if self.id != None:oprot.writeFieldBegin('id', TType.I64, 1)oprot.writeI64(self.id)oprot.writeFieldEnd()if self.bid != None:oprot.writeFieldBegin('bid', TType.STRING, 2)oprot.writeString(self.bid)oprot.writeFieldEnd()if self.btxid != None:oprot.writeFieldBegin('btxid', TType.STRING, 3)oprot.writeString(self.btxid)oprot.writeFieldEnd()if self.error_code != None:oprot.writeFieldBegin('error_code', TType.STRING, 4)oprot.writeString(self.error_code)oprot.writeFieldEnd()if self.session_id != None:oprot.writeFieldBegin('session_id', TType.STRING, 5)oprot.writeString(self.session_id)oprot.writeFieldEnd()if self.postdate != None:oprot.writeFieldBegin('postdate', TType.STRING, 6)oprot.writeString(self.postdate)oprot.writeFieldEnd()if self.auth_code != None:oprot.writeFieldBegin('auth_code', TType.STRING, 7)oprot.writeString(self.auth_code)oprot.writeFieldEnd()if self.ref_code != None:oprot.writeFieldBegin('ref_code', TType.STRING, 8)oprot.writeString(self.ref_code)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)class addBankDetails_result:"""Attributes:- pe"""thrift_spec = (None, # 0(1, TType.STRUCT, 'pe', (PaymentException, PaymentException.thrift_spec), None, ), # 1)def __init__(self, pe=None,):self.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 == 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('addBankDetails_result')if self.pe != None:oprot.writeFieldBegin('pe', TType.STRUCT, 1)self.pe.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def __repr__(self):L = ['%s=%r' % (key, value)for key, value in self.__dict__.iteritems()]return '%s(%s)' % (self.__class__.__name__, ', '.join(L))def __eq__(self, other):return isinstance(other, self.__class__) and self.__dict__ == other.__dict__def __ne__(self, other):return not (self == other)