IdentificationtemplatesClient
- class moloni.api.IdentificationtemplatesClient(environment: MoloniBaseUrl = MoloniBaseUrl.PROD, *, auth_config: AuthConfig = AuthConfig(client_id=None, client_secret=None, refresh_token=None, username=None, password=None), version: str = 'v1', validate: bool = True, log_level: str = 'INFO')
- count_modified_since(self, data: IdentificationtemplatesCountModifiedSinceModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesCountModifiedSinceModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the IdentificationtemplatesCountModifiedSinceModel.
lastmodified (str): lastmodified of the IdentificationtemplatesCountModifiedSinceModel.
- Returns:
The response from the API.
- Return type:
- delete(self, data: IdentificationtemplatesDeleteModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesDeleteModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the IdentificationtemplatesDeleteModel.
template_id (Union[str, int]): template_id of the IdentificationtemplatesDeleteModel.
- Returns:
The response from the API.
- Return type:
- get_all(self, data: IdentificationtemplatesGetAllModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesGetAllModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the IdentificationtemplatesGetAllModel.
- Returns:
The response from the API.
- Return type:
- get_modified_since(self, data: IdentificationtemplatesGetModifiedSinceModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesGetModifiedSinceModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the IdentificationtemplatesGetModifiedSinceModel.
lastmodified (str): lastmodified of the IdentificationtemplatesGetModifiedSinceModel.
- Returns:
The response from the API.
- Return type:
- insert(self, data: IdentificationtemplatesInsertModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesInsertModel, dict]) –
A model instance or dictionary containing the following fields:
address (str): address of the IdentificationtemplatesInsertModel.
business_name (str): business_name of the IdentificationtemplatesInsertModel.
city (str): city of the IdentificationtemplatesInsertModel.
company_id (Union[str, int]): company_id of the IdentificationtemplatesInsertModel.
country_id (Union[str, int]): country_id of the IdentificationtemplatesInsertModel.
documents_footnote (str): documents_footnote of the IdentificationtemplatesInsertModel.
email (str): email of the IdentificationtemplatesInsertModel.
email_sender_address (str): email_sender_address of the IdentificationtemplatesInsertModel.
email_sender_name (str): email_sender_name of the IdentificationtemplatesInsertModel.
fax (str): fax of the IdentificationtemplatesInsertModel.
name (str): name of the IdentificationtemplatesInsertModel.
notes (str): notes of the IdentificationtemplatesInsertModel.
phone (str): phone of the IdentificationtemplatesInsertModel.
website (str): website of the IdentificationtemplatesInsertModel.
zip_code (str): zip_code of the IdentificationtemplatesInsertModel.
- Returns:
The response from the API.
- Return type:
- update(self, data: IdentificationtemplatesUpdateModel | dict, **kwargs)
- Parameters:
data (Union[IdentificationtemplatesUpdateModel, dict]) –
A model instance or dictionary containing the following fields:
address (str): address of the IdentificationtemplatesUpdateModel.
business_name (str): business_name of the IdentificationtemplatesUpdateModel.
city (str): city of the IdentificationtemplatesUpdateModel.
company_id (Union[str, int]): company_id of the IdentificationtemplatesUpdateModel.
country_id (Union[str, int]): country_id of the IdentificationtemplatesUpdateModel.
documents_footnote (str): documents_footnote of the IdentificationtemplatesUpdateModel.
email (str): email of the IdentificationtemplatesUpdateModel.
email_sender_address (str): email_sender_address of the IdentificationtemplatesUpdateModel.
email_sender_name (str): email_sender_name of the IdentificationtemplatesUpdateModel.
fax (str): fax of the IdentificationtemplatesUpdateModel.
name (str): name of the IdentificationtemplatesUpdateModel.
notes (str): notes of the IdentificationtemplatesUpdateModel.
phone (str): phone of the IdentificationtemplatesUpdateModel.
template_id (Union[str, int]): template_id of the IdentificationtemplatesUpdateModel.
website (str): website of the IdentificationtemplatesUpdateModel.
zip_code (str): zip_code of the IdentificationtemplatesUpdateModel.
- Returns:
The response from the API.
- Return type:
Models:
- class moloni.api.IdentificationtemplatesCountModifiedSinceModel(*, company_id: str | int, lastmodified: str | None = None)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- lastmodified: str | None
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'company_id': FieldInfo(annotation=Union[str, int], required=True), 'lastmodified': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- class moloni.api.IdentificationtemplatesDeleteModel(*, company_id: str | int, template_id: str | int | None = None)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- template_id: str | int | None
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'company_id': FieldInfo(annotation=Union[str, int], required=True), 'template_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- class moloni.api.IdentificationtemplatesGetAllModel(*, company_id: str | int)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'company_id': FieldInfo(annotation=Union[str, int], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- class moloni.api.IdentificationtemplatesGetModifiedSinceModel(*, company_id: str | int, lastmodified: str | None = None)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- lastmodified: str | None
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'company_id': FieldInfo(annotation=Union[str, int], required=True), 'lastmodified': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- class moloni.api.IdentificationtemplatesInsertModel(*, company_id: str | int, address: str | None = None, business_name: str | None = None, city: str | None = None, country_id: str | int | None = None, documents_footnote: str | None = None, email: str | None = None, email_sender_address: str | None = None, email_sender_name: str | None = None, fax: str | None = None, name: str | None = None, notes: str | None = None, phone: str | None = None, website: str | None = None, zip_code: str | None = None)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- address: str | None
- business_name: str | None
- city: str | None
- country_id: str | int | None
- documents_footnote: str | None
- email: str | None
- email_sender_address: str | None
- email_sender_name: str | None
- fax: str | None
- name: str | None
- notes: str | None
- phone: str | None
- website: str | None
- zip_code: str | None
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'business_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'documents_footnote': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email_sender_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email_sender_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'website': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- class moloni.api.IdentificationtemplatesUpdateModel(*, company_id: str | int, address: str | None = None, business_name: str | None = None, city: str | None = None, country_id: str | int | None = None, documents_footnote: str | None = None, email: str | None = None, email_sender_address: str | None = None, email_sender_name: str | None = None, fax: str | None = None, name: str | None = None, notes: str | None = None, phone: str | None = None, template_id: str | int | None = None, website: str | None = None, zip_code: str | None = None)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- company_id: str | int
- address: str | None
- business_name: str | None
- city: str | None
- country_id: str | int | None
- documents_footnote: str | None
- email: str | None
- email_sender_address: str | None
- email_sender_name: str | None
- fax: str | None
- name: str | None
- notes: str | None
- phone: str | None
- template_id: str | int | None
- website: str | None
- zip_code: str | None
- request(self) ApiResponse
Make an API request using the initialized client.
This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.
- Returns:
The response from the API.
- Raises:
ValueError – If the client is not initialized via the connect method.
Example
# Assuming you have a model instance request_model and an API client api_client
..code-block:: python
- with request_model.connect(auth_config=auth_config) as api:
response = api.request()
# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'business_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'documents_footnote': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email_sender_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email_sender_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'template_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'website': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.