示例#1
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)
示例#2
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)
 def getByTag(self, connection = None, loggingObject = None):
     return Requestor().get("/customer/getbytag/{0}".format(Requestor.escape(self.tag)), Customer, 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)
示例#5
0
 def getByTag(self, connection=None, loggingObject=None):
     return Requestor().get(
         "/customer/getbytag/{0}".format(Requestor.escape(self.tag)),
         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 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)