SuppliersClient

class moloni.api.SuppliersClient(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(self, data: SuppliersCountModel | dict, **kwargs)
Parameters:

data (Union[SuppliersCountModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountModel.

Returns:

The response from the API.

Return type:

ApiResponse

count_by_name(self, data: SuppliersCountByNameModel | dict, **kwargs)
Parameters:

data (Union[SuppliersCountByNameModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountByNameModel.

  • name (str): name of the SuppliersCountByNameModel.

Returns:

The response from the API.

Return type:

ApiResponse

count_by_number(self, data: SuppliersCountByNumberModel | dict, **kwargs)
Parameters:

data (Union[SuppliersCountByNumberModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountByNumberModel.

  • number (str): number of the SuppliersCountByNumberModel.

Returns:

The response from the API.

Return type:

ApiResponse

Parameters:

data (Union[SuppliersCountBySearchModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountBySearchModel.

  • search (str): search of the SuppliersCountBySearchModel.

Returns:

The response from the API.

Return type:

ApiResponse

count_by_vat(self, data: SuppliersCountByVatModel | dict, **kwargs)
Parameters:

data (Union[SuppliersCountByVatModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountByVatModel.

  • vat (str): vat of the SuppliersCountByVatModel.

Returns:

The response from the API.

Return type:

ApiResponse

count_modified_since(self, data: SuppliersCountModifiedSinceModel | dict, **kwargs)
Parameters:

data (Union[SuppliersCountModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersCountModifiedSinceModel.

  • lastmodified (str): lastmodified of the SuppliersCountModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

delete(self, data: SuppliersDeleteModel | dict, **kwargs)
Parameters:

data (Union[SuppliersDeleteModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersDeleteModel.

  • supplier_id (Union[str, int]): supplier_id of the SuppliersDeleteModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_all(self, data: SuppliersGetAllModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetAllModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetAllModel.

  • offset (str): offset of the SuppliersGetAllModel.

  • qty (str): qty of the SuppliersGetAllModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_by_name(self, data: SuppliersGetByNameModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetByNameModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetByNameModel.

  • name (str): name of the SuppliersGetByNameModel.

  • offset (str): offset of the SuppliersGetByNameModel.

  • qty (str): qty of the SuppliersGetByNameModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_by_number(self, data: SuppliersGetByNumberModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetByNumberModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetByNumberModel.

  • number (str): number of the SuppliersGetByNumberModel.

  • offset (str): offset of the SuppliersGetByNumberModel.

  • qty (str): qty of the SuppliersGetByNumberModel.

Returns:

The response from the API.

Return type:

ApiResponse

Parameters:

data (Union[SuppliersGetBySearchModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetBySearchModel.

  • offset (str): offset of the SuppliersGetBySearchModel.

  • qty (str): qty of the SuppliersGetBySearchModel.

  • search (str): search of the SuppliersGetBySearchModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_by_vat(self, data: SuppliersGetByVatModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetByVatModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetByVatModel.

  • offset (str): offset of the SuppliersGetByVatModel.

  • qty (str): qty of the SuppliersGetByVatModel.

  • vat (str): vat of the SuppliersGetByVatModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_modified_since(self, data: SuppliersGetModifiedSinceModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetModifiedSinceModel.

  • lastmodified (str): lastmodified of the SuppliersGetModifiedSinceModel.

  • offset (str): offset of the SuppliersGetModifiedSinceModel.

  • qty (str): qty of the SuppliersGetModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_one(self, data: SuppliersGetOneModel | dict, **kwargs)
Parameters:

data (Union[SuppliersGetOneModel, dict]) –

A model instance or dictionary containing the following fields:

  • company_id (Union[str, int]): company_id of the SuppliersGetOneModel.

  • supplier_id (Union[str, int]): supplier_id of the SuppliersGetOneModel.

Returns:

The response from the API.

Return type:

ApiResponse

insert(self, data: SuppliersInsertModel | dict, **kwargs)
Parameters:

data (Union[SuppliersInsertModel, dict]) –

A model instance or dictionary containing the following fields:

  • address (str): address of the SuppliersInsertModel.

  • city (str): city of the SuppliersInsertModel.

  • company_id (Union[str, int]): company_id of the SuppliersInsertModel.

  • contact_email (str): contact_email of the SuppliersInsertModel.

  • contact_name (str): contact_name of the SuppliersInsertModel.

  • contact_phone (str): contact_phone of the SuppliersInsertModel.

  • country_id (Union[str, int]): country_id of the SuppliersInsertModel.

  • credit_limit (str): credit_limit of the SuppliersInsertModel.

  • delivery_method_id (Union[str, int]): delivery_method_id of the SuppliersInsertModel.

  • discount (str): discount of the SuppliersInsertModel.

  • email (str): email of the SuppliersInsertModel.

  • fax (str): fax of the SuppliersInsertModel.

  • field_notes (str): field_notes of the SuppliersInsertModel.

  • language_id (Union[str, int]): language_id of the SuppliersInsertModel.

  • maturity_date_id (Union[str, int]): maturity_date_id of the SuppliersInsertModel.

  • name (str): name of the SuppliersInsertModel.

  • notes (str): notes of the SuppliersInsertModel.

  • number (str): number of the SuppliersInsertModel.

  • payment_method_id (Union[str, int]): payment_method_id of the SuppliersInsertModel.

  • phone (str): phone of the SuppliersInsertModel.

  • qty_copies_document (str): qty_copies_document of the SuppliersInsertModel.

  • vat (str): vat of the SuppliersInsertModel.

  • website (str): website of the SuppliersInsertModel.

  • zip_code (str): zip_code of the SuppliersInsertModel.

Returns:

The response from the API.

Return type:

ApiResponse

update(self, data: SuppliersUpdateModel | dict, **kwargs)
Parameters:

data (Union[SuppliersUpdateModel, dict]) –

A model instance or dictionary containing the following fields:

  • address (str): address of the SuppliersUpdateModel.

  • city (str): city of the SuppliersUpdateModel.

  • company_id (Union[str, int]): company_id of the SuppliersUpdateModel.

  • contact_email (str): contact_email of the SuppliersUpdateModel.

  • contact_name (str): contact_name of the SuppliersUpdateModel.

  • contact_phone (str): contact_phone of the SuppliersUpdateModel.

  • country_id (Union[str, int]): country_id of the SuppliersUpdateModel.

  • credit_limit (str): credit_limit of the SuppliersUpdateModel.

  • delivery_method_id (Union[str, int]): delivery_method_id of the SuppliersUpdateModel.

  • discount (str): discount of the SuppliersUpdateModel.

  • email (str): email of the SuppliersUpdateModel.

  • fax (str): fax of the SuppliersUpdateModel.

  • field_notes (str): field_notes of the SuppliersUpdateModel.

  • language_id (Union[str, int]): language_id of the SuppliersUpdateModel.

  • maturity_date_id (Union[str, int]): maturity_date_id of the SuppliersUpdateModel.

  • name (str): name of the SuppliersUpdateModel.

  • notes (str): notes of the SuppliersUpdateModel.

  • number (str): number of the SuppliersUpdateModel.

  • payment_method_id (Union[str, int]): payment_method_id of the SuppliersUpdateModel.

  • phone (str): phone of the SuppliersUpdateModel.

  • qty_copies_document (str): qty_copies_document of the SuppliersUpdateModel.

  • supplier_id (Union[str, int]): supplier_id of the SuppliersUpdateModel.

  • vat (str): vat of the SuppliersUpdateModel.

  • website (str): website of the SuppliersUpdateModel.

  • zip_code (str): zip_code of the SuppliersUpdateModel.

Returns:

The response from the API.

Return type:

ApiResponse

Models:

class moloni.api.SuppliersCountModel(*, 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.SuppliersCountByNameModel(*, company_id: str | int, name: 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
name: 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), 'name': 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.SuppliersCountByNumberModel(*, company_id: str | int, number: 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
number: 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), 'number': 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.SuppliersCountBySearchModel(*, company_id: str | int, search: 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
search: 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), 'search': 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.SuppliersCountByVatModel(*, company_id: str | int, vat: 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
vat: 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), 'vat': 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.SuppliersCountModifiedSinceModel(*, 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.SuppliersDeleteModel(*, company_id: str | int, supplier_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
supplier_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), 'supplier_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.SuppliersGetAllModel(*, company_id: str | int, offset: str | int | None = 0, qty: str | int | None = 25)

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
offset: str | int | None
qty: 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), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25)}

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.SuppliersGetByNameModel(*, company_id: str | int, name: str | None = None, offset: str | int | None = 0, qty: str | int | None = 25)

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
name: str | None
offset: str | int | None
qty: 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), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25)}

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.SuppliersGetByNumberModel(*, company_id: str | int, number: str | None = None, offset: str | int | None = 0, qty: str | int | None = 25)

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
number: str | None
offset: str | int | None
qty: 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), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25)}

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.SuppliersGetBySearchModel(*, company_id: str | int, offset: str | int | None = 0, qty: str | int | None = 25, search: 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
offset: str | int | None
qty: str | int | None
search: 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), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25), 'search': 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.SuppliersGetByVatModel(*, company_id: str | int, offset: str | int | None = 0, qty: str | int | None = 25, vat: 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
offset: str | int | None
qty: str | int | None
vat: 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), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25), 'vat': 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.SuppliersGetModifiedSinceModel(*, company_id: str | int, lastmodified: str | None = None, offset: str | int | None = 0, qty: str | int | None = 25)

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
offset: str | int | None
qty: 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), 'lastmodified': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'offset': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=0), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25)}

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.SuppliersGetOneModel(*, company_id: str | int, supplier_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
supplier_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), 'supplier_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.SuppliersInsertModel(*, company_id: str | int, address: str | None = None, city: str | None = None, contact_email: str | None = None, contact_name: str | None = None, contact_phone: str | None = None, country_id: str | int | None = None, credit_limit: str | None = None, delivery_method_id: str | int | None = None, discount: str | None = None, email: str | None = None, fax: str | None = None, field_notes: str | None = None, language_id: str | int | None = None, maturity_date_id: str | int | None = None, name: str | None = None, notes: str | None = None, number: str | None = None, payment_method_id: str | int | None = None, phone: str | None = None, qty_copies_document: str | None = None, vat: 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
city: str | None
contact_email: str | None
contact_name: str | None
contact_phone: str | None
country_id: str | int | None
credit_limit: str | None
delivery_method_id: str | int | None
discount: str | None
email: str | None
fax: str | None
field_notes: str | None
language_id: str | int | None
maturity_date_id: str | int | None
name: str | None
notes: str | None
number: str | None
payment_method_id: str | int | None
phone: str | None
qty_copies_document: str | None
vat: 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), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'contact_email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'contact_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'contact_phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'credit_limit': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'discount': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'field_notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'language_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'maturity_date_id': FieldInfo(annotation=Union[str, int, 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), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'payment_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'qty_copies_document': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'vat': 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.SuppliersUpdateModel(*, company_id: str | int, address: str | None = None, city: str | None = None, contact_email: str | None = None, contact_name: str | None = None, contact_phone: str | None = None, country_id: str | int | None = None, credit_limit: str | None = None, delivery_method_id: str | int | None = None, discount: str | None = None, email: str | None = None, fax: str | None = None, field_notes: str | None = None, language_id: str | int | None = None, maturity_date_id: str | int | None = None, name: str | None = None, notes: str | None = None, number: str | None = None, payment_method_id: str | int | None = None, phone: str | None = None, qty_copies_document: str | None = None, supplier_id: str | int | None = None, vat: 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
city: str | None
contact_email: str | None
contact_name: str | None
contact_phone: str | None
country_id: str | int | None
credit_limit: str | None
delivery_method_id: str | int | None
discount: str | None
email: str | None
fax: str | None
field_notes: str | None
language_id: str | int | None
maturity_date_id: str | int | None
name: str | None
notes: str | None
number: str | None
payment_method_id: str | int | None
phone: str | None
qty_copies_document: str | None
supplier_id: str | int | None
vat: 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), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'contact_email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'contact_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'contact_phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'credit_limit': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'discount': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'field_notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'language_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'maturity_date_id': FieldInfo(annotation=Union[str, int, 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), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'payment_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'qty_copies_document': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'supplier_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'vat': 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.