Example #1
0
 def list(self,
          pageNumber=0,
          pageSize=200,
          connection=None,
          loggingObject=None):
     return Requestor().get("/customer/list", Customer, connection,
                            loggingObject)
Example #2
0
 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)
Example #4
0
 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)
Example #5
0
    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)
Example #6
0
 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)
Example #9
0
 def create(self, connection = None, loggingObject = None):
     aid = Requestor().post("/account/create", AccountIdOnly, self, connection, loggingObject)
     return aid.accountId
Example #10
0
 def get(self, connection = None, loggingObject = None):
     return Requestor().get("/account/get/{0}/{1}".format(self.customerId, self.accountId), Account, connection, loggingObject)
Example #11
0
 def close(self, connection=None, loggingObject=None):
     return Requestor().post('/account/close', AccountClose, self,
                             connection, loggingObject)
Example #12
0
 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)
Example #14
0
 def listItems(customerId, connection = None, loggingObject = None):
     return Requestor().get("/statement/list/{0}".format(customerId), Statement, connection, loggingObject)
Example #15
0
 def getByTag(self, connection=None, loggingObject=None):
     return Requestor().get(
         "/customer/getbytag/{0}".format(Requestor.escape(self.tag)),
         Customer, connection, loggingObject)
Example #16
0
 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)
Example #19
0
 def downloadItem(customerId, statementId, connection = None, loggingObject = None):
     return Requestor.get("/statement/download/{0}/{1}".format(customerId, statementId), FileContent, connection, loggingObject)
Example #20
0
 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)
Example #22
0
 def initiate(self, connection=None, loggingObject=None):
     return Requestor().post("/customer/initiate", CustomerIdOnly, self,
                             connection, loggingObject)
Example #23
0
 def deactivate(self, connection=None, loggingObject=None):
     cbid = Requestor().post("/customerbeneficiary/deactivate",
                             CustomerBeneficiaryIdOnly, self, connection,
                             loggingObject)
     return cbid.customerBeneficiaryId
Example #24
0
 def initiate(self, connection=None, loggingObject=None):
     eaid = Requestor().post("/externalaccount/initiate",
                             ExternalAccountIdOnly, self, connection,
                             loggingObject)
     return eaid.externalAccountId
Example #25
0
 def list(self, connection = None, loggingObject = None):
     rv = Requestor().get("/account/list/{0}".format(self.customerId), Account, connection, loggingObject)
     return rv
Example #26
0
 def create(self, connection=None, loggingObject=None):
     return Requestor().post("/transfer/create", Transfer, self, connection,
                             loggingObject)
Example #27
0
 def getByTag(self, connection = None, loggingObject = None):
     return Requestor().get("/account/getbytag/{0}/{1}".format(self.customerId, Requestor.escape(self.tag)), Account, connection, loggingObject)
Example #28
0
 def void(self, connection=None, loggingObject=None):
     return Requestor().post("/transfer/void", Transfer, self, connection,
                             loggingObject)
Example #29
0
 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)