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)
Exemplo n.º 2
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)