CreditnotesClient
- class moloni.api.CreditnotesClient(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: CreditnotesCountModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesCountModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the CreditnotesCountModel.
customer_id (Union[str, int]): customer_id of the CreditnotesCountModel.
date (str): date of the CreditnotesCountModel.
document_set_id (Union[str, int]): document_set_id of the CreditnotesCountModel.
expiration_date (str): expiration_date of the CreditnotesCountModel.
number (str): number of the CreditnotesCountModel.
our_reference (str): our_reference of the CreditnotesCountModel.
salesman_id (Union[str, int]): salesman_id of the CreditnotesCountModel.
supplier_id (Union[str, int]): supplier_id of the CreditnotesCountModel.
year (str): year of the CreditnotesCountModel.
your_reference (str): your_reference of the CreditnotesCountModel.
- Returns:
The response from the API.
- Return type:
- delete(self, data: CreditnotesDeleteModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesDeleteModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the CreditnotesDeleteModel.
document_id (Union[str, int]): document_id of the CreditnotesDeleteModel.
- Returns:
The response from the API.
- Return type:
- get_all(self, data: CreditnotesGetAllModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesGetAllModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the CreditnotesGetAllModel.
customer_id (Union[str, int]): customer_id of the CreditnotesGetAllModel.
date (str): date of the CreditnotesGetAllModel.
document_set_id (Union[str, int]): document_set_id of the CreditnotesGetAllModel.
expiration_date (str): expiration_date of the CreditnotesGetAllModel.
number (str): number of the CreditnotesGetAllModel.
offset (str): offset of the CreditnotesGetAllModel.
our_reference (str): our_reference of the CreditnotesGetAllModel.
qty (str): qty of the CreditnotesGetAllModel.
salesman_id (Union[str, int]): salesman_id of the CreditnotesGetAllModel.
supplier_id (Union[str, int]): supplier_id of the CreditnotesGetAllModel.
year (str): year of the CreditnotesGetAllModel.
your_reference (str): your_reference of the CreditnotesGetAllModel.
- Returns:
The response from the API.
- Return type:
- get_one(self, data: CreditnotesGetOneModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesGetOneModel, dict]) –
A model instance or dictionary containing the following fields:
company_id (Union[str, int]): company_id of the CreditnotesGetOneModel.
customer_id (Union[str, int]): customer_id of the CreditnotesGetOneModel.
date (str): date of the CreditnotesGetOneModel.
document_id (Union[str, int]): document_id of the CreditnotesGetOneModel.
document_set_id (Union[str, int]): document_set_id of the CreditnotesGetOneModel.
expiration_date (str): expiration_date of the CreditnotesGetOneModel.
number (str): number of the CreditnotesGetOneModel.
our_reference (str): our_reference of the CreditnotesGetOneModel.
salesman_id (Union[str, int]): salesman_id of the CreditnotesGetOneModel.
supplier_id (Union[str, int]): supplier_id of the CreditnotesGetOneModel.
year (str): year of the CreditnotesGetOneModel.
your_reference (str): your_reference of the CreditnotesGetOneModel.
- Returns:
The response from the API.
- Return type:
- insert(self, data: CreditnotesInsertModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesInsertModel, dict]) –
A model instance or dictionary containing the following fields:
associated_documents (str): associated_documents of the CreditnotesInsertModel.
company_id (Union[str, int]): company_id of the CreditnotesInsertModel.
customer_id (Union[str, int]): customer_id of the CreditnotesInsertModel.
date (str): date of the CreditnotesInsertModel.
deduction_id (Union[str, int]): deduction_id of the CreditnotesInsertModel.
document_set_id (Union[str, int]): document_set_id of the CreditnotesInsertModel.
financial_discount (str): financial_discount of the CreditnotesInsertModel.
notes (str): notes of the CreditnotesInsertModel.
products (str): products of the CreditnotesInsertModel.
related_documents_notes (str): related_documents_notes of the CreditnotesInsertModel.
salesman_commission (str): salesman_commission of the CreditnotesInsertModel.
salesman_id (Union[str, int]): salesman_id of the CreditnotesInsertModel.
status (str): status of the CreditnotesInsertModel.
your_reference (str): your_reference of the CreditnotesInsertModel.
- Returns:
The response from the API.
- Return type:
- update(self, data: CreditnotesUpdateModel | dict, **kwargs)
- Parameters:
data (Union[CreditnotesUpdateModel, dict]) –
A model instance or dictionary containing the following fields:
associated_documents (str): associated_documents of the CreditnotesUpdateModel.
company_id (Union[str, int]): company_id of the CreditnotesUpdateModel.
customer_id (Union[str, int]): customer_id of the CreditnotesUpdateModel.
date (str): date of the CreditnotesUpdateModel.
deduction_id (Union[str, int]): deduction_id of the CreditnotesUpdateModel.
document_id (Union[str, int]): document_id of the CreditnotesUpdateModel.
document_set_id (Union[str, int]): document_set_id of the CreditnotesUpdateModel.
financial_discount (str): financial_discount of the CreditnotesUpdateModel.
notes (str): notes of the CreditnotesUpdateModel.
products (str): products of the CreditnotesUpdateModel.
related_documents_notes (str): related_documents_notes of the CreditnotesUpdateModel.
salesman_commission (str): salesman_commission of the CreditnotesUpdateModel.
salesman_id (Union[str, int]): salesman_id of the CreditnotesUpdateModel.
status (str): status of the CreditnotesUpdateModel.
your_reference (str): your_reference of the CreditnotesUpdateModel.
- Returns:
The response from the API.
- Return type:
Models:
- class moloni.api.CreditnotesCountModel(*, company_id: str | int, customer_id: str | int | None = None, date: str | None = None, document_set_id: str | int | None = None, expiration_date: str | None = None, number: str | None = None, our_reference: str | None = None, salesman_id: str | int | None = None, supplier_id: str | int | 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
- expiration_date: str | None
- number: str | None
- our_reference: str | None
- salesman_id: str | int | None
- supplier_id: 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), 'expiration_date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'our_reference': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'salesman_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'supplier_id': FieldInfo(annotation=Union[str, int, 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.CreditnotesDeleteModel(*, 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.CreditnotesGetAllModel(*, company_id: str | int, customer_id: str | int | None = None, date: str | None = None, document_set_id: str | int | None = None, expiration_date: str | None = None, number: str | None = None, offset: str | int | None = 0, our_reference: str | None = None, qty: str | int | None = 25, salesman_id: str | int | None = None, supplier_id: str | int | 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
- expiration_date: str | None
- number: str | None
- offset: str | int | None
- our_reference: str | None
- qty: str | int | None
- salesman_id: str | int | None
- supplier_id: 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), 'expiration_date': FieldInfo(annotation=Union[str, 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), 'our_reference': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'qty': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=25), 'salesman_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'supplier_id': FieldInfo(annotation=Union[str, int, 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.CreditnotesGetOneModel(*, 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, expiration_date: str | None = None, number: str | None = None, our_reference: str | None = None, salesman_id: str | int | None = None, supplier_id: str | int | 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
- expiration_date: str | None
- number: str | None
- our_reference: str | None
- salesman_id: str | int | None
- supplier_id: 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_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'document_set_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'expiration_date': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'number': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'our_reference': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'salesman_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'supplier_id': FieldInfo(annotation=Union[str, int, 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.CreditnotesInsertModel(*, company_id: str | int, associated_documents: List[Associated_documents] | None = None, customer_id: str | int | None = None, date: str | None = None, deduction_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, salesman_commission: str | None = None, salesman_id: str | int | None = None, status: 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
- associated_documents: List[Associated_documents] | None
- customer_id: str | int | None
- date: str | None
- deduction_id: str | int | None
- document_set_id: str | int | None
- financial_discount: str | None
- notes: str | None
- products: List[Products] | None
- salesman_commission: str | None
- salesman_id: str | int | None
- status: 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]] = {'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), 'deduction_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), 'salesman_commission': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'salesman_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'status': 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.CreditnotesUpdateModel(*, company_id: str | int, associated_documents: List[Associated_documents] | None = None, customer_id: str | int | None = None, date: str | None = None, deduction_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, salesman_commission: str | None = None, salesman_id: str | int | None = None, status: 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
- associated_documents: List[Associated_documents] | None
- customer_id: str | int | None
- date: str | None
- deduction_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
- salesman_commission: str | None
- salesman_id: str | int | None
- status: 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]] = {'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), 'deduction_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), 'salesman_commission': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'salesman_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'status': 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.