# eis_product_sync
The EMIL ProductSyncService API description

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

- API version: 1.0
- Package version: 1.4.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.product_sync
```
(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.product_sync
```

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

## 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.product_sync
from pprint import pprint
from eis.product_sync.api import products_api
from eis.product_sync.model.create_product_request_dto import CreateProductRequestDto
from eis.product_sync.model.create_product_response_class import CreateProductResponseClass
from eis.product_sync.model.create_product_version_request_dto import CreateProductVersionRequestDto
from eis.product_sync.model.create_product_version_response_class import CreateProductVersionResponseClass
from eis.product_sync.model.get_environment_info_response_class import GetEnvironmentInfoResponseClass
from eis.product_sync.model.list_products_response_class import ListProductsResponseClass
# 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.product_sync.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.product_sync.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.product_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = products_api.ProductsApi(api_client)
    create_product_request_dto = CreateProductRequestDto(
        env="sandbox",
        slug="car-insurance",
        name="Car Insurance",
        insured_object_types=["car"],
        contract_duration_days=60,
        default_language="English",
    ) # CreateProductRequestDto | 
    authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)

    try:
        # Create the product
        api_response = api_instance.create_product(create_product_request_dto, authorization=authorization)
        pprint(api_response)
    except eis.product_sync.ApiException as e:
        print("Exception when calling ProductsApi->create_product: %s\n" % e)
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ProductsApi* | [**create_product**](docs/ProductsApi.md#create_product) | **POST** /productsyncservice/v1/products | Create the product
*ProductsApi* | [**create_product_version**](docs/ProductsApi.md#create_product_version) | **POST** /productsyncservice/v1/products/versions | Create the version
*ProductsApi* | [**get_environment_info**](docs/ProductsApi.md#get_environment_info) | **GET** /productsyncservice/v1/products/environments | Retrieve the Environment Info
*ProductsApi* | [**list_products**](docs/ProductsApi.md#list_products) | **GET** /productsyncservice/v1/products/{env} | List Products
*TasksApi* | [**get_task_product_details**](docs/TasksApi.md#get_task_product_details) | **GET** /productsyncservice/v1/tasks/{taskUid}/details/{entityType} | Retrieve the Task product details
*TasksApi* | [**get_task_status**](docs/TasksApi.md#get_task_status) | **GET** /productsyncservice/v1/tasks/{taskUid}/status | Retrieve the Task status
*TasksApi* | [**list_task_logs**](docs/TasksApi.md#list_task_logs) | **GET** /productsyncservice/v1/tasks/logs | List Tasks
*TasksApi* | [**list_tasks**](docs/TasksApi.md#list_tasks) | **GET** /productsyncservice/v1/tasks | List Tasks
*TasksApi* | [**start_compare_task**](docs/TasksApi.md#start_compare_task) | **POST** /productsyncservice/v1/tasks/start/compare | Create the compare
*TasksApi* | [**start_copy_task**](docs/TasksApi.md#start_copy_task) | **POST** /productsyncservice/v1/tasks/start/copy | Create the copy
*TasksApi* | [**start_export_task**](docs/TasksApi.md#start_export_task) | **POST** /productsyncservice/v1/tasks/start/export | Create the export
*TasksApi* | [**start_sync_task**](docs/TasksApi.md#start_sync_task) | **POST** /productsyncservice/v1/tasks/start/sync | Create the sync
*TasksApi* | [**stop_task**](docs/TasksApi.md#stop_task) | **PUT** /productsyncservice/v1/tasks/stop | Update the stop
*DefaultApi* | [**check**](docs/DefaultApi.md#check) | **GET** /productsyncservice/health | Health Check


## Documentation For Models

 - [CreateProductRequestDto](docs/CreateProductRequestDto.md)
 - [CreateProductResponseClass](docs/CreateProductResponseClass.md)
 - [CreateProductVersionRequestDto](docs/CreateProductVersionRequestDto.md)
 - [CreateProductVersionResponseClass](docs/CreateProductVersionResponseClass.md)
 - [GetEnvironmentInfoResponseClass](docs/GetEnvironmentInfoResponseClass.md)
 - [GetTaskProductDetailsResponseClass](docs/GetTaskProductDetailsResponseClass.md)
 - [GetTaskStatusResponseClass](docs/GetTaskStatusResponseClass.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [InlineResponse503](docs/InlineResponse503.md)
 - [ListProductsResponseClass](docs/ListProductsResponseClass.md)
 - [ListTaskLogsResponseClass](docs/ListTaskLogsResponseClass.md)
 - [ListTasksResponseClass](docs/ListTasksResponseClass.md)
 - [ProductClass](docs/ProductClass.md)
 - [ProductVersionClass](docs/ProductVersionClass.md)
 - [StartCompareTaskRequestDto](docs/StartCompareTaskRequestDto.md)
 - [StartCompareTaskResponseClass](docs/StartCompareTaskResponseClass.md)
 - [StartCopyTaskRequestDto](docs/StartCopyTaskRequestDto.md)
 - [StartCopyTaskResponseClass](docs/StartCopyTaskResponseClass.md)
 - [StartExportTaskRequestDto](docs/StartExportTaskRequestDto.md)
 - [StartExportTaskResponseClass](docs/StartExportTaskResponseClass.md)
 - [StartSyncTaskRequestDto](docs/StartSyncTaskRequestDto.md)
 - [StartSyncTaskResponseClass](docs/StartSyncTaskResponseClass.md)
 - [StopTaskRequestDto](docs/StopTaskRequestDto.md)
 - [StopTaskResponseClass](docs/StopTaskResponseClass.md)
 - [TaskClass](docs/TaskClass.md)
 - [TaskLogClass](docs/TaskLogClass.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.product_sync.apis and eis.product_sync.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.product_sync.api.default_api import DefaultApi`
- `from eis.product_sync.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.product_sync
from eis.product_sync.apis import *
from eis.product_sync.models import *
```

