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