Metadata-Version: 2.1
Name: eis-accounts
Version: 1.3.1
Summary: EMIL AccountService
Home-page: 
Author: Contact us
Author-email: kontakt@emil.de
Keywords: OpenAPI,OpenAPI-Generator,EMIL AccountService
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# eis-accounts
The EMIL AccountService API description

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0
- Package version: 1.3.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.emil.de](https://www.emil.de)

## Requirements.

Python >=3.6

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install eis.account
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emilDev/eis-account-sdk.git`)

Then import the package:
```python
import eis.account
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import eis.account
```

## Getting Started

The environment variables must be set in order to properly use this SDK.

```shell 
export EMIL_USERNAME=XXXXXXX
export EMIL_PASSWORD=XXXXXXX
```

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
import time
import eis.account
from pprint import pprint
from eis.account.api import accounts_api
from eis.account.model.create_account_request_dto import CreateAccountRequestDto
from eis.account.model.create_account_response_class import CreateAccountResponseClass
from eis.account.model.get_account_response_class import GetAccountResponseClass
from eis.account.model.list_accounts_response_class import ListAccountsResponseClass
from eis.account.model.update_account_request_dto import UpdateAccountRequestDto
from eis.account.model.update_account_response_class import UpdateAccountResponseClass
# Defining the host is optional and defaults to https://apiv2.emil.de
# See configuration.py for a list of all supported configuration parameters.
configuration = eis.account.Configuration(
    host = "https://apiv2.emil.de"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Bearer is automatically handled with exported environment variables. However, you
# can manuallay configure Bearer authorization (JWT): bearer
configuration = eis.account.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# After manual token becomes invalid, the SDK will default to re-login automatically
# with environment variable credentials.


# Enter a context with an instance of the API client
with eis.account.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = accounts_api.AccountsApi(api_client)
    create_account_request_dto = CreateAccountRequestDto(
        title="Dr.",
        first_name="Paul",
        last_name="Müller",
        email="paul.müller@example.de",
        gender="male",
        street="Goerzallee",
        zip_code="14167",
        city="Berlin",
        house_number="156",
        type="person",
        birth_date=dateutil_parser('1997-02-14T16:45:56.711Z'),
        company_name="Emil",
        phone="+491235678900",
        account_number="123456789",
        metadata={},
        custom_fields={},
    ) # CreateAccountRequestDto | 
    authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)

    try:
        # Create the account
        api_response = api_instance.create_account(create_account_request_dto, authorization=authorization)
        pprint(api_response)
    except eis.account.ApiException as e:
        print("Exception when calling AccountsApi->create_account: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://apiv2.emil.de*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountsApi* | [**create_account**](docs/AccountsApi.md#create_account) | **POST** /accountservice/v1/accounts | Create the account
*AccountsApi* | [**delete_account**](docs/AccountsApi.md#delete_account) | **DELETE** /accountservice/v1/accounts/{code} | Delete the account
*AccountsApi* | [**get_account**](docs/AccountsApi.md#get_account) | **GET** /accountservice/v1/accounts/{code} | Retrieve the account
*AccountsApi* | [**list_accounts**](docs/AccountsApi.md#list_accounts) | **GET** /accountservice/v1/accounts | List accounts
*AccountsApi* | [**update_account**](docs/AccountsApi.md#update_account) | **PUT** /accountservice/v1/accounts/{code} | Update the account


## Documentation For Models

 - [AccountClass](docs/AccountClass.md)
 - [CreateAccountRequestDto](docs/CreateAccountRequestDto.md)
 - [CreateAccountResponseClass](docs/CreateAccountResponseClass.md)
 - [DeleteRequestDto](docs/DeleteRequestDto.md)
 - [GetAccountResponseClass](docs/GetAccountResponseClass.md)
 - [ListAccountsResponseClass](docs/ListAccountsResponseClass.md)
 - [PolicyClass](docs/PolicyClass.md)
 - [RegisterPolicyRequestDto](docs/RegisterPolicyRequestDto.md)
 - [UpdateAccountRequestDto](docs/UpdateAccountRequestDto.md)
 - [UpdateAccountResponseClass](docs/UpdateAccountResponseClass.md)


## Documentation For Authorization


## bearer

- **Type**: Bearer authentication (JWT)


## Author

kontakt@emil.de


## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in eis.account.apis and eis.account.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from eis.account.api.default_api import DefaultApi`
- `from eis.account.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import eis.account
from eis.account.apis import *
from eis.account.models import *
```

