예제 #1
0
def master_accounts_get():  # noqa: E501
    """List all master-accounts.

    Returns an overview list of master-accounts. These do not contain the transactions, to get transactions these please see `GET /master-accounts/{id}`. The `last_updated` property reflects the last time this entry was refreshed in the database, this is updated automatically. # noqa: E501


    :rtype: List[MasterAccountBase]
    """
    response = service.masters.read_all()
    output = [MasterAccountBase().from_dict(doc) for doc in response]
    return output
def master_accounts_get():  # noqa: E501
    """Returns a list of master-accounts.

     # noqa: E501


    :rtype: List[MasterAccountBase]
    """
    response = service.masters.read_all()
    output = [MasterAccountBase().from_dict(doc) for doc in response]
    return output
    def test_master_accounts_post(self):
        """Test case for master_accounts_post

        Create a new master-account
        """
        body = MasterAccountBase()
        response = self.client.open(
            '/v1/master-accounts',
            method='POST',
            data=json.dumps(body),
            content_type='application/nl.kpmg.v1.master-account+json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))
def master_accounts_post(body):  # noqa: E501
    """Create a new master-account

     # noqa: E501

    :param body: master-account to add
    :type body: dict | bytes

    :rtype: MasterAccount
    """
    if connexion.request.is_json:
        body = MasterAccountBase.from_dict(connexion.request.get_json())  # noqa: E501

    response = service.masters.create(body.to_dict())
    return MasterAccount.from_dict(response)
예제 #5
0
def master_accounts_post(body):  # noqa: E501
    """Create a new master-account

    A new master-account will be created in the system and assigned a unique id. If `iban` is provided, an account with that IBAN is assumed to exist in the linked bank profile, and this one will be added to the database for caching. If no `iban` is provided, a new bank account will be opened under the name of the linked account. The details of the new or existing account are returned. # noqa: E501

    :param body: master-account to add
    :type body: dict | bytes

    :rtype: MasterAccount
    """
    if connexion.request.is_json:
        body = MasterAccountBase.from_dict(
            connexion.request.get_json())  # noqa: E501

    response = service.masters.create(body.to_dict())
    return MasterAccount.from_dict(response)