ProductsClient

class moloni.api.ProductsClient(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: ProductsCountModel | dict, **kwargs)
Parameters:

data (Union[ProductsCountModel, dict]) –

A model instance or dictionary containing the following fields:

  • category_id (Union[str, int]): category_id of the ProductsCountModel.

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

Returns:

The response from the API.

Return type:

ApiResponse

count_by_ean(self, data: ProductsCountByEanModel | dict, **kwargs)
Parameters:

data (Union[ProductsCountByEanModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • ean (str): ean of the ProductsCountByEanModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsCountByNameModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • name (str): name of the ProductsCountByNameModel.

Returns:

The response from the API.

Return type:

ApiResponse

count_by_reference(self, data: ProductsCountByReferenceModel | dict, **kwargs)
Parameters:

data (Union[ProductsCountByReferenceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • reference (str): reference of the ProductsCountByReferenceModel.

Returns:

The response from the API.

Return type:

ApiResponse

Parameters:

data (Union[ProductsCountBySearchModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • search (str): search of the ProductsCountBySearchModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsCountModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • lastmodified (str): lastmodified of the ProductsCountModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsDeleteModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • product_id (Union[str, int]): product_id of the ProductsDeleteModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsGetAllModel, dict]) –

A model instance or dictionary containing the following fields:

  • category_id (Union[str, int]): category_id of the ProductsGetAllModel.

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

  • offset (str): offset of the ProductsGetAllModel.

  • qty (str): qty of the ProductsGetAllModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_by_ean(self, data: ProductsGetByEanModel | dict, **kwargs)
Parameters:

data (Union[ProductsGetByEanModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • ean (str): ean of the ProductsGetByEanModel.

  • offset (str): offset of the ProductsGetByEanModel.

  • qty (str): qty of the ProductsGetByEanModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsGetByNameModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • name (str): name of the ProductsGetByNameModel.

  • offset (str): offset of the ProductsGetByNameModel.

  • qty (str): qty of the ProductsGetByNameModel.

Returns:

The response from the API.

Return type:

ApiResponse

get_by_reference(self, data: ProductsGetByReferenceModel | dict, **kwargs)
Parameters:

data (Union[ProductsGetByReferenceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • offset (str): offset of the ProductsGetByReferenceModel.

  • qty (str): qty of the ProductsGetByReferenceModel.

  • reference (str): reference of the ProductsGetByReferenceModel.

Returns:

The response from the API.

Return type:

ApiResponse

Parameters:

data (Union[ProductsGetBySearchModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • offset (str): offset of the ProductsGetBySearchModel.

  • qty (str): qty of the ProductsGetBySearchModel.

  • search (str): search of the ProductsGetBySearchModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsGetModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • lastmodified (str): lastmodified of the ProductsGetModifiedSinceModel.

  • offset (str): offset of the ProductsGetModifiedSinceModel.

  • qty (str): qty of the ProductsGetModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsGetOneModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • product_id (Union[str, int]): product_id of the ProductsGetOneModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsInsertModel, dict]) –

A model instance or dictionary containing the following fields:

  • at_product_category (str): at_product_category of the ProductsInsertModel.

  • category_id (Union[str, int]): category_id of the ProductsInsertModel.

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

  • ean (str): ean of the ProductsInsertModel.

  • exemption_reason (str): exemption_reason of the ProductsInsertModel.

  • has_stock (str): has_stock of the ProductsInsertModel.

  • name (str): name of the ProductsInsertModel.

  • pos_favorite (str): pos_favorite of the ProductsInsertModel.

  • price (str): price of the ProductsInsertModel.

  • reference (str): reference of the ProductsInsertModel.

  • stock (str): stock of the ProductsInsertModel.

  • summary (str): summary of the ProductsInsertModel.

  • suppliers (str): suppliers of the ProductsInsertModel.

  • taxes (str): taxes of the ProductsInsertModel.

  • type (str): type of the ProductsInsertModel.

  • unit_id (Union[str, int]): unit_id of the ProductsInsertModel.

  • warehouse_id (Union[str, int]): warehouse_id of the ProductsInsertModel.

  • warehouses (str): warehouses of the ProductsInsertModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[ProductsUpdateModel, dict]) –

A model instance or dictionary containing the following fields:

  • at_product_category (str): at_product_category of the ProductsUpdateModel.

  • category_id (Union[str, int]): category_id of the ProductsUpdateModel.

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

  • ean (str): ean of the ProductsUpdateModel.

  • exemption_reason (str): exemption_reason of the ProductsUpdateModel.

  • has_stock (str): has_stock of the ProductsUpdateModel.

  • name (str): name of the ProductsUpdateModel.

  • pos_favorite (str): pos_favorite of the ProductsUpdateModel.

  • price (str): price of the ProductsUpdateModel.

  • product_id (Union[str, int]): product_id of the ProductsUpdateModel.

  • reference (str): reference of the ProductsUpdateModel.

  • stock (str): stock of the ProductsUpdateModel.

  • summary (str): summary of the ProductsUpdateModel.

  • suppliers (str): suppliers of the ProductsUpdateModel.

  • taxes (str): taxes of the ProductsUpdateModel.

  • type (str): type of the ProductsUpdateModel.

  • unit_id (Union[str, int]): unit_id of the ProductsUpdateModel.

  • warehouse_id (Union[str, int]): warehouse_id of the ProductsUpdateModel.

Returns:

The response from the API.

Return type:

ApiResponse

Models:

class moloni.api.ProductsCountModel(*, company_id: str | int, category_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
category_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]] = {'category_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), '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.ProductsCountByEanModel(*, company_id: str | int, ean: 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
ean: 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), 'ean': 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.ProductsCountByNameModel(*, 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.ProductsCountByReferenceModel(*, company_id: str | int, reference: 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
reference: 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), 'reference': 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.ProductsCountBySearchModel(*, 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.ProductsCountModifiedSinceModel(*, 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.ProductsDeleteModel(*, company_id: str | int, product_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
product_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), 'product_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.ProductsGetAllModel(*, company_id: str | int, category_id: str | int | 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
category_id: str | int | 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]] = {'category_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), '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.ProductsGetByEanModel(*, company_id: str | int, ean: 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
ean: 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), 'ean': 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.ProductsGetByNameModel(*, 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.ProductsGetByReferenceModel(*, company_id: str | int, offset: str | int | None = 0, qty: str | int | None = 25, reference: 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
reference: 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), 'reference': 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.ProductsGetBySearchModel(*, 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.ProductsGetModifiedSinceModel(*, 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.ProductsGetOneModel(*, company_id: str | int, product_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
product_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), 'product_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.ProductsInsertModel(*, company_id: str | int, at_product_category: str | None = None, category_id: str | int | None = None, ean: str | None = None, exemption_reason: str | None = None, has_stock: str | None = None, name: str | None = None, pos_favorite: str | None = None, price: str | None = None, reference: str | None = None, stock: str | None = None, summary: str | None = None, suppliers: List[Suppliers] | None = None, taxes: List[Taxes] | None = None, type: str | None = None, unit_id: str | int | None = None, warehouse_id: str | int | None = None, warehouses: List[Warehouses] | 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
at_product_category: str | None
category_id: str | int | None
ean: str | None
exemption_reason: str | None
has_stock: str | None
name: str | None
pos_favorite: str | None
price: str | None
reference: str | None
stock: str | None
summary: str | None
suppliers: List[Suppliers] | None
taxes: List[Taxes] | None
type: str | None
unit_id: str | int | None
warehouse_id: str | int | None
warehouses: List[Warehouses] | 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]] = {'at_product_category': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'category_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'ean': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'exemption_reason': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'has_stock': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'pos_favorite': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'price': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'reference': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'stock': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'summary': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'suppliers': FieldInfo(annotation=Union[List[Suppliers], NoneType], required=False, default=None), 'taxes': FieldInfo(annotation=Union[List[Taxes], NoneType], required=False, default=None), 'type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'unit_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'warehouse_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'warehouses': FieldInfo(annotation=Union[List[Warehouses], 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.ProductsUpdateModel(*, company_id: str | int, at_product_category: str | None = None, category_id: str | int | None = None, ean: str | None = None, exemption_reason: str | None = None, has_stock: str | None = None, name: str | None = None, pos_favorite: str | None = None, price: str | None = None, product_id: str | int | None = None, reference: str | None = None, stock: str | None = None, summary: str | None = None, suppliers: List[Suppliers] | None = None, taxes: List[Taxes] | None = None, type: str | None = None, unit_id: str | int | None = None, warehouse_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
at_product_category: str | None
category_id: str | int | None
ean: str | None
exemption_reason: str | None
has_stock: str | None
name: str | None
pos_favorite: str | None
price: str | None
product_id: str | int | None
reference: str | None
stock: str | None
summary: str | None
suppliers: List[Suppliers] | None
taxes: List[Taxes] | None
type: str | None
unit_id: str | int | None
warehouse_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]] = {'at_product_category': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'category_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'ean': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'exemption_reason': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'has_stock': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'pos_favorite': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'price': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'product_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'reference': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'stock': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'summary': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'suppliers': FieldInfo(annotation=Union[List[Suppliers], NoneType], required=False, default=None), 'taxes': FieldInfo(annotation=Union[List[Taxes], NoneType], required=False, default=None), 'type': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'unit_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'warehouse_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.