Skip to main content

Emil PublicAPI

Project description

eis-publicapi

The Emil Public API description

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.6.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit 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:

pip install eis.publicapi

(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:

import eis.publicapi

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import eis.publicapi

Getting Started

The environment variables must be set in order to properly use this SDK.

export EMIL_USERNAME=XXXXXXX
export EMIL_PASSWORD=XXXXXXX

Please follow the installation procedure and then run the following:

import time
import eis.publicapi
from pprint import pprint
from eis.publicapi.api import address_completions_validations_api
from eis.publicapi.model.address_completion_response_class import AddressCompletionResponseClass
from eis.publicapi.model.validate_address_response_class import ValidateAddressResponseClass
# 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.publicapi.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.publicapi.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.publicapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = address_completions_validations_api.AddressCompletionsValidationsApi(api_client)
    partial_address = "29 Acker" # str | Partial address for completion
    authorization = "Authorization_example" # str | Bearer Token (optional)
    country = "Germany" # str | This property can be used to filter addresses by country (optional)
    limit = 5 # float | The number of results to fetch (optional)

    try:
        # Retrieve the address
        api_response = api_instance.list_address_completions(partial_address, authorization=authorization, country=country, limit=limit)
        pprint(api_response)
    except eis.publicapi.ApiException as e:
        print("Exception when calling AddressCompletionsValidationsApi->list_address_completions: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AddressCompletionsValidationsApi list_address_completions GET /publicapi/v1/addresses/completions Retrieve the address
AddressCompletionsValidationsApi validate_address GET /publicapi/v1/addresses/validation Retrieve the Address validation
DocumentsApi create_temporary_document POST /publicapi/v1/documents Create the temporary document
DocumentsApi download_document GET /publicapi/v1/documents/download/{code} Download a document
DocumentsApi list_documents GET /publicapi/v1/documents List documents
DocumentsApi list_product_documents GET /publicapi/v1/documents/{productCode} List product documents
LeadsApi create_lead POST /publicapi/v1/leads Create the lead
LeadsApi get_lead GET /publicapi/v1/leads/{code} Retrieve the lead
LeadsApi initiate_lead POST /publicapi/v1/leads/initiate Initiate a lead code
LeadsApi update_lead PUT /publicapi/v1/leads/{code} Update the lead
NotificationsApi send_notification POST /publicapi/v1/emails/send Send an email.
PaymentsSetupApi complete_payment_setup POST /publicapi/v1/payment-setup/complete Complete a payment setup
PaymentsSetupApi get_public_psp_config GET /publicapi/v1/payment-setup/get-psp-config Get public key and psp
PaymentsSetupApi initiate_payment_setup POST /publicapi/v1/payment-setup/initiate Initiate a payment setup
ProductsApi create_estimated_invoice POST /publicapi/v1/products/{product_code}/product-invoice Create the invoice product
ProductsApi custom_application POST /publicapi/v1/products/{product_code}/custom-application Create the custom application
ProductsApi get_insured_object_types GET /publicapi/v1/products/{product_code}/insured-object-types List insured object types
ProductsApi get_insured_objects GET /publicapi/v1/products/{product_code}/insured-objects List insured objects
ProductsApi get_product_custom_css GET /publicapi/v1/products/{product_code}/custom-css Generate a custom CSS
ProductsApi get_product_factors GET /publicapi/v1/products/{product_code}/product-factors List product factors
ProductsApi list_products GET /publicapi/v1/products List products

Documentation For Models

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.publicapi.apis and eis.publicapi.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.publicapi.api.default_api import DefaultApi
  • from eis.publicapi.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.publicapi
from eis.publicapi.apis import *
from eis.publicapi.models import *

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eis-publicapi-1.6.0.tar.gz (81.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page