# eis-claims
The EMIL ClaimService API description

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

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

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

## 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.claim
from pprint import pprint
from eis.claim.api import claim_statuses_api
from eis.claim.model.create_claim_status_request_dto import CreateClaimStatusRequestDto
from eis.claim.model.create_claim_status_response_class import CreateClaimStatusResponseClass
from eis.claim.model.get_claim_status_response_class import GetClaimStatusResponseClass
from eis.claim.model.list_claim_statuses_response_class import ListClaimStatusesResponseClass
# 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.claim.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.claim.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.claim.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = claim_statuses_api.ClaimStatusesApi(api_client)
    create_claim_status_request_dto = CreateClaimStatusRequestDto(
        name="open",
        product_slug="car-insurance",
    ) # CreateClaimStatusRequestDto | 
    authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)

    try:
        # Create the claim status
        api_response = api_instance.create_claim_status(create_claim_status_request_dto, authorization=authorization)
        pprint(api_response)
    except eis.claim.ApiException as e:
        print("Exception when calling ClaimStatusesApi->create_claim_status: %s\n" % e)
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ClaimStatusesApi* | [**create_claim_status**](docs/ClaimStatusesApi.md#create_claim_status) | **POST** /v1/claim-statuses | Create the claim status
*ClaimStatusesApi* | [**delete_claim_status**](docs/ClaimStatusesApi.md#delete_claim_status) | **DELETE** /v1/claim-statuses/{id} | Delete the claim status
*ClaimStatusesApi* | [**get_claim_status**](docs/ClaimStatusesApi.md#get_claim_status) | **GET** /v1/claim-statuses/{id} | Retrieve the claim status
*ClaimStatusesApi* | [**list_claim_statuses**](docs/ClaimStatusesApi.md#list_claim_statuses) | **GET** /v1/claim-statuses | List claim statuses
*ClaimsApi* | [**create_claim**](docs/ClaimsApi.md#create_claim) | **POST** /v1/claims | Create the claim
*ClaimsApi* | [**delete_claim**](docs/ClaimsApi.md#delete_claim) | **DELETE** /v1/claims/{code} | Delete the claim
*ClaimsApi* | [**get_claim**](docs/ClaimsApi.md#get_claim) | **GET** /v1/claims/{code} | Retrieve the claim
*ClaimsApi* | [**list_claims**](docs/ClaimsApi.md#list_claims) | **GET** /v1/claims | List claims
*ClaimsApi* | [**patch_claim**](docs/ClaimsApi.md#patch_claim) | **PATCH** /v1/claims/{code} | Patch the claim
*ClaimsApi* | [**update_claim**](docs/ClaimsApi.md#update_claim) | **PUT** /v1/claims/{code} | Update the claim
*SettlementsApi* | [**create_settlement**](docs/SettlementsApi.md#create_settlement) | **POST** /v1/settlements | Create the settlement
*SettlementsApi* | [**delete_settlement**](docs/SettlementsApi.md#delete_settlement) | **DELETE** /v1/settlements/{code} | Delete the settlement
*SettlementsApi* | [**get_settlement**](docs/SettlementsApi.md#get_settlement) | **GET** /v1/settlements/{code} | Retrieve the settlement
*SettlementsApi* | [**list_settlements**](docs/SettlementsApi.md#list_settlements) | **GET** /v1/settlements | List settlements
*SettlementsApi* | [**update_settlement**](docs/SettlementsApi.md#update_settlement) | **PUT** /v1/settlements/{code} | Update the settlement
*DefaultApi* | [**check**](docs/DefaultApi.md#check) | **GET** /claimservice/health | 


## Documentation For Models

 - [ClaimClass](docs/ClaimClass.md)
 - [ClaimStatusClass](docs/ClaimStatusClass.md)
 - [CreateClaimRequestDto](docs/CreateClaimRequestDto.md)
 - [CreateClaimResponseClass](docs/CreateClaimResponseClass.md)
 - [CreateClaimStatusRequestDto](docs/CreateClaimStatusRequestDto.md)
 - [CreateClaimStatusResponseClass](docs/CreateClaimStatusResponseClass.md)
 - [CreateSettlementRequestDto](docs/CreateSettlementRequestDto.md)
 - [CreateSettlementResponseClass](docs/CreateSettlementResponseClass.md)
 - [GetClaimResponseClass](docs/GetClaimResponseClass.md)
 - [GetClaimStatusResponseClass](docs/GetClaimStatusResponseClass.md)
 - [GetSettlementResponseClass](docs/GetSettlementResponseClass.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [InlineResponse503](docs/InlineResponse503.md)
 - [ListClaimStatusesResponseClass](docs/ListClaimStatusesResponseClass.md)
 - [ListClaimsResponseClass](docs/ListClaimsResponseClass.md)
 - [ListSettlementsResponseClass](docs/ListSettlementsResponseClass.md)
 - [PatchClaimRequestDto](docs/PatchClaimRequestDto.md)
 - [PatchClaimResponseClass](docs/PatchClaimResponseClass.md)
 - [SettlementClass](docs/SettlementClass.md)
 - [UpdateClaimRequestDto](docs/UpdateClaimRequestDto.md)
 - [UpdateClaimResponseClass](docs/UpdateClaimResponseClass.md)
 - [UpdateSettlementRequestDto](docs/UpdateSettlementRequestDto.md)
 - [UpdateSettlementResponseClass](docs/UpdateSettlementResponseClass.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.claim.apis and eis.claim.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.claim.api.default_api import DefaultApi`
- `from eis.claim.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.claim
from eis.claim.apis import *
from eis.claim.models import *
```

