# eis-partner
The EMIL PartnerService API description

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

- API version: 1.0
- Package version: 1.15.0
- 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.partner
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

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

### 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.partner
```

## 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.partner
from pprint import pprint
from eis.partner.api import partner_invitations_api
from eis.partner.model.invite_partner_to_eis_request_dto import InvitePartnerToEISRequestDto
from eis.partner.model.invite_partner_to_eis_response_class import InvitePartnerToEisResponseClass
# 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.partner.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.partner.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.partner.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = partner_invitations_api.PartnerInvitationsApi(api_client)
    invite_partner_to_eis_request_dto = InvitePartnerToEISRequestDto(
        partner_code="pr_D1oLOW1xRWPJJ0FNPYj7m",
        signup_email="mustermann@emil.de",
        organization_id=1,
        role_ids=[1],
    ) # InvitePartnerToEISRequestDto | 
    authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)

    try:
        # Create the Partner Invitation
        api_response = api_instance.invite_partner_to_eis(invite_partner_to_eis_request_dto, authorization=authorization)
        pprint(api_response)
    except eis.partner.ApiException as e:
        print("Exception when calling PartnerInvitationsApi->invite_partner_to_eis: %s\n" % e)
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PartnerInvitationsApi* | [**invite_partner_to_eis**](docs/PartnerInvitationsApi.md#invite_partner_to_eis) | **POST** /partnerservice/v1/partner-invitation | Create the Partner Invitation
*PartnerRelationsApi* | [**create_partner_relation**](docs/PartnerRelationsApi.md#create_partner_relation) | **POST** /partnerservice/v1/partners/relations | Create the partner relation
*PartnerRelationsApi* | [**delete_partner_relation**](docs/PartnerRelationsApi.md#delete_partner_relation) | **DELETE** /partnerservice/v1/partners/relations/{id} | Delete the partner-relation
*PartnerRelationsApi* | [**get_partner_relation**](docs/PartnerRelationsApi.md#get_partner_relation) | **GET** /partnerservice/v1/partners/relations/{id} | Retrieve the partner relation
*PartnerRelationsApi* | [**get_partner_relation_type**](docs/PartnerRelationsApi.md#get_partner_relation_type) | **GET** /partnerservice/v1/partners/relations/types/{slug} | Retrieve the partner relation type
*PartnerRelationsApi* | [**list_partner_relation_types**](docs/PartnerRelationsApi.md#list_partner_relation_types) | **GET** /partnerservice/v1/partners/relations/types | List partner relation types
*PartnerRelationsApi* | [**list_partner_relations**](docs/PartnerRelationsApi.md#list_partner_relations) | **GET** /partnerservice/v1/partners/relations | List partner relations
*PartnerRelationsApi* | [**update_partner_relation**](docs/PartnerRelationsApi.md#update_partner_relation) | **PUT** /partnerservice/v1/partners/relations/{id} | Update the partner relation
*PartnerTagsApi* | [**create_tag**](docs/PartnerTagsApi.md#create_tag) | **POST** /partnerservice/v1/tags | Create the partner tag
*PartnerTagsApi* | [**delete_tag**](docs/PartnerTagsApi.md#delete_tag) | **DELETE** /partnerservice/v1/tags/{code} | Delete the partner tag
*PartnerTagsApi* | [**get_tag**](docs/PartnerTagsApi.md#get_tag) | **GET** /partnerservice/v1/tags/{code} | Retrieve the partner tag
*PartnerTagsApi* | [**list_tags**](docs/PartnerTagsApi.md#list_tags) | **GET** /partnerservice/v1/tags | List partner tags
*PartnerTagsApi* | [**update_tag**](docs/PartnerTagsApi.md#update_tag) | **PUT** /partnerservice/v1/tags/{code} | Update the partner tag
*PartnerTypesApi* | [**create_partner_type**](docs/PartnerTypesApi.md#create_partner_type) | **POST** /partnerservice/v1/partner-types | Create the partner-types
*PartnerTypesApi* | [**delete_partner_type**](docs/PartnerTypesApi.md#delete_partner_type) | **DELETE** /partnerservice/v1/partner-types/{code} | Delete the partner-types
*PartnerTypesApi* | [**get_partner_type**](docs/PartnerTypesApi.md#get_partner_type) | **GET** /partnerservice/v1/partner-types/{code} | Retrieve the partner-types
*PartnerTypesApi* | [**list_partner_types**](docs/PartnerTypesApi.md#list_partner_types) | **GET** /partnerservice/v1/partner-types | List partner-types
*PartnerTypesApi* | [**update_partner_type**](docs/PartnerTypesApi.md#update_partner_type) | **PUT** /partnerservice/v1/partner-types/{code} | Update the partner-types
*PartnerVersionsApi* | [**get_partner_version**](docs/PartnerVersionsApi.md#get_partner_version) | **GET** /partnerservice/v1/partners/{code}/versions/{version} | Retrieve the partner version
*PartnerVersionsApi* | [**list_partner_version**](docs/PartnerVersionsApi.md#list_partner_version) | **GET** /partnerservice/v1/partners/{code}/versions | List partner versions
*PartnersApi* | [**create_partner**](docs/PartnersApi.md#create_partner) | **POST** /partnerservice/v1/partners | Create the partner
*PartnersApi* | [**delete_partner**](docs/PartnersApi.md#delete_partner) | **DELETE** /partnerservice/v1/partners/{code} | Delete the partner
*PartnersApi* | [**get_partner**](docs/PartnersApi.md#get_partner) | **GET** /partnerservice/v1/partners/{code} | Retrieve the partner
*PartnersApi* | [**list_partners**](docs/PartnersApi.md#list_partners) | **GET** /partnerservice/v1/partners | List partners
*PartnersApi* | [**list_relations_for_partner**](docs/PartnersApi.md#list_relations_for_partner) | **GET** /partnerservice/v1/partners/{code}/relations | List grouped relations for partner
*PartnersApi* | [**tag_partner**](docs/PartnersApi.md#tag_partner) | **PATCH** /partnerservice/v1/partners/{code}/tag | Update the partner
*PartnersApi* | [**update_partner**](docs/PartnersApi.md#update_partner) | **PUT** /partnerservice/v1/partners/{code} | Update the partner
*DefaultApi* | [**check**](docs/DefaultApi.md#check) | **GET** /partnerservice/health | Health Check


## Documentation For Models

 - [CreatePartnerRelationRequestDtoRest](docs/CreatePartnerRelationRequestDtoRest.md)
 - [CreatePartnerRelationResponseClass](docs/CreatePartnerRelationResponseClass.md)
 - [CreatePartnerRequestDto](docs/CreatePartnerRequestDto.md)
 - [CreatePartnerResponseClass](docs/CreatePartnerResponseClass.md)
 - [CreatePartnerTypeRequestDto](docs/CreatePartnerTypeRequestDto.md)
 - [CreatePartnerTypeResponseClass](docs/CreatePartnerTypeResponseClass.md)
 - [CreateTagRequestDto](docs/CreateTagRequestDto.md)
 - [CreateTagResponseClass](docs/CreateTagResponseClass.md)
 - [DeleteResponseClass](docs/DeleteResponseClass.md)
 - [GetPartnerRelationClass](docs/GetPartnerRelationClass.md)
 - [GetPartnerRelationTypeClass](docs/GetPartnerRelationTypeClass.md)
 - [GetPartnerResponseClass](docs/GetPartnerResponseClass.md)
 - [GetPartnerTypeResponseClass](docs/GetPartnerTypeResponseClass.md)
 - [GetPartnerVersionResponseClass](docs/GetPartnerVersionResponseClass.md)
 - [GetTagResponseClass](docs/GetTagResponseClass.md)
 - [GroupedRelatedPartnersClass](docs/GroupedRelatedPartnersClass.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [InlineResponse503](docs/InlineResponse503.md)
 - [InviteClass](docs/InviteClass.md)
 - [InvitePartnerToEISRequestDto](docs/InvitePartnerToEISRequestDto.md)
 - [InvitePartnerToEisResponseClass](docs/InvitePartnerToEisResponseClass.md)
 - [ListPartnerRelationClass](docs/ListPartnerRelationClass.md)
 - [ListPartnerRelationTypesClass](docs/ListPartnerRelationTypesClass.md)
 - [ListPartnerTypesResponseClass](docs/ListPartnerTypesResponseClass.md)
 - [ListPartnerVersionsResponseClass](docs/ListPartnerVersionsResponseClass.md)
 - [ListPartnersResponseClass](docs/ListPartnersResponseClass.md)
 - [ListRelatedPartnersResponseClass](docs/ListRelatedPartnersResponseClass.md)
 - [ListTagsResponseClass](docs/ListTagsResponseClass.md)
 - [PartnerClass](docs/PartnerClass.md)
 - [PartnerRelationClass](docs/PartnerRelationClass.md)
 - [PartnerRelationTypeClass](docs/PartnerRelationTypeClass.md)
 - [PartnerTypeClass](docs/PartnerTypeClass.md)
 - [PartnerTypeCustomSchemaDto](docs/PartnerTypeCustomSchemaDto.md)
 - [PermissionClass](docs/PermissionClass.md)
 - [RelatedPartnerDataClass](docs/RelatedPartnerDataClass.md)
 - [RoleClass](docs/RoleClass.md)
 - [TagClass](docs/TagClass.md)
 - [TagPartnerRequestDtoRest](docs/TagPartnerRequestDtoRest.md)
 - [UpdatePartnerRelationRequestDtoRest](docs/UpdatePartnerRelationRequestDtoRest.md)
 - [UpdatePartnerRequestDto](docs/UpdatePartnerRequestDto.md)
 - [UpdatePartnerResponseClass](docs/UpdatePartnerResponseClass.md)
 - [UpdatePartnerTypeRequestDto](docs/UpdatePartnerTypeRequestDto.md)
 - [UpdatePartnerTypeResponseClass](docs/UpdatePartnerTypeResponseClass.md)
 - [UpdateTagResponseClass](docs/UpdateTagResponseClass.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.partner.apis and eis.partner.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.partner.api.default_api import DefaultApi`
- `from eis.partner.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.partner
from eis.partner.apis import *
from eis.partner.models import *
```

