CustomerreturnnotesClient

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

data (Union[CustomerreturnnotesCountModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • customer_id (Union[str, int]): customer_id of the CustomerreturnnotesCountModel.

  • date (str): date of the CustomerreturnnotesCountModel.

  • document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesCountModel.

  • number (str): number of the CustomerreturnnotesCountModel.

  • year (str): year of the CustomerreturnnotesCountModel.

  • your_reference (str): your_reference of the CustomerreturnnotesCountModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomerreturnnotesDeleteModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • document_id (Union[str, int]): document_id of the CustomerreturnnotesDeleteModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomerreturnnotesGetAllModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • customer_id (Union[str, int]): customer_id of the CustomerreturnnotesGetAllModel.

  • date (str): date of the CustomerreturnnotesGetAllModel.

  • document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesGetAllModel.

  • number (str): number of the CustomerreturnnotesGetAllModel.

  • offset (str): offset of the CustomerreturnnotesGetAllModel.

  • qty (str): qty of the CustomerreturnnotesGetAllModel.

  • year (str): year of the CustomerreturnnotesGetAllModel.

  • your_reference (str): your_reference of the CustomerreturnnotesGetAllModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomerreturnnotesGetOneModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • customer_id (Union[str, int]): customer_id of the CustomerreturnnotesGetOneModel.

  • date (str): date of the CustomerreturnnotesGetOneModel.

  • document_id (Union[str, int]): document_id of the CustomerreturnnotesGetOneModel.

  • document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesGetOneModel.

  • number (str): number of the CustomerreturnnotesGetOneModel.

  • year (str): year of the CustomerreturnnotesGetOneModel.

  • your_reference (str): your_reference of the CustomerreturnnotesGetOneModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomerreturnnotesInsertModel, dict]) –

A model instance or dictionary containing the following fields:

  • associated_documents (str): associated_documents of the CustomerreturnnotesInsertModel.

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

  • customer_id (Union[str, int]): customer_id of the CustomerreturnnotesInsertModel.

  • date (str): date of the CustomerreturnnotesInsertModel.

  • delivery_datetime (str): delivery_datetime of the CustomerreturnnotesInsertModel.

  • delivery_departure_address (str): delivery_departure_address of the CustomerreturnnotesInsertModel.

  • delivery_departure_city (str): delivery_departure_city of the CustomerreturnnotesInsertModel.

  • delivery_departure_country (str): delivery_departure_country of the CustomerreturnnotesInsertModel.

  • delivery_departure_zip_code (str): delivery_departure_zip_code of the CustomerreturnnotesInsertModel.

  • delivery_destination_address (str): delivery_destination_address of the CustomerreturnnotesInsertModel.

  • delivery_destination_city (str): delivery_destination_city of the CustomerreturnnotesInsertModel.

  • delivery_destination_country (str): delivery_destination_country of the CustomerreturnnotesInsertModel.

  • delivery_destination_zip_code (str): delivery_destination_zip_code of the CustomerreturnnotesInsertModel.

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

  • document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesInsertModel.

  • financial_discount (str): financial_discount of the CustomerreturnnotesInsertModel.

  • notes (str): notes of the CustomerreturnnotesInsertModel.

  • products (str): products of the CustomerreturnnotesInsertModel.

  • related_documents_notes (str): related_documents_notes of the CustomerreturnnotesInsertModel.

  • status (str): status of the CustomerreturnnotesInsertModel.

  • vehicle_id (Union[str, int]): vehicle_id of the CustomerreturnnotesInsertModel.

  • your_reference (str): your_reference of the CustomerreturnnotesInsertModel.

Returns:

The response from the API.

Return type:

ApiResponse

set_transport_code(self, data: CustomerreturnnotesSetTransportCodeModel | dict, **kwargs)
Parameters:

data (Union[CustomerreturnnotesSetTransportCodeModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • document_id (Union[str, int]): document_id of the CustomerreturnnotesSetTransportCodeModel.

  • transport_code (str): transport_code of the CustomerreturnnotesSetTransportCodeModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomerreturnnotesUpdateModel, dict]) –

A model instance or dictionary containing the following fields:

  • associated_documents (str): associated_documents of the CustomerreturnnotesUpdateModel.

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

  • customer_id (Union[str, int]): customer_id of the CustomerreturnnotesUpdateModel.

  • date (str): date of the CustomerreturnnotesUpdateModel.

  • delivery_datetime (str): delivery_datetime of the CustomerreturnnotesUpdateModel.

  • delivery_departure_address (str): delivery_departure_address of the CustomerreturnnotesUpdateModel.

  • delivery_departure_city (str): delivery_departure_city of the CustomerreturnnotesUpdateModel.

  • delivery_departure_country (str): delivery_departure_country of the CustomerreturnnotesUpdateModel.

  • delivery_departure_zip_code (str): delivery_departure_zip_code of the CustomerreturnnotesUpdateModel.

  • delivery_destination_address (str): delivery_destination_address of the CustomerreturnnotesUpdateModel.

  • delivery_destination_city (str): delivery_destination_city of the CustomerreturnnotesUpdateModel.

  • delivery_destination_country (str): delivery_destination_country of the CustomerreturnnotesUpdateModel.

  • delivery_destination_zip_code (str): delivery_destination_zip_code of the CustomerreturnnotesUpdateModel.

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

  • document_id (Union[str, int]): document_id of the CustomerreturnnotesUpdateModel.

  • document_set_id (Union[str, int]): document_set_id of the CustomerreturnnotesUpdateModel.

  • financial_discount (str): financial_discount of the CustomerreturnnotesUpdateModel.

  • notes (str): notes of the CustomerreturnnotesUpdateModel.

  • products (str): products of the CustomerreturnnotesUpdateModel.

  • related_documents_notes (str): related_documents_notes of the CustomerreturnnotesUpdateModel.

  • status (str): status of the CustomerreturnnotesUpdateModel.

  • vehicle_id (Union[str, int]): vehicle_id of the CustomerreturnnotesUpdateModel.

  • your_reference (str): your_reference of the CustomerreturnnotesUpdateModel.

