eis-billing 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eis-billing-1.0.0/PKG-INFO +194 -0
- eis-billing-1.0.0/README.md +183 -0
- eis-billing-1.0.0/eis/__init__.py +0 -0
- eis-billing-1.0.0/eis/billing/__init__.py +28 -0
- eis-billing-1.0.0/eis/billing/api/__init__.py +3 -0
- eis-billing-1.0.0/eis/billing/api/correction_invoices_api.py +187 -0
- eis-billing-1.0.0/eis/billing/api/estimated_invoices_api.py +324 -0
- eis-billing-1.0.0/eis/billing/api/initial_invoices_api.py +187 -0
- eis-billing-1.0.0/eis/billing/api/invoices_api.py +368 -0
- eis-billing-1.0.0/eis/billing/api/recurring_invoices_api.py +187 -0
- eis-billing-1.0.0/eis/billing/api_client.py +964 -0
- eis-billing-1.0.0/eis/billing/apis/__init__.py +21 -0
- eis-billing-1.0.0/eis/billing/configuration.py +456 -0
- eis-billing-1.0.0/eis/billing/exceptions.py +159 -0
- eis-billing-1.0.0/eis/billing/model/__init__.py +5 -0
- eis-billing-1.0.0/eis/billing/model/create_correction_invoices_response_class.py +276 -0
- eis-billing-1.0.0/eis/billing/model/create_custom_estimated_invoice_request_dto.py +280 -0
- eis-billing-1.0.0/eis/billing/model/create_custom_estimated_invoice_response_class.py +270 -0
- eis-billing-1.0.0/eis/billing/model/create_estimated_invoice_request_dto.py +282 -0
- eis-billing-1.0.0/eis/billing/model/create_estimated_invoice_response_class.py +282 -0
- eis-billing-1.0.0/eis/billing/model/create_invoice_request_dto.py +316 -0
- eis-billing-1.0.0/eis/billing/model/create_invoice_response_class.py +276 -0
- eis-billing-1.0.0/eis/billing/model/create_invoice_status_request_dto.py +280 -0
- eis-billing-1.0.0/eis/billing/model/create_termination_invoice_request_dto.py +292 -0
- eis-billing-1.0.0/eis/billing/model/invoice_class.py +400 -0
- eis-billing-1.0.0/eis/billing/model/invoice_item_class.py +362 -0
- eis-billing-1.0.0/eis/billing/model/invoice_status_class.py +292 -0
- eis-billing-1.0.0/eis/billing/model/list_invoices_response_class.py +282 -0
- eis-billing-1.0.0/eis/billing/model/list_policies_billing_dates_response_class.py +282 -0
- eis-billing-1.0.0/eis/billing/model/list_request_dto.py +284 -0
- eis-billing-1.0.0/eis/billing/model/omit_type_class.py +392 -0
- eis-billing-1.0.0/eis/billing/model/policy_billing_date_class.py +288 -0
- eis-billing-1.0.0/eis/billing/model/policy_dto.py +372 -0
- eis-billing-1.0.0/eis/billing/model/policy_object_dto.py +294 -0
- eis-billing-1.0.0/eis/billing/model/policy_premium_dto.py +296 -0
- eis-billing-1.0.0/eis/billing/model/policy_premium_item_dto.py +302 -0
- eis-billing-1.0.0/eis/billing/model/policy_version_dto.py +306 -0
- eis-billing-1.0.0/eis/billing/model/premium_formula_dto.py +314 -0
- eis-billing-1.0.0/eis/billing/model/revert_invoice_request_dto.py +270 -0
- eis-billing-1.0.0/eis/billing/model/timeslice_dto.py +314 -0
- eis-billing-1.0.0/eis/billing/model_utils.py +2057 -0
- eis-billing-1.0.0/eis/billing/models/__init__.py +36 -0
- eis-billing-1.0.0/eis/billing/rest.py +353 -0
- eis-billing-1.0.0/eis_billing.egg-info/PKG-INFO +194 -0
- eis-billing-1.0.0/eis_billing.egg-info/SOURCES.txt +79 -0
- eis-billing-1.0.0/eis_billing.egg-info/dependency_links.txt +1 -0
- eis-billing-1.0.0/eis_billing.egg-info/requires.txt +2 -0
- eis-billing-1.0.0/eis_billing.egg-info/top_level.txt +1 -0
- eis-billing-1.0.0/setup.cfg +11 -0
- eis-billing-1.0.0/setup.py +40 -0
- eis-billing-1.0.0/test/test_correction_invoices_api.py +36 -0
- eis-billing-1.0.0/test/test_create_correction_invoices_response_class.py +38 -0
- eis-billing-1.0.0/test/test_create_custom_estimated_invoice_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_create_custom_estimated_invoice_response_class.py +36 -0
- eis-billing-1.0.0/test/test_create_estimated_invoice_request_dto.py +38 -0
- eis-billing-1.0.0/test/test_create_estimated_invoice_response_class.py +38 -0
- eis-billing-1.0.0/test/test_create_invoice_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_create_invoice_response_class.py +38 -0
- eis-billing-1.0.0/test/test_create_invoice_status_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_create_termination_invoice_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_estimated_invoices_api.py +43 -0
- eis-billing-1.0.0/test/test_initial_invoices_api.py +36 -0
- eis-billing-1.0.0/test/test_invoice_class.py +40 -0
- eis-billing-1.0.0/test/test_invoice_item_class.py +36 -0
- eis-billing-1.0.0/test/test_invoice_status_class.py +36 -0
- eis-billing-1.0.0/test/test_invoices_api.py +43 -0
- eis-billing-1.0.0/test/test_list_invoices_response_class.py +38 -0
- eis-billing-1.0.0/test/test_list_policies_billing_dates_response_class.py +38 -0
- eis-billing-1.0.0/test/test_list_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_omit_type_class.py +38 -0
- eis-billing-1.0.0/test/test_policy_billing_date_class.py +36 -0
- eis-billing-1.0.0/test/test_policy_dto.py +38 -0
- eis-billing-1.0.0/test/test_policy_object_dto.py +36 -0
- eis-billing-1.0.0/test/test_policy_premium_dto.py +38 -0
- eis-billing-1.0.0/test/test_policy_premium_item_dto.py +38 -0
- eis-billing-1.0.0/test/test_policy_version_dto.py +38 -0
- eis-billing-1.0.0/test/test_premium_formula_dto.py +36 -0
- eis-billing-1.0.0/test/test_recurring_invoices_api.py +36 -0
- eis-billing-1.0.0/test/test_revert_invoice_request_dto.py +36 -0
- eis-billing-1.0.0/test/test_timeslice_dto.py +40 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: eis-billing
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: EMIL BillingService
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Contact us
|
|
7
|
+
Author-email: kontakt@emil.de
|
|
8
|
+
Keywords: OpenAPI,OpenAPI-Generator,EMIL BillingService
|
|
9
|
+
Requires-Python: >=3.6
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# eis-billing
|
|
13
|
+
The EMIL BillingService API description
|
|
14
|
+
|
|
15
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
16
|
+
|
|
17
|
+
- API version: 1.0
|
|
18
|
+
- Package version: 1.0.0
|
|
19
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
20
|
+
For more information, please visit [https://www.emil.de](https://www.emil.de)
|
|
21
|
+
|
|
22
|
+
## Requirements.
|
|
23
|
+
|
|
24
|
+
Python >=3.6
|
|
25
|
+
|
|
26
|
+
## Installation & Usage
|
|
27
|
+
### pip install
|
|
28
|
+
|
|
29
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
pip install eis.billing
|
|
33
|
+
```
|
|
34
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emilDev/eis-billing-sdk.git`)
|
|
35
|
+
|
|
36
|
+
Then import the package:
|
|
37
|
+
```python
|
|
38
|
+
import eis.billing
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Setuptools
|
|
42
|
+
|
|
43
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
python setup.py install --user
|
|
47
|
+
```
|
|
48
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
49
|
+
|
|
50
|
+
Then import the package:
|
|
51
|
+
```python
|
|
52
|
+
import eis.billing
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Getting Started
|
|
56
|
+
|
|
57
|
+
The environment variables must be set in order to properly use this SDK.
|
|
58
|
+
|
|
59
|
+
```shell
|
|
60
|
+
export EMIL_USERNAME=XXXXXXX
|
|
61
|
+
export EMIL_PASSWORD=XXXXXXX
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import time
|
|
68
|
+
import eis.billing
|
|
69
|
+
from pprint import pprint
|
|
70
|
+
from eis.billing.api import correction_invoices_api
|
|
71
|
+
from eis.billing.model.create_correction_invoices_response_class import CreateCorrectionInvoicesResponseClass
|
|
72
|
+
from eis.billing.model.create_invoice_request_dto import CreateInvoiceRequestDto
|
|
73
|
+
# Defining the host is optional and defaults to https://apiv2.emil.de
|
|
74
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
75
|
+
configuration = eis.billing.Configuration(
|
|
76
|
+
host = "https://apiv2.emil.de"
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# The client must configure the authentication and authorization parameters
|
|
80
|
+
# in accordance with the API server security policy.
|
|
81
|
+
# Examples for each auth method are provided below, use the example that
|
|
82
|
+
# satisfies your auth use case.
|
|
83
|
+
|
|
84
|
+
# Bearer is automatically handled with exported environment variables. However, you
|
|
85
|
+
# can manuallay configure Bearer authorization (JWT): bearer
|
|
86
|
+
configuration = eis.billing.Configuration(
|
|
87
|
+
access_token = 'YOUR_BEARER_TOKEN'
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# After manual token becomes invalid, the SDK will default to re-login automatically
|
|
91
|
+
# with environment variable credentials.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
# Enter a context with an instance of the API client
|
|
95
|
+
with eis.billing.ApiClient(configuration) as api_client:
|
|
96
|
+
# Create an instance of the API class
|
|
97
|
+
api_instance = correction_invoices_api.CorrectionInvoicesApi(api_client)
|
|
98
|
+
create_invoice_request_dto = CreateInvoiceRequestDto(
|
|
99
|
+
invoice_number="10",
|
|
100
|
+
account_number="472922",
|
|
101
|
+
policy_code="pol_SCnnpTpzZXArbeTZyKlHO",
|
|
102
|
+
type="initial",
|
|
103
|
+
metadata={},
|
|
104
|
+
billing_interval_from=dateutil_parser('2023-12-13T09:02:47.497Z'),
|
|
105
|
+
billing_interval_to=dateutil_parser('2024-01-13T09:02:47.497Z'),
|
|
106
|
+
due_date=dateutil_parser('2023-12-13T09:02:47.497Z'),
|
|
107
|
+
) # CreateInvoiceRequestDto |
|
|
108
|
+
authorization = "Authorization_example" # str | Bearer Token (optional)
|
|
109
|
+
idempotency_key = "Idempotency-Key_example" # str | Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough. (optional)
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
# Create the correction invoice
|
|
113
|
+
api_response = api_instance.create_correction_invoice(create_invoice_request_dto, authorization=authorization, idempotency_key=idempotency_key)
|
|
114
|
+
pprint(api_response)
|
|
115
|
+
except eis.billing.ApiException as e:
|
|
116
|
+
print("Exception when calling CorrectionInvoicesApi->create_correction_invoice: %s\n" % e)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Documentation for API Endpoints
|
|
120
|
+
|
|
121
|
+
All URIs are relative to *https://apiv2.emil.de*
|
|
122
|
+
|
|
123
|
+
Class | Method | HTTP request | Description
|
|
124
|
+
------------ | ------------- | ------------- | -------------
|
|
125
|
+
*CorrectionInvoicesApi* | [**create_correction_invoice**](docs/CorrectionInvoicesApi.md#create_correction_invoice) | **POST** /billingservice/v1/correction-invoices | Create the correction invoice
|
|
126
|
+
*EstimatedInvoicesApi* | [**create_custom_estimated_invoice**](docs/EstimatedInvoicesApi.md#create_custom_estimated_invoice) | **POST** /billingservice/v1/estimated-invoices/custom | Create the custom estimated invoice
|
|
127
|
+
*EstimatedInvoicesApi* | [**create_estimated_invoice**](docs/EstimatedInvoicesApi.md#create_estimated_invoice) | **POST** /billingservice/v1/estimated-invoices | Create the estimated invoice
|
|
128
|
+
*InitialInvoicesApi* | [**create_initial_invoice**](docs/InitialInvoicesApi.md#create_initial_invoice) | **POST** /billingservice/v1/initial-invoices | Create the initial invoice
|
|
129
|
+
*InvoicesApi* | [**list_invoices**](docs/InvoicesApi.md#list_invoices) | **GET** /billingservice/v1/invoices | List invoices
|
|
130
|
+
*InvoicesApi* | [**list_policies_billing_dates**](docs/InvoicesApi.md#list_policies_billing_dates) | **GET** /billingservice/v1/invoices/policies-billing-dates | List policies billing dates
|
|
131
|
+
*RecurringInvoicesApi* | [**create_recurring_invoice**](docs/RecurringInvoicesApi.md#create_recurring_invoice) | **POST** /billingservice/v1/recurring-invoices | Create the recurring invoice
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Documentation For Models
|
|
135
|
+
|
|
136
|
+
- [CreateCorrectionInvoicesResponseClass](docs/CreateCorrectionInvoicesResponseClass.md)
|
|
137
|
+
- [CreateCustomEstimatedInvoiceRequestDto](docs/CreateCustomEstimatedInvoiceRequestDto.md)
|
|
138
|
+
- [CreateCustomEstimatedInvoiceResponseClass](docs/CreateCustomEstimatedInvoiceResponseClass.md)
|
|
139
|
+
- [CreateEstimatedInvoiceRequestDto](docs/CreateEstimatedInvoiceRequestDto.md)
|
|
140
|
+
- [CreateEstimatedInvoiceResponseClass](docs/CreateEstimatedInvoiceResponseClass.md)
|
|
141
|
+
- [CreateInvoiceRequestDto](docs/CreateInvoiceRequestDto.md)
|
|
142
|
+
- [CreateInvoiceResponseClass](docs/CreateInvoiceResponseClass.md)
|
|
143
|
+
- [CreateInvoiceStatusRequestDto](docs/CreateInvoiceStatusRequestDto.md)
|
|
144
|
+
- [CreateTerminationInvoiceRequestDto](docs/CreateTerminationInvoiceRequestDto.md)
|
|
145
|
+
- [InvoiceClass](docs/InvoiceClass.md)
|
|
146
|
+
- [InvoiceItemClass](docs/InvoiceItemClass.md)
|
|
147
|
+
- [InvoiceStatusClass](docs/InvoiceStatusClass.md)
|
|
148
|
+
- [ListInvoicesResponseClass](docs/ListInvoicesResponseClass.md)
|
|
149
|
+
- [ListPoliciesBillingDatesResponseClass](docs/ListPoliciesBillingDatesResponseClass.md)
|
|
150
|
+
- [ListRequestDto](docs/ListRequestDto.md)
|
|
151
|
+
- [OmitTypeClass](docs/OmitTypeClass.md)
|
|
152
|
+
- [PolicyBillingDateClass](docs/PolicyBillingDateClass.md)
|
|
153
|
+
- [PolicyDto](docs/PolicyDto.md)
|
|
154
|
+
- [PolicyObjectDto](docs/PolicyObjectDto.md)
|
|
155
|
+
- [PolicyPremiumDto](docs/PolicyPremiumDto.md)
|
|
156
|
+
- [PolicyPremiumItemDto](docs/PolicyPremiumItemDto.md)
|
|
157
|
+
- [PolicyVersionDto](docs/PolicyVersionDto.md)
|
|
158
|
+
- [PremiumFormulaDto](docs/PremiumFormulaDto.md)
|
|
159
|
+
- [RevertInvoiceRequestDto](docs/RevertInvoiceRequestDto.md)
|
|
160
|
+
- [TimesliceDto](docs/TimesliceDto.md)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## Documentation For Authorization
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## bearer
|
|
167
|
+
|
|
168
|
+
- **Type**: Bearer authentication (JWT)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## Author
|
|
172
|
+
|
|
173
|
+
kontakt@emil.de
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## Notes for Large OpenAPI documents
|
|
177
|
+
If the OpenAPI document is large, imports in eis.billing.apis and eis.billing.models may fail with a
|
|
178
|
+
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
|
|
179
|
+
|
|
180
|
+
Solution 1:
|
|
181
|
+
Use specific imports for apis and models like:
|
|
182
|
+
- `from eis.billing.api.default_api import DefaultApi`
|
|
183
|
+
- `from eis.billing.model.pet import Pet`
|
|
184
|
+
|
|
185
|
+
Solution 2:
|
|
186
|
+
Before importing the package, adjust the maximum recursion limit as shown below:
|
|
187
|
+
```
|
|
188
|
+
import sys
|
|
189
|
+
sys.setrecursionlimit(1500)
|
|
190
|
+
import eis.billing
|
|
191
|
+
from eis.billing.apis import *
|
|
192
|
+
from eis.billing.models import *
|
|
193
|
+
```
|
|
194
|
+
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# eis-billing
|
|
2
|
+
The EMIL BillingService API description
|
|
3
|
+
|
|
4
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
5
|
+
|
|
6
|
+
- API version: 1.0
|
|
7
|
+
- Package version: 1.0.0
|
|
8
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
9
|
+
For more information, please visit [https://www.emil.de](https://www.emil.de)
|
|
10
|
+
|
|
11
|
+
## Requirements.
|
|
12
|
+
|
|
13
|
+
Python >=3.6
|
|
14
|
+
|
|
15
|
+
## Installation & Usage
|
|
16
|
+
### pip install
|
|
17
|
+
|
|
18
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pip install eis.billing
|
|
22
|
+
```
|
|
23
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emilDev/eis-billing-sdk.git`)
|
|
24
|
+
|
|
25
|
+
Then import the package:
|
|
26
|
+
```python
|
|
27
|
+
import eis.billing
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Setuptools
|
|
31
|
+
|
|
32
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
python setup.py install --user
|
|
36
|
+
```
|
|
37
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
38
|
+
|
|
39
|
+
Then import the package:
|
|
40
|
+
```python
|
|
41
|
+
import eis.billing
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Getting Started
|
|
45
|
+
|
|
46
|
+
The environment variables must be set in order to properly use this SDK.
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
export EMIL_USERNAME=XXXXXXX
|
|
50
|
+
export EMIL_PASSWORD=XXXXXXX
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import time
|
|
57
|
+
import eis.billing
|
|
58
|
+
from pprint import pprint
|
|
59
|
+
from eis.billing.api import correction_invoices_api
|
|
60
|
+
from eis.billing.model.create_correction_invoices_response_class import CreateCorrectionInvoicesResponseClass
|
|
61
|
+
from eis.billing.model.create_invoice_request_dto import CreateInvoiceRequestDto
|
|
62
|
+
# Defining the host is optional and defaults to https://apiv2.emil.de
|
|
63
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
64
|
+
configuration = eis.billing.Configuration(
|
|
65
|
+
host = "https://apiv2.emil.de"
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# The client must configure the authentication and authorization parameters
|
|
69
|
+
# in accordance with the API server security policy.
|
|
70
|
+
# Examples for each auth method are provided below, use the example that
|
|
71
|
+
# satisfies your auth use case.
|
|
72
|
+
|
|
73
|
+
# Bearer is automatically handled with exported environment variables. However, you
|
|
74
|
+
# can manuallay configure Bearer authorization (JWT): bearer
|
|
75
|
+
configuration = eis.billing.Configuration(
|
|
76
|
+
access_token = 'YOUR_BEARER_TOKEN'
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# After manual token becomes invalid, the SDK will default to re-login automatically
|
|
80
|
+
# with environment variable credentials.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# Enter a context with an instance of the API client
|
|
84
|
+
with eis.billing.ApiClient(configuration) as api_client:
|
|
85
|
+
# Create an instance of the API class
|
|
86
|
+
api_instance = correction_invoices_api.CorrectionInvoicesApi(api_client)
|
|
87
|
+
create_invoice_request_dto = CreateInvoiceRequestDto(
|
|
88
|
+
invoice_number="10",
|
|
89
|
+
account_number="472922",
|
|
90
|
+
policy_code="pol_SCnnpTpzZXArbeTZyKlHO",
|
|
91
|
+
type="initial",
|
|
92
|
+
metadata={},
|
|
93
|
+
billing_interval_from=dateutil_parser('2023-12-13T09:02:47.497Z'),
|
|
94
|
+
billing_interval_to=dateutil_parser('2024-01-13T09:02:47.497Z'),
|
|
95
|
+
due_date=dateutil_parser('2023-12-13T09:02:47.497Z'),
|
|
96
|
+
) # CreateInvoiceRequestDto |
|
|
97
|
+
authorization = "Authorization_example" # str | Bearer Token (optional)
|
|
98
|
+
idempotency_key = "Idempotency-Key_example" # str | Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough. (optional)
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
# Create the correction invoice
|
|
102
|
+
api_response = api_instance.create_correction_invoice(create_invoice_request_dto, authorization=authorization, idempotency_key=idempotency_key)
|
|
103
|
+
pprint(api_response)
|
|
104
|
+
except eis.billing.ApiException as e:
|
|
105
|
+
print("Exception when calling CorrectionInvoicesApi->create_correction_invoice: %s\n" % e)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Documentation for API Endpoints
|
|
109
|
+
|
|
110
|
+
All URIs are relative to *https://apiv2.emil.de*
|
|
111
|
+
|
|
112
|
+
Class | Method | HTTP request | Description
|
|
113
|
+
------------ | ------------- | ------------- | -------------
|
|
114
|
+
*CorrectionInvoicesApi* | [**create_correction_invoice**](docs/CorrectionInvoicesApi.md#create_correction_invoice) | **POST** /billingservice/v1/correction-invoices | Create the correction invoice
|
|
115
|
+
*EstimatedInvoicesApi* | [**create_custom_estimated_invoice**](docs/EstimatedInvoicesApi.md#create_custom_estimated_invoice) | **POST** /billingservice/v1/estimated-invoices/custom | Create the custom estimated invoice
|
|
116
|
+
*EstimatedInvoicesApi* | [**create_estimated_invoice**](docs/EstimatedInvoicesApi.md#create_estimated_invoice) | **POST** /billingservice/v1/estimated-invoices | Create the estimated invoice
|
|
117
|
+
*InitialInvoicesApi* | [**create_initial_invoice**](docs/InitialInvoicesApi.md#create_initial_invoice) | **POST** /billingservice/v1/initial-invoices | Create the initial invoice
|
|
118
|
+
*InvoicesApi* | [**list_invoices**](docs/InvoicesApi.md#list_invoices) | **GET** /billingservice/v1/invoices | List invoices
|
|
119
|
+
*InvoicesApi* | [**list_policies_billing_dates**](docs/InvoicesApi.md#list_policies_billing_dates) | **GET** /billingservice/v1/invoices/policies-billing-dates | List policies billing dates
|
|
120
|
+
*RecurringInvoicesApi* | [**create_recurring_invoice**](docs/RecurringInvoicesApi.md#create_recurring_invoice) | **POST** /billingservice/v1/recurring-invoices | Create the recurring invoice
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## Documentation For Models
|
|
124
|
+
|
|
125
|
+
- [CreateCorrectionInvoicesResponseClass](docs/CreateCorrectionInvoicesResponseClass.md)
|
|
126
|
+
- [CreateCustomEstimatedInvoiceRequestDto](docs/CreateCustomEstimatedInvoiceRequestDto.md)
|
|
127
|
+
- [CreateCustomEstimatedInvoiceResponseClass](docs/CreateCustomEstimatedInvoiceResponseClass.md)
|
|
128
|
+
- [CreateEstimatedInvoiceRequestDto](docs/CreateEstimatedInvoiceRequestDto.md)
|
|
129
|
+
- [CreateEstimatedInvoiceResponseClass](docs/CreateEstimatedInvoiceResponseClass.md)
|
|
130
|
+
- [CreateInvoiceRequestDto](docs/CreateInvoiceRequestDto.md)
|
|
131
|
+
- [CreateInvoiceResponseClass](docs/CreateInvoiceResponseClass.md)
|
|
132
|
+
- [CreateInvoiceStatusRequestDto](docs/CreateInvoiceStatusRequestDto.md)
|
|
133
|
+
- [CreateTerminationInvoiceRequestDto](docs/CreateTerminationInvoiceRequestDto.md)
|
|
134
|
+
- [InvoiceClass](docs/InvoiceClass.md)
|
|
135
|
+
- [InvoiceItemClass](docs/InvoiceItemClass.md)
|
|
136
|
+
- [InvoiceStatusClass](docs/InvoiceStatusClass.md)
|
|
137
|
+
- [ListInvoicesResponseClass](docs/ListInvoicesResponseClass.md)
|
|
138
|
+
- [ListPoliciesBillingDatesResponseClass](docs/ListPoliciesBillingDatesResponseClass.md)
|
|
139
|
+
- [ListRequestDto](docs/ListRequestDto.md)
|
|
140
|
+
- [OmitTypeClass](docs/OmitTypeClass.md)
|
|
141
|
+
- [PolicyBillingDateClass](docs/PolicyBillingDateClass.md)
|
|
142
|
+
- [PolicyDto](docs/PolicyDto.md)
|
|
143
|
+
- [PolicyObjectDto](docs/PolicyObjectDto.md)
|
|
144
|
+
- [PolicyPremiumDto](docs/PolicyPremiumDto.md)
|
|
145
|
+
- [PolicyPremiumItemDto](docs/PolicyPremiumItemDto.md)
|
|
146
|
+
- [PolicyVersionDto](docs/PolicyVersionDto.md)
|
|
147
|
+
- [PremiumFormulaDto](docs/PremiumFormulaDto.md)
|
|
148
|
+
- [RevertInvoiceRequestDto](docs/RevertInvoiceRequestDto.md)
|
|
149
|
+
- [TimesliceDto](docs/TimesliceDto.md)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## Documentation For Authorization
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## bearer
|
|
156
|
+
|
|
157
|
+
- **Type**: Bearer authentication (JWT)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## Author
|
|
161
|
+
|
|
162
|
+
kontakt@emil.de
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## Notes for Large OpenAPI documents
|
|
166
|
+
If the OpenAPI document is large, imports in eis.billing.apis and eis.billing.models may fail with a
|
|
167
|
+
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
|
|
168
|
+
|
|
169
|
+
Solution 1:
|
|
170
|
+
Use specific imports for apis and models like:
|
|
171
|
+
- `from eis.billing.api.default_api import DefaultApi`
|
|
172
|
+
- `from eis.billing.model.pet import Pet`
|
|
173
|
+
|
|
174
|
+
Solution 2:
|
|
175
|
+
Before importing the package, adjust the maximum recursion limit as shown below:
|
|
176
|
+
```
|
|
177
|
+
import sys
|
|
178
|
+
sys.setrecursionlimit(1500)
|
|
179
|
+
import eis.billing
|
|
180
|
+
from eis.billing.apis import *
|
|
181
|
+
from eis.billing.models import *
|
|
182
|
+
```
|
|
183
|
+
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# flake8: noqa
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
EMIL BillingService
|
|
5
|
+
|
|
6
|
+
The EMIL BillingService API description # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: kontakt@emil.de
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
__version__ = "1.0.0"
|
|
15
|
+
|
|
16
|
+
# import ApiClient
|
|
17
|
+
from eis.billing.api_client import ApiClient
|
|
18
|
+
|
|
19
|
+
# import Configuration
|
|
20
|
+
from eis.billing.configuration import Configuration
|
|
21
|
+
|
|
22
|
+
# import exceptions
|
|
23
|
+
from eis.billing.exceptions import OpenApiException
|
|
24
|
+
from eis.billing.exceptions import ApiAttributeError
|
|
25
|
+
from eis.billing.exceptions import ApiTypeError
|
|
26
|
+
from eis.billing.exceptions import ApiValueError
|
|
27
|
+
from eis.billing.exceptions import ApiKeyError
|
|
28
|
+
from eis.billing.exceptions import ApiException
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"""
|
|
2
|
+
EMIL BillingService
|
|
3
|
+
|
|
4
|
+
The EMIL BillingService API description # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: kontakt@emil.de
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from eis.billing.api_client import ApiClient, Endpoint as _Endpoint
|
|
16
|
+
from eis.billing.model_utils import ( # noqa: F401
|
|
17
|
+
check_allowed_values,
|
|
18
|
+
check_validations,
|
|
19
|
+
date,
|
|
20
|
+
datetime,
|
|
21
|
+
file_type,
|
|
22
|
+
none_type,
|
|
23
|
+
validate_and_convert_types
|
|
24
|
+
)
|
|
25
|
+
from eis.billing.model.create_correction_invoices_response_class import CreateCorrectionInvoicesResponseClass
|
|
26
|
+
from eis.billing.model.create_invoice_request_dto import CreateInvoiceRequestDto
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class CorrectionInvoicesApi(object):
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None):
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
self.create_correction_invoice_endpoint = _Endpoint(
|
|
41
|
+
settings={
|
|
42
|
+
'response_type': (CreateCorrectionInvoicesResponseClass,),
|
|
43
|
+
'auth': [
|
|
44
|
+
'bearer'
|
|
45
|
+
],
|
|
46
|
+
'endpoint_path': '/billingservice/v1/correction-invoices',
|
|
47
|
+
'operation_id': 'create_correction_invoice',
|
|
48
|
+
'http_method': 'POST',
|
|
49
|
+
'servers': None,
|
|
50
|
+
},
|
|
51
|
+
params_map={
|
|
52
|
+
'all': [
|
|
53
|
+
'create_invoice_request_dto',
|
|
54
|
+
'authorization',
|
|
55
|
+
'idempotency_key',
|
|
56
|
+
],
|
|
57
|
+
'required': [
|
|
58
|
+
'create_invoice_request_dto',
|
|
59
|
+
],
|
|
60
|
+
'nullable': [
|
|
61
|
+
],
|
|
62
|
+
'enum': [
|
|
63
|
+
],
|
|
64
|
+
'validation': [
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
root_map={
|
|
68
|
+
'validations': {
|
|
69
|
+
},
|
|
70
|
+
'allowed_values': {
|
|
71
|
+
},
|
|
72
|
+
'openapi_types': {
|
|
73
|
+
'create_invoice_request_dto':
|
|
74
|
+
(CreateInvoiceRequestDto,),
|
|
75
|
+
'authorization':
|
|
76
|
+
(str,),
|
|
77
|
+
'idempotency_key':
|
|
78
|
+
(str,),
|
|
79
|
+
},
|
|
80
|
+
'attribute_map': {
|
|
81
|
+
'authorization': 'Authorization',
|
|
82
|
+
'idempotency_key': 'Idempotency-Key',
|
|
83
|
+
},
|
|
84
|
+
'location_map': {
|
|
85
|
+
'create_invoice_request_dto': 'body',
|
|
86
|
+
'authorization': 'header',
|
|
87
|
+
'idempotency_key': 'header',
|
|
88
|
+
},
|
|
89
|
+
'collection_format_map': {
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
headers_map={
|
|
93
|
+
'accept': [
|
|
94
|
+
'application/json'
|
|
95
|
+
],
|
|
96
|
+
'content_type': [
|
|
97
|
+
'application/json'
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
api_client=api_client
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
def create_correction_invoice(
|
|
104
|
+
self,
|
|
105
|
+
create_invoice_request_dto,
|
|
106
|
+
**kwargs
|
|
107
|
+
):
|
|
108
|
+
"""Create the correction invoice # noqa: E501
|
|
109
|
+
|
|
110
|
+
This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference. # noqa: E501
|
|
111
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
112
|
+
asynchronous HTTP request, please pass async_req=True
|
|
113
|
+
|
|
114
|
+
>>> thread = api.create_correction_invoice(create_invoice_request_dto, async_req=True)
|
|
115
|
+
>>> result = thread.get()
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
create_invoice_request_dto (CreateInvoiceRequestDto):
|
|
119
|
+
|
|
120
|
+
Keyword Args:
|
|
121
|
+
authorization (str): Bearer Token. [optional]
|
|
122
|
+
idempotency_key (str): Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.. [optional]
|
|
123
|
+
_return_http_data_only (bool): response data without head status
|
|
124
|
+
code and headers. Default is True.
|
|
125
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
126
|
+
will be returned without reading/decoding response data.
|
|
127
|
+
Default is True.
|
|
128
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
129
|
+
one number provided, it will be total request timeout. It can also
|
|
130
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
131
|
+
Default is None.
|
|
132
|
+
_check_input_type (bool): specifies if type checking
|
|
133
|
+
should be done one the data sent to the server.
|
|
134
|
+
Default is True.
|
|
135
|
+
_check_return_type (bool): specifies if type checking
|
|
136
|
+
should be done one the data received from the server.
|
|
137
|
+
Default is True.
|
|
138
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
139
|
+
are serialized names, as specified in the OpenAPI document.
|
|
140
|
+
False if the variable names in the input data
|
|
141
|
+
are pythonic names, e.g. snake case (default)
|
|
142
|
+
_content_type (str/None): force body content-type.
|
|
143
|
+
Default is None and content-type will be predicted by allowed
|
|
144
|
+
content-types and body.
|
|
145
|
+
_host_index (int/None): specifies the index of the server
|
|
146
|
+
that we want to use.
|
|
147
|
+
Default is read from the configuration.
|
|
148
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the authentication
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
Default is None
|
|
152
|
+
async_req (bool): execute request asynchronously
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
CreateCorrectionInvoicesResponseClass
|
|
156
|
+
If the method is called asynchronously, returns the request
|
|
157
|
+
thread.
|
|
158
|
+
"""
|
|
159
|
+
kwargs['async_req'] = kwargs.get(
|
|
160
|
+
'async_req', False
|
|
161
|
+
)
|
|
162
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
163
|
+
'_return_http_data_only', True
|
|
164
|
+
)
|
|
165
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
166
|
+
'_preload_content', True
|
|
167
|
+
)
|
|
168
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
169
|
+
'_request_timeout', None
|
|
170
|
+
)
|
|
171
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
172
|
+
'_check_input_type', True
|
|
173
|
+
)
|
|
174
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
175
|
+
'_check_return_type', True
|
|
176
|
+
)
|
|
177
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
178
|
+
'_spec_property_naming', False
|
|
179
|
+
)
|
|
180
|
+
kwargs['_content_type'] = kwargs.get(
|
|
181
|
+
'_content_type')
|
|
182
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
183
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
184
|
+
kwargs['create_invoice_request_dto'] = \
|
|
185
|
+
create_invoice_request_dto
|
|
186
|
+
return self.create_correction_invoice_endpoint.call_with_http_info(**kwargs)
|
|
187
|
+
|