# 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.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## 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 claims_api
from eis.claim.model.create_claim_request_dto import CreateClaimRequestDto
from eis.claim.model.update_claim_request_dto import UpdateClaimRequestDto
# 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 = claims_api.ClaimsApi(api_client)
    create_claim_request_dto = CreateClaimRequestDto(
        title="title_example",
        account_code="account_code_example",
        policy_number="policy_number_example",
        policy_code="policy_code_example",
        product_id=3.14,
        product_version_id=3.14,
        product_name="product_name_example",
        insured_object_id=3.14,
        description="description_example",
        adjuster="adjuster_example",
        reporter="reporter_example",
        contact_email="contact_email_example",
        contact_phone="contact_phone_example",
        damage_date=dateutil_parser('1970-01-01T00:00:00.00Z'),
        notification_date=dateutil_parser('1970-01-01T00:00:00.00Z'),
        custom_fields={},
    ) # CreateClaimRequestDto | 
    authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)

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

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ClaimsApi* | [**create_claim**](docs/ClaimsApi.md#create_claim) | **POST** /v1/claims/ | Create 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/ | Retrieve the claim
*ClaimsApi* | [**update_claim**](docs/ClaimsApi.md#update_claim) | **PUT** /v1/claims//{code} | Update the claim


## Documentation For Models

 - [CreateClaimRequestDto](docs/CreateClaimRequestDto.md)
 - [UpdateClaimRequestDto](docs/UpdateClaimRequestDto.md)


## Documentation For Authorization


## bearer

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


## Author




## 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 *
```

