def list(self, pageNumber=0, pageSize=200, connection=None, loggingObject=None): return Requestor().get("/customer/list", Customer, connection, loggingObject)
def verify(self, amount1, amount2, connection=None, loggingObject=None): eav = ExternalAccountVerify() eav.customerId = self.customerId eav.externalAccountId = self.externalAccountId eav.amount1 = amount1 eav.amount2 = amount2 return Requestor.post('/externalaccount/verify', eav, self)
def verify(self, amount1, amount2, connection = None, loggingObject = None): eav = ExternalAccountVerify() eav.customerId = self.customerId eav.externalAccountId = self.externalAccountId eav.amount1 = amount1 eav.amount2 = amount2 return Requestor.post('/externalaccount/verify', eav, self)
def search(self, pageNumber=0, pageSize=200, connection=None, loggingObject=None): return Requestor().post( "/customer/search/?pageNumber={0}&pageSize={1}".format( pageNumber, pageSize), Customer, self, connection, loggingObject)
def list(self, accountId, status=None, beginDate=None, endDate=None, pageNumber=0, pageSize=200, connection=None, loggingObject=None): # normalize begin date start = None if isinstance(beginDate, datetime): start = beginDate.strftime('%Y-%m-%d') elif isinstance(beginDate, str): start = beginDate[:10] else: start = beginDate start = start or '' # normalize end date finish = None if isinstance(endDate, datetime): finish = endDate.strftime('%Y-%m-%d') elif isinstance(endDate, str): finish = endDate[:10] else: finish = endDate finish = finish or '' # if finish is given, force a default for start if it's not given if finish != '' and start == '': start = '1900-01-01' return Requestor().get( "/transaction/list/{0}/{1}/{2}/{3}/{4}?pageNumber={5}&pageSize={6}" .format(self.customerId, accountId, Requestor.escape(status), start, finish, pageNumber or 0, pageSize or 200), Transaction, connection, loggingObject)
def getItem(customerId, statementId, connection = None, loggingObject = None): return Requestor().get("/statement/get/{0}/{1}".format(customerId, statementId), Statement, connection, loggingObject)
def list(self, accountId, status = None, beginDate = None, endDate = None, pageNumber = 0, pageSize = 200, connection = None, loggingObject = None): # normalize begin date start = None if isinstance(beginDate, datetime): start = beginDate.strftime('%Y-%m-%d') elif isinstance(beginDate, str): start = beginDate[:10] else: start = beginDate start = start or '' # normalize end date finish = None if isinstance(endDate, datetime): finish = endDate.strftime('%Y-%m-%d') elif isinstance(endDate, str): finish = endDate[:10] else: finish = endDate finish = finish or '' # if finish is given, force a default for start if it's not given if finish != '' and start == '': start = '1900-01-01' return Requestor().get("/transaction/list/{0}/{1}/{2}/{3}/{4}?pageNumber={5}&pageSize={6}".format(self.customerId, accountId, Requestor.escape(status), start, finish, pageNumber or 0, pageSize or 200), Transaction, connection, loggingObject)
def download(self, connection = None, loggingObject = None): return Requestor().get("/bankdocument/download/{0}/{1}".format(Requestor.escape(self.culture), self.documentId), FileContent, connection, loggingObject)
def create(self, connection = None, loggingObject = None): aid = Requestor().post("/account/create", AccountIdOnly, self, connection, loggingObject) return aid.accountId
def get(self, connection = None, loggingObject = None): return Requestor().get("/account/get/{0}/{1}".format(self.customerId, self.accountId), Account, connection, loggingObject)
def close(self, connection=None, loggingObject=None): return Requestor().post('/account/close', AccountClose, self, connection, loggingObject)
def get(self, connection=None, loggingObject=None): return Requestor().get( "/customerbeneficiary/get/{0}/{1}".format( self.customerId, self.customerBeneficiaryId), CustomerBeneficiary, connection, loggingObject)
def getByTag(self, connection = None, loggingObject = None): return Requestor().get("/customer/getbytag/{0}".format(Requestor.escape(self.tag)), Customer, connection, loggingObject)
def listItems(customerId, connection = None, loggingObject = None): return Requestor().get("/statement/list/{0}".format(customerId), Statement, connection, loggingObject)
def getByTag(self, connection=None, loggingObject=None): return Requestor().get( "/customer/getbytag/{0}".format(Requestor.escape(self.tag)), Customer, connection, loggingObject)
def get(self, connection=None, loggingObject=None): return Requestor().get("/customer/get/{0}".format(self.customerId), Customer, connection, loggingObject)
def download(self, connection=None, loggingObject=None): return Requestor().get( "/bankdocument/download/{0}/{1}".format( Requestor.escape(self.culture), self.documentId), FileContent, connection, loggingObject)
def list(self, connection=None, loggingObject=None): return Requestor().get( "/bankdocument/list/{0}/{1}".format( Requestor.escape(self.culture), Requestor.escape(self.documentType)), BankDocument, connection, loggingObject)
def downloadItem(customerId, statementId, connection = None, loggingObject = None): return Requestor.get("/statement/download/{0}/{1}".format(customerId, statementId), FileContent, connection, loggingObject)
def create(self, connection=None, loggingObject=None): cid = Requestor().post("/customer/create", CustomerIdOnly, self, connection, loggingObject) return cid.customerId
def upload(self, connection=None, loggingObject=None): # NOTE: documentContent is assumed to be raw content bytes. # corepro API expects base64 encoded string. so we convert that here. self.documentContent = base64.b64encode(self.documentContent) return Requestor().post("/externalaccountdocument/upload", None, self, connection, loggingObject)
def initiate(self, connection=None, loggingObject=None): return Requestor().post("/customer/initiate", CustomerIdOnly, self, connection, loggingObject)
def deactivate(self, connection=None, loggingObject=None): cbid = Requestor().post("/customerbeneficiary/deactivate", CustomerBeneficiaryIdOnly, self, connection, loggingObject) return cbid.customerBeneficiaryId
def initiate(self, connection=None, loggingObject=None): eaid = Requestor().post("/externalaccount/initiate", ExternalAccountIdOnly, self, connection, loggingObject) return eaid.externalAccountId
def list(self, connection = None, loggingObject = None): rv = Requestor().get("/account/list/{0}".format(self.customerId), Account, connection, loggingObject) return rv
def create(self, connection=None, loggingObject=None): return Requestor().post("/transfer/create", Transfer, self, connection, loggingObject)
def getByTag(self, connection = None, loggingObject = None): return Requestor().get("/account/getbytag/{0}/{1}".format(self.customerId, Requestor.escape(self.tag)), Account, connection, loggingObject)
def void(self, connection=None, loggingObject=None): return Requestor().post("/transfer/void", Transfer, self, connection, loggingObject)
def get(self, connection=None, loggingObject=None): return Requestor().get("/program/get", Program, connection, loggingObject)
def list(self, connection = None, loggingObject = None): return Requestor().get("/bankdocument/list/{0}/{1}".format(Requestor.escape(self.culture), Requestor.escape(self.documentType)), BankDocument, connection, loggingObject)