Returns:

The response from the API.

Return type:

ApiResponse

Models:

class moloni.api.CustomerreturnnotesCountModel(*, company_id: str | int, customer_id: str | int | None = None, date: str | None = None, document_set_id: str | int | None = None, number: str | None = None, year: str | None = None, your_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
customer_id: str | int | None
date: str | None
document_set_id: str | int | None
number: str | None
year: str | None
your_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), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'year': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'your_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.CustomerreturnnotesDeleteModel(*, company_id: str | int, document_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
document_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), 'document_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.CustomerreturnnotesGetAllModel(*, company_id: str | int, customer_id: str | int | None = None, date: str | None = None, document_set_id: str | int | None = None, number: str | None = None, offset: str | int | None = 0, qty: str | int | None = 25, year: str | None = None, your_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
customer_id: str | int | None
date: str | None
document_set_id: str | int | None
number: str | None
offset: str | int | None
qty: str | int | None
year: str | None
your_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), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), '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), 'year': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'your_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.CustomerreturnnotesGetOneModel(*, company_id: str | int, customer_id: str | int | None = None, date: str | None = None, document_id: str | int | None = None, document_set_id: str | int | None = None, number: str | None = None, year: str | None = None, your_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
customer_id: str | int | None
date: str | None
document_id: str | int | None
document_set_id: str | int | None
number: str | None
year: str | None
your_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), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'document_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'year': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'your_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.CustomerreturnnotesInsertModel(*, company_id: str | int, associated_documents: List[Associated_documents] | None = None, customer_id: str | int | None = None, date: str | None = None, delivery_datetime: str | None = None, delivery_departure_address: str | None = None, delivery_departure_city: str | None = None, delivery_departure_country: str | None = None, delivery_departure_zip_code: str | None = None, delivery_destination_address: str | None = None, delivery_destination_city: str | None = None, delivery_destination_country: str | None = None, delivery_destination_zip_code: str | None = None, delivery_method_id: str | int | None = None, document_set_id: str | int | None = None, financial_discount: str | None = None, notes: str | None = None, products: List[Products] | None = None, related_documents_notes: str | None = None, status: str | None = None, vehicle_id: str | int | None = None, your_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
associated_documents: List[Associated_documents] | None
customer_id: str | int | None
date: str | None
delivery_datetime: str | None
delivery_departure_address: str | None
delivery_departure_city: str | None
delivery_departure_country: str | None
delivery_departure_zip_code: str | None
delivery_destination_address: str | None
delivery_destination_city: str | None
delivery_destination_country: str | None
delivery_destination_zip_code: str | None
delivery_method_id: str | int | None
document_set_id: str | int | None
financial_discount: str | None
notes: str | None
products: List[Products] | None
related_documents_notes: str | None
status: str | None
vehicle_id: str | int | None
your_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]] = {'associated_documents': FieldInfo(annotation=Union[List[Associated_documents], NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_datetime': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_country': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_country': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'financial_discount': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'products': FieldInfo(annotation=Union[List[Products], NoneType], required=False, default=None), 'related_documents_notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'vehicle_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'your_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.CustomerreturnnotesSetTransportCodeModel(*, company_id: str | int, document_id: str | int | None = None, transport_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
document_id: str | int | None
transport_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]] = {'company_id': FieldInfo(annotation=Union[str, int], required=True), 'document_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'transport_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.CustomerreturnnotesUpdateModel(*, company_id: str | int, associated_documents: List[Associated_documents] | None = None, customer_id: str | int | None = None, date: str | None = None, delivery_datetime: str | None = None, delivery_departure_address: str | None = None, delivery_departure_city: str | None = None, delivery_departure_country: str | None = None, delivery_departure_zip_code: str | None = None, delivery_destination_address: str | None = None, delivery_destination_city: str | None = None, delivery_destination_country: str | None = None, delivery_destination_zip_code: str | None = None, delivery_method_id: str | int | None = None, document_id: str | int | None = None, document_set_id: str | int | None = None, financial_discount: str | None = None, notes: str | None = None, products: List[Products] | None = None, related_documents_notes: str | None = None, status: str | None = None, vehicle_id: str | int | None = None, your_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
associated_documents: List[Associated_documents] | None
customer_id: str | int | None
date: str | None
delivery_datetime: str | None
delivery_departure_address: str | None
delivery_departure_city: str | None
delivery_departure_country: str | None
delivery_departure_zip_code: str | None
delivery_destination_address: str | None
delivery_destination_city: str | None
delivery_destination_country: str | None
delivery_destination_zip_code: str | None
delivery_method_id: str | int | None
document_id: str | int | None
document_set_id: str | int | None
financial_discount: str | None
notes: str | None
products: List[Products] | None
related_documents_notes: str | None
status: str | None
vehicle_id: str | int | None
your_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]] = {'associated_documents': FieldInfo(annotation=Union[List[Associated_documents], NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_datetime': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_country': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_departure_zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_country': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_destination_zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'delivery_method_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'document_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'financial_discount': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'products': FieldInfo(annotation=Union[List[Products], NoneType], required=False, default=None), 'related_documents_notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'status': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'vehicle_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'your_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.