CustomeralternateaddressesClient

class moloni.api.CustomeralternateaddressesClient(environment: MoloniBaseUrl = MoloniBaseUrl.PROD, *, auth_config: AuthConfig = AuthConfig(client_id=None, client_secret=None, refresh_token=None, username=None, password=None), version: str = 'v1', validate: bool = True, log_level: str = 'INFO')
count_modified_since(self, data: CustomeralternateaddressesCountModifiedSinceModel | dict, **kwargs)
Parameters:

data (Union[CustomeralternateaddressesCountModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • lastmodified (str): lastmodified of the CustomeralternateaddressesCountModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomeralternateaddressesDeleteModel, dict]) –

A model instance or dictionary containing the following fields:

  • address_id (Union[str, int]): address_id of the CustomeralternateaddressesDeleteModel.

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

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

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomeralternateaddressesGetAllModel, dict]) –

A model instance or dictionary containing the following fields:

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

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

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomeralternateaddressesGetModifiedSinceModel, dict]) –

A model instance or dictionary containing the following fields:

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

  • lastmodified (str): lastmodified of the CustomeralternateaddressesGetModifiedSinceModel.

  • offset (str): offset of the CustomeralternateaddressesGetModifiedSinceModel.

  • qty (str): qty of the CustomeralternateaddressesGetModifiedSinceModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomeralternateaddressesInsertModel, dict]) –

A model instance or dictionary containing the following fields:

  • address (str): address of the CustomeralternateaddressesInsertModel.

  • city (str): city of the CustomeralternateaddressesInsertModel.

  • code (str): code of the CustomeralternateaddressesInsertModel.

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

  • contact_name (str): contact_name of the CustomeralternateaddressesInsertModel.

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

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

  • designation (str): designation of the CustomeralternateaddressesInsertModel.

  • email (str): email of the CustomeralternateaddressesInsertModel.

  • fax (str): fax of the CustomeralternateaddressesInsertModel.

  • phone (str): phone of the CustomeralternateaddressesInsertModel.

  • zip_code (str): zip_code of the CustomeralternateaddressesInsertModel.

Returns:

The response from the API.

Return type:

ApiResponse

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

data (Union[CustomeralternateaddressesUpdateModel, dict]) –

A model instance or dictionary containing the following fields:

  • address (str): address of the CustomeralternateaddressesUpdateModel.

  • address_id (Union[str, int]): address_id of the CustomeralternateaddressesUpdateModel.

  • city (str): city of the CustomeralternateaddressesUpdateModel.

  • code (str): code of the CustomeralternateaddressesUpdateModel.

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

  • contact_name (str): contact_name of the CustomeralternateaddressesUpdateModel.

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

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

  • designation (str): designation of the CustomeralternateaddressesUpdateModel.

  • email (str): email of the CustomeralternateaddressesUpdateModel.

  • fax (str): fax of the CustomeralternateaddressesUpdateModel.

  • phone (str): phone of the CustomeralternateaddressesUpdateModel.

  • zip_code (str): zip_code of the CustomeralternateaddressesUpdateModel.

Returns:

The response from the API.

Return type:

ApiResponse

Models:

class moloni.api.CustomeralternateaddressesCountModifiedSinceModel(*, 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.CustomeralternateaddressesDeleteModel(*, company_id: str | int, address_id: str | int | None = None, customer_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
address_id: str | int | None
customer_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]] = {'address_id': FieldInfo(annotation=Union[str, int, 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)}

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.CustomeralternateaddressesGetAllModel(*, company_id: str | int, customer_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
customer_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), 'customer_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.CustomeralternateaddressesGetModifiedSinceModel(*, 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.CustomeralternateaddressesInsertModel(*, company_id: str | int, address: str | None = None, city: str | None = None, code: str | None = None, contact_name: str | None = None, country_id: str | int | None = None, customer_id: str | int | None = None, designation: str | None = None, email: str | None = None, fax: str | None = None, phone: str | None = None, zip_code: str | None = None)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

company_id: str | int
address: str | None
city: str | None
code: str | None
contact_name: str | None
country_id: str | int | None
customer_id: str | int | None
designation: str | None
email: str | None
fax: str | None
phone: str | None
zip_code: str | None
request(self) ApiResponse

Make an API request using the initialized client.

This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.

Returns:

The response from the API.

Raises:

ValueError – If the client is not initialized via the connect method.

Example

# Assuming you have a model instance request_model and an API client api_client

..code-block:: python

with request_model.connect(auth_config=auth_config) as api:

response = api.request()

# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'contact_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'designation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

class moloni.api.CustomeralternateaddressesUpdateModel(*, company_id: str | int, address: str | None = None, address_id: str | int | None = None, city: str | None = None, code: str | None = None, contact_name: str | None = None, country_id: str | int | None = None, customer_id: str | int | None = None, designation: str | None = None, email: str | None = None, fax: str | None = None, phone: str | None = None, zip_code: str | None = None)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

company_id: str | int
address: str | None
address_id: str | int | None
city: str | None
code: str | None
contact_name: str | None
country_id: str | int | None
customer_id: str | int | None
designation: str | None
email: str | None
fax: str | None
phone: str | None
zip_code: str | None
request(self) ApiResponse

Make an API request using the initialized client.

This method checks if the _api_client attribute is set (i.e., if the client has been initialized via the connect method). If the client is initialized, it will make an API request using the provided method name and the model’s data, excluding the _api_client attribute itself from the request payload. If the client is not initialized, it will raise a ValueError.

Returns:

The response from the API.

Raises:

ValueError – If the client is not initialized via the connect method.

Example

# Assuming you have a model instance request_model and an API client api_client

..code-block:: python

with request_model.connect(auth_config=auth_config) as api:

response = api.request()

# The above example assumes that the connect method has been used to initialize the client. # The request method then sends the model’s data to the API and returns the API’s response.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'address': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'address_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'city': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'company_id': FieldInfo(annotation=Union[str, int], required=True), 'contact_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'country_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'customer_id': FieldInfo(annotation=Union[str, int, NoneType], required=False, default=None), 'designation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'fax': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'phone': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'zip_code': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.