diff --git a/Avalara/SDK/api/A1099/V2/companies_w9_api.py b/Avalara/SDK/api/A1099/V2/companies_w9_api.py index 6e77f38..973a0ab 100644 --- a/Avalara/SDK/api/A1099/V2/companies_w9_api.py +++ b/Avalara/SDK/api/A1099/V2/companies_w9_api.py @@ -16,13 +16,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -61,7 +61,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.create_company_endpoint = _Endpoint( @@ -455,9 +455,9 @@ def create_company( avalara_version, **kwargs ): - """Creates a new company # noqa: E501 + """Create a company # noqa: E501 - Creates a new company # noqa: E501 + Create a company. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -526,9 +526,9 @@ def delete_company( avalara_version, **kwargs ): - """Deletes a company # noqa: E501 + """Delete a company # noqa: E501 - Deletes a company # noqa: E501 + Delete a company. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -675,7 +675,7 @@ def get_company( ): """Retrieve a company # noqa: E501 - Retrieve an existing company # noqa: E501 + Retrieve a company. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -747,7 +747,7 @@ def update_company( ): """Update a company # noqa: E501 - Update a company # noqa: E501 + Update a company. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/Avalara/SDK/api/A1099/V2/forms1099_api.py b/Avalara/SDK/api/A1099/V2/forms1099_api.py index f6c645b..2fb4d18 100644 --- a/Avalara/SDK/api/A1099/V2/forms1099_api.py +++ b/Avalara/SDK/api/A1099/V2/forms1099_api.py @@ -16,13 +16,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,11 +40,12 @@ none_type, validate_and_convert_types ) -from pydantic import Field, StrictBool, StrictInt, StrictStr -from typing import Optional +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr +from typing import Optional, Union from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.bulk_upsert1099_forms_request import BulkUpsert1099FormsRequest -from Avalara.SDK.models.A1099.V2.form1099_list import Form1099List +from Avalara.SDK.models.A1099.V2.create1099_form201_response import Create1099Form201Response +from Avalara.SDK.models.A1099.V2.form1099_list_response import Form1099ListResponse from Avalara.SDK.models.A1099.V2.form1099_proccess_result import Form1099ProccessResult from Avalara.SDK.models.A1099.V2.get1099_form200_response import Get1099Form200Response from Avalara.SDK.models.A1099.V2.i_create_form1099_request import ICreateForm1099Request @@ -64,7 +65,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.bulk_upsert1099_forms_endpoint = _Endpoint( @@ -146,7 +147,7 @@ def __set_configuration(self, api_client): ) self.create1099_form_endpoint = _Endpoint( settings={ - 'response_type': (Get1099Form200Response,), + 'response_type': (Create1099Form201Response,), 'auth': [ 'bearer' ], @@ -358,7 +359,7 @@ def __set_configuration(self, api_client): ) self.get1099_form_pdf_endpoint = _Endpoint( settings={ - 'response_type': (Update1099Form200Response,), + 'response_type': (bytearray,), 'auth': [ 'bearer' ], @@ -423,6 +424,7 @@ def __set_configuration(self, api_client): headers_map={ 'avalara-version': '2.0', 'accept': [ + 'application/pdf', 'application/json' ], 'content_type': [], @@ -433,7 +435,7 @@ def __set_configuration(self, api_client): ) self.list1099_forms_endpoint = _Endpoint( settings={ - 'response_type': (Form1099List,), + 'response_type': (Form1099ListResponse,), 'auth': [ 'bearer' ], @@ -600,9 +602,9 @@ def bulk_upsert1099_forms( avalara_version, **kwargs ): - """Creates or updates multiple 1099 forms. # noqa: E501 + """Create or update multiple 1099/1095/W2/1042S forms # noqa: E501 - This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. # noqa: E501 + This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -671,8 +673,9 @@ def create1099_form( avalara_version, **kwargs ): - """Creates a 1099 form. # noqa: E501 + """Create a 1099/1095/W2/1042S form # noqa: E501 + Create a 1099/1095/W2/1042S form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -707,7 +710,7 @@ def create1099_form( async_req (bool): execute request asynchronously Returns: - Get1099Form200Response + Create1099Form201Response If the method is called asynchronously, returns the request thread. """ @@ -741,8 +744,9 @@ def delete1099_form( avalara_version, **kwargs ): - """Deletes a 1099 form. # noqa: E501 + """Delete a 1099/1095/W2/1042S form # noqa: E501 + Delete a 1099/1095/W2/1042S form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -812,8 +816,9 @@ def get1099_form( avalara_version, **kwargs ): - """Retrieves a 1099 form. # noqa: E501 + """Retrieve a 1099/1095/W2/1042S form # noqa: E501 + Retrieve a 1099/1095/W2/1042S form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -883,8 +888,9 @@ def get1099_form_pdf( avalara_version, **kwargs ): - """Retrieves the PDF file for a single 1099 by form id. # noqa: E501 + """Retrieve the PDF file for a 1099/1095/W2/1042S form # noqa: E501 + Retrieve the PDF file for a 1099/1095/W2/1042S form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -892,11 +898,11 @@ def get1099_form_pdf( >>> result = thread.get() Args: - id (str): + id (str): The ID of the form avalara_version (str): API version Keyword Args: - mark_edelivered (bool): The parameter for marked e-delivered. [optional] + mark_edelivered (bool): Optional boolean that if set indicates that the form should be marked as having been successfully edelivered. [optional] x_correlation_id (str): Unique correlation Id in a GUID format. [optional] x_avalara_client (str): Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .. [optional] _return_http_data_only (bool): response data without head status @@ -920,7 +926,7 @@ def get1099_form_pdf( async_req (bool): execute request asynchronously Returns: - Update1099Form200Response + bytearray If the method is called asynchronously, returns the request thread. """ @@ -954,8 +960,9 @@ def list1099_forms( avalara_version, **kwargs ): - """Retrieves a list of 1099 forms based on query parameters. # noqa: E501 + """List 1099/1095/W2/1042S forms # noqa: E501 + List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -993,7 +1000,7 @@ def list1099_forms( async_req (bool): execute request asynchronously Returns: - Form1099List + Form1099ListResponse If the method is called asynchronously, returns the request thread. """ @@ -1027,8 +1034,9 @@ def update1099_form( avalara_version, **kwargs ): - """Updates a 1099 form. # noqa: E501 + """Update a 1099/1095/W2/1042S form # noqa: E501 + Update a 1099/1095/W2/1042S form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/Avalara/SDK/api/A1099/V2/forms_w9_api.py b/Avalara/SDK/api/A1099/V2/forms_w9_api.py index eae246e..87c523c 100644 --- a/Avalara/SDK/api/A1099/V2/forms_w9_api.py +++ b/Avalara/SDK/api/A1099/V2/forms_w9_api.py @@ -16,13 +16,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -43,6 +43,8 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr from typing import Optional, Union from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.create_w9_form201_response import CreateW9Form201Response +from Avalara.SDK.models.A1099.V2.create_w9_form_request import CreateW9FormRequest from Avalara.SDK.models.A1099.V2.iw9_form_data_models_one_of import IW9FormDataModelsOneOf from Avalara.SDK.models.A1099.V2.paginated_w9_forms_model import PaginatedW9FormsModel from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException @@ -59,12 +61,12 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.create_w9_form_endpoint = _Endpoint( settings={ - 'response_type': (IW9FormDataModelsOneOf,), + 'response_type': (CreateW9Form201Response,), 'auth': [ 'bearer' ], @@ -78,7 +80,7 @@ def __set_configuration(self, api_client): 'avalara_version', 'x_correlation_id', 'x_avalara_client', - 'iw9_form_data_models_one_of', + 'create_w9_form_request', ], 'required': [ 'avalara_version', @@ -102,8 +104,8 @@ def __set_configuration(self, api_client): (str,), 'x_avalara_client': (str,), - 'iw9_form_data_models_one_of': - (IW9FormDataModelsOneOf,), + 'create_w9_form_request': + (CreateW9FormRequest,), }, 'attribute_map': { 'avalara_version': 'avalara-version', @@ -114,7 +116,7 @@ def __set_configuration(self, api_client): 'avalara_version': 'header', 'x_correlation_id': 'header', 'x_avalara_client': 'header', - 'iw9_form_data_models_one_of': 'body', + 'create_w9_form_request': 'body', }, 'collection_format_map': { } @@ -206,7 +208,7 @@ def __set_configuration(self, api_client): ) self.get_w9_form_endpoint = _Endpoint( settings={ - 'response_type': (IW9FormDataModelsOneOf,), + 'response_type': (CreateW9Form201Response,), 'auth': [ 'bearer' ], @@ -513,13 +515,13 @@ def __set_configuration(self, api_client): ) self.upload_w9_files_endpoint = _Endpoint( settings={ - 'response_type': (str,), + 'response_type': None, 'auth': [ 'bearer' ], 'endpoint_path': '/w9/forms/{id}/attachment', 'operation_id': 'upload_w9_files', - 'http_method': 'PUT', + 'http_method': 'POST', 'servers': None, }, params_map={ @@ -597,6 +599,7 @@ def create_w9_form( ): """Create a W9/W4/W8 form # noqa: E501 + Create a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -609,7 +612,7 @@ def create_w9_form( Keyword Args: x_correlation_id (str): Unique correlation Id in a GUID format. [optional] x_avalara_client (str): Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) .. [optional] - iw9_form_data_models_one_of (IW9FormDataModelsOneOf): Form to be created. [optional] + create_w9_form_request (CreateW9FormRequest): Form to be created. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -631,7 +634,7 @@ def create_w9_form( async_req (bool): execute request asynchronously Returns: - IW9FormDataModelsOneOf + CreateW9Form201Response If the method is called asynchronously, returns the request thread. """ @@ -665,9 +668,9 @@ def delete_w9_form( avalara_version, **kwargs ): - """Delete a form # noqa: E501 + """Delete a W9/W4/W8 form # noqa: E501 - Delete a form # noqa: E501 + Delete a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -675,7 +678,7 @@ def delete_w9_form( >>> result = thread.get() Args: - id (str): Id of the form to delete + id (str): ID of the form to delete avalara_version (str): API version Keyword Args: @@ -739,7 +742,7 @@ def get_w9_form( ): """Retrieve a W9/W4/W8 form # noqa: E501 - Retrieve a W9/W4/W8 form # noqa: E501 + Retrieve a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -747,7 +750,7 @@ def get_w9_form( >>> result = thread.get() Args: - id (str): Id of the form + id (str): ID of the form avalara_version (str): API version Keyword Args: @@ -774,7 +777,7 @@ def get_w9_form( async_req (bool): execute request asynchronously Returns: - IW9FormDataModelsOneOf + CreateW9Form201Response If the method is called asynchronously, returns the request thread. """ @@ -808,7 +811,7 @@ def list_w9_forms( avalara_version, **kwargs ): - """List W9/W4/W8 forms. # noqa: E501 + """List W9/W4/W8 forms # noqa: E501 List W9/W4/W8 forms. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -883,8 +886,9 @@ def send_w9_form_email( avalara_version, **kwargs ): - """Sends a W9 email request to a vendor/payee # noqa: E501 + """Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form # noqa: E501 + Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -956,6 +960,7 @@ def update_w9_form( ): """Update a W9/W4/W8 form # noqa: E501 + Update a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -963,7 +968,7 @@ def update_w9_form( >>> result = thread.get() Args: - id (str): Id of the form to update + id (str): ID of the form to update avalara_version (str): API version Keyword Args: @@ -1026,9 +1031,9 @@ def upload_w9_files( avalara_version, **kwargs ): - """Upload files for a W9/W4/W8 form # noqa: E501 + """Replace the PDF file for a W9/W4/W8 form # noqa: E501 - Upload files for a W9/W4/W8 form # noqa: E501 + Replaces the PDF file for a W9/W4/W8 form. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1064,7 +1069,7 @@ def upload_w9_files( async_req (bool): execute request asynchronously Returns: - str + None If the method is called asynchronously, returns the request thread. """ diff --git a/Avalara/SDK/api/A1099/V2/issuers1099_api.py b/Avalara/SDK/api/A1099/V2/issuers1099_api.py index 9efd821..1aed0a1 100644 --- a/Avalara/SDK/api/A1099/V2/issuers1099_api.py +++ b/Avalara/SDK/api/A1099/V2/issuers1099_api.py @@ -16,13 +16,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -60,7 +60,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.create_issuer_endpoint = _Endpoint( @@ -456,7 +456,7 @@ def create_issuer( ): """Create an issuer # noqa: E501 - Create a new issuer # noqa: E501 + Create an issuer (also known as a Payer). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -527,7 +527,7 @@ def delete_issuer( ): """Delete an issuer # noqa: E501 - Delete an issuer # noqa: E501 + Delete an issuer (also known as a Payer). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -597,9 +597,9 @@ def get_issuer( avalara_version, **kwargs ): - """Get an issuer # noqa: E501 + """Retrieve an issuer # noqa: E501 - Get an issuer # noqa: E501 + Retrieve an issuer (also known as a Payer). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -607,7 +607,7 @@ def get_issuer( >>> result = thread.get() Args: - id (str): + id (str): Id of the issuer to retrieve avalara_version (str): API version Keyword Args: @@ -670,7 +670,7 @@ def get_issuers( ): """List issuers # noqa: E501 - List issuers for a given tax year. Filterable fields are name, referenceId and taxYear # noqa: E501 + List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -746,7 +746,7 @@ def update_issuer( ): """Update an issuer # noqa: E501 - Update an existing issuer # noqa: E501 + Update an issuer (also known as a Payer). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -754,7 +754,7 @@ def update_issuer( >>> result = thread.get() Args: - id (str): Id of the issuer to Update + id (str): Id of the issuer to update avalara_version (str): API version Keyword Args: diff --git a/Avalara/SDK/api/A1099/V2/jobs1099_api.py b/Avalara/SDK/api/A1099/V2/jobs1099_api.py index dbc54cc..42ef86c 100644 --- a/Avalara/SDK/api/A1099/V2/jobs1099_api.py +++ b/Avalara/SDK/api/A1099/V2/jobs1099_api.py @@ -16,13 +16,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -58,7 +58,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.get_job_endpoint = _Endpoint( diff --git a/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py b/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py index d240fef..123d563 100644 --- a/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/data_input_fields_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,8 +40,9 @@ none_type, validate_and_convert_types ) -from pydantic import Field, StrictFloat, StrictInt, StrictStr -from typing import Optional, Union +from decimal import Decimal +from pydantic import Field, StrictStr +from typing import Optional from typing_extensions import Annotated from Avalara.SDK.models.EInvoicing.V1.data_input_fields_response import DataInputFieldsResponse from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException @@ -58,7 +59,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.get_data_input_fields_endpoint = _Endpoint( @@ -105,9 +106,9 @@ def __set_configuration(self, api_client): 'filter': (str,), 'top': - (float,), + (decimal.Decimal,), 'skip': - (str,), + (decimal.Decimal,), 'count': (bool,), 'count_only': @@ -135,7 +136,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -167,8 +168,8 @@ def get_data_input_fields( Keyword Args: x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint.. [optional] filter (str): Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering.. [optional] - top (float): The number of items to include in the result.. [optional] - skip (str): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] + top (decimal.Decimal): If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.. [optional] + skip (decimal.Decimal): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] count (bool): When set to true, the count of the collection is also returned in the response body. [optional] count_only (bool): When set to true, only the count of the collection is returned. [optional] _return_http_data_only (bool): response data without head status diff --git a/Avalara/SDK/api/EInvoicing/V1/documents_api.py b/Avalara/SDK/api/EInvoicing/V1/documents_api.py index 723d3d7..5498abc 100644 --- a/Avalara/SDK/api/EInvoicing/V1/documents_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/documents_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -41,7 +41,8 @@ validate_and_convert_types ) from datetime import datetime -from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr +from decimal import Decimal +from pydantic import Field, StrictBytes, StrictStr from typing import Any, Dict, Optional, Union from typing_extensions import Annotated from Avalara.SDK.models.EInvoicing.V1.document_fetch import DocumentFetch @@ -64,7 +65,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.download_document_endpoint = _Endpoint( @@ -128,7 +129,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/pdf', 'application/xml', @@ -194,7 +195,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -263,7 +264,7 @@ def __set_configuration(self, api_client): 'filter': (str,), 'top': - (float,), + (decimal.Decimal,), 'skip': (str,), }, @@ -295,7 +296,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -360,7 +361,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -431,7 +432,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json', 'text/xml' @@ -616,7 +617,7 @@ def get_document_list( count (str): When set to true, the count of the collection is also returned in the response body. [optional] count_only (str): When set to true, only the count of the collection is returned. [optional] filter (str): Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed.. [optional] - top (float): The number of items to include in the result.. [optional] + top (decimal.Decimal): If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records.. [optional] skip (str): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. diff --git a/Avalara/SDK/api/EInvoicing/V1/interop_api.py b/Avalara/SDK/api/EInvoicing/V1/interop_api.py index f41e173..bfa179c 100644 --- a/Avalara/SDK/api/EInvoicing/V1/interop_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/interop_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -58,7 +58,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.submit_interop_document_endpoint = _Endpoint( @@ -145,7 +145,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], diff --git a/Avalara/SDK/api/EInvoicing/V1/mandates_api.py b/Avalara/SDK/api/EInvoicing/V1/mandates_api.py index b792c8f..f88455b 100644 --- a/Avalara/SDK/api/EInvoicing/V1/mandates_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/mandates_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,8 +40,9 @@ none_type, validate_and_convert_types ) -from pydantic import Field, StrictFloat, StrictInt, StrictStr -from typing import List, Optional, Union +from decimal import Decimal +from pydantic import Field, StrictStr +from typing import List, Optional from typing_extensions import Annotated from Avalara.SDK.models.EInvoicing.V1.mandate_data_input_field import MandateDataInputField from Avalara.SDK.models.EInvoicing.V1.mandates_response import MandatesResponse @@ -59,7 +60,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.get_mandate_data_input_fields_endpoint = _Endpoint( @@ -129,7 +130,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -183,9 +184,9 @@ def __set_configuration(self, api_client): 'filter': (str,), 'top': - (float,), + (decimal.Decimal,), 'skip': - (str,), + (decimal.Decimal,), 'count': (bool,), 'count_only': @@ -213,7 +214,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -322,8 +323,8 @@ def get_mandates( Keyword Args: x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint.. [optional] filter (str): Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering.. [optional] - top (float): The number of items to include in the result.. [optional] - skip (str): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] + top (decimal.Decimal): If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.. [optional] + skip (decimal.Decimal): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] count (bool): When set to true, the count of the collection is also returned in the response body.. [optional] count_only (bool): When set to true, only the count of the collection is returned. [optional] _return_http_data_only (bool): response data without head status diff --git a/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py b/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py index 7f752c5..43866fb 100644 --- a/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/subscriptions_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,8 +40,8 @@ none_type, validate_and_convert_types ) -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Optional, Union +from pydantic import Field, StrictBool, StrictInt, StrictStr +from typing import Optional from typing_extensions import Annotated from Avalara.SDK.models.EInvoicing.V1.subscription_detail import SubscriptionDetail from Avalara.SDK.models.EInvoicing.V1.subscription_list_response import SubscriptionListResponse @@ -61,7 +61,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.create_webhook_subscription_endpoint = _Endpoint( @@ -123,7 +123,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -195,7 +195,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -265,7 +265,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -319,9 +319,9 @@ def __set_configuration(self, api_client): 'x_avalara_client': (str,), 'top': - (float,), + (int,), 'skip': - (float,), + (int,), 'count': (bool,), 'count_only': @@ -349,7 +349,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -377,7 +377,7 @@ def create_webhook_subscription( >>> result = thread.get() Args: - avalara_version (str): The version of the API to use, e.g., \"1.3\". + avalara_version (str): The version of the API to use, e.g., \"1.4\". subscription_registration (SubscriptionRegistration): Keyword Args: @@ -450,7 +450,7 @@ def delete_webhook_subscription( Args: subscription_id (str): - avalara_version (str): The version of the API to use, e.g., \"1.3\". + avalara_version (str): The version of the API to use, e.g., \"1.4\". Keyword Args: x_correlation_id (str): A unique identifier for tracking the request and its response. [optional] @@ -522,7 +522,7 @@ def get_webhook_subscription( Args: subscription_id (str): - avalara_version (str): The version of the API to use, e.g., \"1.3\". + avalara_version (str): The version of the API to use, e.g., \"1.4\". Keyword Args: x_correlation_id (str): A unique identifier for tracking the request and its response. [optional] @@ -592,13 +592,13 @@ def list_webhook_subscriptions( >>> result = thread.get() Args: - avalara_version (str): The version of the API to use, e.g., \"1.3\". + avalara_version (str): The version of the API to use, e.g., \"1.4\". Keyword Args: x_correlation_id (str): A unique identifier for tracking the request and its response. [optional] x_avalara_client (str): Client application identification. [optional] - top (float): The number of items to include in the result.. [optional] - skip (float): The number of items to skip in the result.. [optional] + top (int): The number of items to include in the result.. [optional] + skip (int): The number of items to skip in the result.. [optional] count (bool): Whether to include the total count of records in the result.. [optional] count_only (bool): Whether to return only the count of records, without the list of records.. [optional] _return_http_data_only (bool): response data without head status diff --git a/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py b/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py new file mode 100644 index 0000000..931f272 --- /dev/null +++ b/Avalara/SDK/api/EInvoicing/V1/tax_identifiers_api.py @@ -0,0 +1,363 @@ +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +import re # noqa: F401 +import sys # noqa: F401 +import decimal + +from Avalara.SDK.api_client import ApiClient, Endpoint as _Endpoint +from Avalara.SDK.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_request import TaxIdentifierRequest +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_response import TaxIdentifierResponse +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_schema_by_country200_response import TaxIdentifierSchemaByCountry200Response +from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException +from Avalara.SDK.oauth_helper.AvalaraSdkOauthUtils import avalara_retry_oauth + +class TaxIdentifiersApi(object): + + def __init__(self, api_client): + self.__set_configuration(api_client) + + def __verify_api_client(self,api_client): + if api_client is None: + raise ApiValueError("APIClient not defined") + + def __set_configuration(self, api_client): + self.__verify_api_client(api_client) + api_client.set_sdk_version("25.8.0") + self.api_client = api_client + + self.tax_identifier_schema_by_country_endpoint = _Endpoint( + settings={ + 'response_type': (TaxIdentifierSchemaByCountry200Response,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/tax-identifiers/schema', + 'operation_id': 'tax_identifier_schema_by_country', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'country_code', + 'x_avalara_client', + 'x_correlation_id', + 'type', + ], + 'required': [ + 'avalara_version', + 'country_code', + ], + 'nullable': [ + ], + 'enum': [ + 'type', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('type',): { + + "'request'": 'request', + "'response'": 'response' + }, + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'country_code': + (str,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + 'type': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'country_code': 'countryCode', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + 'type': 'type', + }, + 'location_map': { + 'avalara_version': 'header', + 'country_code': 'query', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + 'type': 'query', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) + self.validate_tax_identifier_endpoint = _Endpoint( + settings={ + 'response_type': (TaxIdentifierResponse,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/tax-identifiers/validate', + 'operation_id': 'validate_tax_identifier', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'tax_identifier_request', + 'x_avalara_client', + 'x_correlation_id', + ], + 'required': [ + 'avalara_version', + 'tax_identifier_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'tax_identifier_request': + (TaxIdentifierRequest,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + }, + 'location_map': { + 'avalara_version': 'header', + 'tax_identifier_request': 'body', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) + + @avalara_retry_oauth(max_retry_attempts=2) + def tax_identifier_schema_by_country( + self, + avalara_version, + country_code, + **kwargs + ): + """Returns the tax identifier request & response schema for a specific country. # noqa: E501 + + This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.tax_identifier_schema_by_country(avalara_version, country_code, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + country_code (str): The two-letter ISO-3166 country code for which the schema should be retrieved. + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + type (str): Specifies whether to return the request or response schema.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + TaxIdentifierSchemaByCountry200Response + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['country_code'] = country_code + return self.tax_identifier_schema_by_country_endpoint.call_with_http_info(**kwargs) + + @avalara_retry_oauth(max_retry_attempts=2) + def validate_tax_identifier( + self, + avalara_version, + tax_identifier_request, + **kwargs + ): + """Validates a tax identifier. # noqa: E501 + + This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.validate_tax_identifier(avalara_version, tax_identifier_request, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + tax_identifier_request (TaxIdentifierRequest): + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + TaxIdentifierResponse + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['tax_identifier_request'] = tax_identifier_request + return self.validate_tax_identifier_endpoint.call_with_http_info(**kwargs) + diff --git a/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py b/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py index f427e22..b5dd531 100644 --- a/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py +++ b/Avalara/SDK/api/EInvoicing/V1/trading_partners_api.py @@ -22,7 +22,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,13 +40,18 @@ none_type, validate_and_convert_types ) -from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr +from pydantic import Field, StrictBool, StrictBytes, StrictStr from typing import Optional, Union from typing_extensions import Annotated from Avalara.SDK.models.EInvoicing.V1.batch_search import BatchSearch from Avalara.SDK.models.EInvoicing.V1.batch_search_list_response import BatchSearchListResponse from Avalara.SDK.models.EInvoicing.V1.batch_search_participants202_response import BatchSearchParticipants202Response -from Avalara.SDK.models.EInvoicing.V1.directory_search_response import DirectorySearchResponse +from Avalara.SDK.models.EInvoicing.V1.create_trading_partner201_response import CreateTradingPartner201Response +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch200_response import CreateTradingPartnersBatch200Response +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch_request import CreateTradingPartnersBatchRequest +from Avalara.SDK.models.EInvoicing.V1.search_participants200_response import SearchParticipants200Response +from Avalara.SDK.models.EInvoicing.V1.trading_partner import TradingPartner +from Avalara.SDK.models.EInvoicing.V1.update_trading_partner200_response import UpdateTradingPartner200Response from Avalara.SDK.exceptions import ApiTypeError, ApiValueError, ApiException from Avalara.SDK.oauth_helper.AvalaraSdkOauthUtils import avalara_retry_oauth @@ -61,7 +66,7 @@ def __verify_api_client(self,api_client): def __set_configuration(self, api_client): self.__verify_api_client(api_client) - api_client.set_sdk_version("25.7.2") + api_client.set_sdk_version("25.8.0") self.api_client = api_client self.batch_search_participants_endpoint = _Endpoint( @@ -136,7 +141,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -148,6 +153,218 @@ def __set_configuration(self, api_client): required_scopes='', microservice='EInvoicing' ) + self.create_trading_partner_endpoint = _Endpoint( + settings={ + 'response_type': (CreateTradingPartner201Response,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/trading-partners', + 'operation_id': 'create_trading_partner', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'trading_partner', + 'x_avalara_client', + 'x_correlation_id', + ], + 'required': [ + 'avalara_version', + 'trading_partner', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'trading_partner': + (TradingPartner,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + }, + 'location_map': { + 'avalara_version': 'header', + 'trading_partner': 'body', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) + self.create_trading_partners_batch_endpoint = _Endpoint( + settings={ + 'response_type': (CreateTradingPartnersBatch200Response,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/trading-partners/batch', + 'operation_id': 'create_trading_partners_batch', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'create_trading_partners_batch_request', + 'x_avalara_client', + 'x_correlation_id', + ], + 'required': [ + 'avalara_version', + 'create_trading_partners_batch_request', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'create_trading_partners_batch_request': + (CreateTradingPartnersBatchRequest,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + }, + 'location_map': { + 'avalara_version': 'header', + 'create_trading_partners_batch_request': 'body', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) + self.delete_trading_partner_endpoint = _Endpoint( + settings={ + 'response_type': None, + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/trading-partners/{id}', + 'operation_id': 'delete_trading_partner', + 'http_method': 'DELETE', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'id', + 'x_avalara_client', + 'x_correlation_id', + ], + 'required': [ + 'avalara_version', + 'id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'id': + (str,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'id': 'id', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + }, + 'location_map': { + 'avalara_version': 'header', + 'id': 'path', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) self.download_batch_search_report_endpoint = _Endpoint( settings={ 'response_type': (bytearray,), @@ -208,7 +425,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'text/csv', 'application/json' @@ -279,7 +496,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -336,7 +553,7 @@ def __set_configuration(self, api_client): 'count': (bool,), 'top': - (float,), + (str,), 'skip': (str,), 'order_by': @@ -368,7 +585,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -380,7 +597,7 @@ def __set_configuration(self, api_client): ) self.search_participants_endpoint = _Endpoint( settings={ - 'response_type': (DirectorySearchResponse,), + 'response_type': (SearchParticipants200Response,), 'auth': [ 'Bearer' ], @@ -429,7 +646,7 @@ def __set_configuration(self, api_client): 'filter': (str,), 'top': - (float,), + (str,), 'skip': (str,), 'order_by': @@ -463,7 +680,7 @@ def __set_configuration(self, api_client): } }, headers_map={ - 'avalara-version': '1.3', + 'avalara-version': '1.4', 'accept': [ 'application/json' ], @@ -473,6 +690,83 @@ def __set_configuration(self, api_client): required_scopes='', microservice='EInvoicing' ) + self.update_trading_partner_endpoint = _Endpoint( + settings={ + 'response_type': (UpdateTradingPartner200Response,), + 'auth': [ + 'Bearer' + ], + 'endpoint_path': '/einvoicing/trading-partners/{id}', + 'operation_id': 'update_trading_partner', + 'http_method': 'PUT', + 'servers': None, + }, + params_map={ + 'all': [ + 'avalara_version', + 'id', + 'trading_partner', + 'x_avalara_client', + 'x_correlation_id', + ], + 'required': [ + 'avalara_version', + 'id', + 'trading_partner', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'avalara_version': + (str,), + 'id': + (str,), + 'trading_partner': + (TradingPartner,), + 'x_avalara_client': + (str,), + 'x_correlation_id': + (str,), + }, + 'attribute_map': { + 'avalara_version': 'avalara-version', + 'id': 'id', + 'x_avalara_client': 'X-Avalara-Client', + 'x_correlation_id': 'X-Correlation-ID', + }, + 'location_map': { + 'avalara_version': 'header', + 'id': 'path', + 'trading_partner': 'body', + 'x_avalara_client': 'header', + 'x_correlation_id': 'header', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'avalara-version': '1.4', + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] + }, + api_client=api_client, + required_scopes='', + microservice='EInvoicing' + ) @avalara_retry_oauth(max_retry_attempts=2) def batch_search_participants( @@ -483,9 +777,9 @@ def batch_search_participants( file, **kwargs ): - """Creates a batch search and performs a batch search in the directory for participants in the background. # noqa: E501 + """Handles batch search requests by uploading a file containing search parameters. # noqa: E501 - Handles batch search requests by uploading a file containing search parameters. # noqa: E501 + This endpoint creates a batch search and performs a batch search in the directory for participants in the background. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -493,13 +787,13 @@ def batch_search_participants( >>> result = thread.get() Args: - avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used - name (str): The human readable name given to this batch search. - notification_email (str): The email address of the user to whom the batch search completion notification must go to. - file (bytearray): CSV file containing search parameters. + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + name (str): A human-readable name for the batch search. + notification_email (str): The email address to which a notification will be sent once the batch search is complete. + file (bytearray): CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer Keyword Args: - x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". [optional] + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -552,6 +846,222 @@ def batch_search_participants( kwargs['file'] = file return self.batch_search_participants_endpoint.call_with_http_info(**kwargs) + @avalara_retry_oauth(max_retry_attempts=2) + def create_trading_partner( + self, + avalara_version, + trading_partner, + **kwargs + ): + """Creates a new trading partner. # noqa: E501 + + This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_trading_partner(avalara_version, trading_partner, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + trading_partner (TradingPartner): + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateTradingPartner201Response + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['trading_partner'] = trading_partner + return self.create_trading_partner_endpoint.call_with_http_info(**kwargs) + + @avalara_retry_oauth(max_retry_attempts=2) + def create_trading_partners_batch( + self, + avalara_version, + create_trading_partners_batch_request, + **kwargs + ): + """Creates a batch of multiple trading partners. # noqa: E501 + + This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_trading_partners_batch(avalara_version, create_trading_partners_batch_request, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + create_trading_partners_batch_request (CreateTradingPartnersBatchRequest): + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + CreateTradingPartnersBatch200Response + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['create_trading_partners_batch_request'] = create_trading_partners_batch_request + return self.create_trading_partners_batch_endpoint.call_with_http_info(**kwargs) + + @avalara_retry_oauth(max_retry_attempts=2) + def delete_trading_partner( + self, + avalara_version, + id, + **kwargs + ): + """Deletes a trading partner using ID. # noqa: E501 + + This endpoint deletes an existing trading partner identified by the provided ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_trading_partner(avalara_version, id, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + id (str): The ID of the trading partner which is being deleted. + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + None + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['id'] = id + return self.delete_trading_partner_endpoint.call_with_http_info(**kwargs) + @avalara_retry_oauth(max_retry_attempts=2) def download_batch_search_report( self, @@ -559,9 +1069,9 @@ def download_batch_search_report( id, **kwargs ): - """Download batch search results in a csv file. # noqa: E501 + """Downloads batch search results in a csv file. # noqa: E501 - Downloads the report for a specific batch search using the batch search ID. # noqa: E501 + This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -569,11 +1079,11 @@ def download_batch_search_report( >>> result = thread.get() Args: - avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used - id (str): The ID of the batch search whose report is to be downloaded. + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + id (str): The ID of the batch search for which the report should be downloaded. Keyword Args: - x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". [optional] + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -631,9 +1141,9 @@ def get_batch_search_detail( id, **kwargs ): - """Get the batch search details for a given id. # noqa: E501 + """Returns the batch search details using ID. # noqa: E501 - This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. # noqa: E501 + This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -641,11 +1151,11 @@ def get_batch_search_detail( >>> result = thread.get() Args: - avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. id (str): The ID of the batch search that was submitted earlier. Keyword Args: - x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". [optional] + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -702,9 +1212,9 @@ def list_batch_searches( avalara_version, **kwargs ): - """List all batch searches that were previously submitted. # noqa: E501 + """Lists all batch searches that were previously submitted. # noqa: E501 - This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. # noqa: E501 + This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -712,15 +1222,15 @@ def list_batch_searches( >>> result = thread.get() Args: - avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. Keyword Args: - x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". [optional] - filter (str): Filter by field name and value. This filter only supports eq .The parameters supported is name. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters.. [optional] - count (bool): When set to true, the count of the collection is included as @recordSetCount in the response body.. [optional] - top (float): The number of items to include in the result.. [optional] + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + filter (str): Filters the results by field name. Only the eq operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/).. [optional] + count (bool): When set to true, returns the total count of matching records included as @recordSetCount in the response body.. [optional] + top (str): If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records.. [optional] skip (str): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] - order_by (str): The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space.. [optional] + order_by (str): The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space.. [optional] x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -779,7 +1289,7 @@ def search_participants( ): """Returns a list of participants matching the input query. # noqa: E501 - This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. # noqa: E501 + This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -787,16 +1297,16 @@ def search_participants( >>> result = thread.get() Args: - avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used - search (str): Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + search (str): Search by value supports logical AND / OR operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). Keyword Args: - x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". [optional] - count (bool): When set to true, the count of the collection is included as @recordSetCount in the response body.. [optional] - filter (str): Filter by field name and value. This filter only supports eq .The parameters supported are network, country, documentType, idType. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters.. [optional] - top (float): The number of items to include in the result.. [optional] + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + count (bool): When set to true, returns the total count of matching records included as @recordSetCount in the response body.. [optional] + filter (str): Filters the results using the eq operator. Supported fields: network, country, documentType, idType. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/).. [optional] + top (str): If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records.. [optional] skip (str): If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.. [optional] - order_by (str): The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space.. [optional] + order_by (str): The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space.. [optional] x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. @@ -819,7 +1329,7 @@ def search_participants( async_req (bool): execute request asynchronously Returns: - DirectorySearchResponse + SearchParticipants200Response If the method is called asynchronously, returns the request thread. """ @@ -847,3 +1357,78 @@ def search_participants( kwargs['search'] = search return self.search_participants_endpoint.call_with_http_info(**kwargs) + @avalara_retry_oauth(max_retry_attempts=2) + def update_trading_partner( + self, + avalara_version, + id, + trading_partner, + **kwargs + ): + """Updates a trading partner using ID. # noqa: E501 + + This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_trading_partner(avalara_version, id, trading_partner, async_req=True) + >>> result = thread.get() + + Args: + avalara_version (str): The HTTP Header meant to specify the version of the API intended to be used. + id (str): The ID of the trading partner which is being updated. + trading_partner (TradingPartner): + + Keyword Args: + x_avalara_client (str): You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\".. [optional] + x_correlation_id (str): The caller can use this as an identifier to use as a correlation id to trace the call.. [optional] + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + UpdateTradingPartner200Response + If the method is called asynchronously, returns the request + thread. + """ + self.__verify_api_client(self.api_client) + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['avalara_version'] = avalara_version + kwargs['id'] = id + kwargs['trading_partner'] = trading_partner + return self.update_trading_partner_endpoint.call_with_http_info(**kwargs) + diff --git a/Avalara/SDK/models/A1099/V2/attribute.py b/Avalara/SDK/models/A1099/V2/attribute.py index eb10873..71aa45d 100644 --- a/Avalara/SDK/models/A1099/V2/attribute.py +++ b/Avalara/SDK/models/A1099/V2/attribute.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/authorized_api_request_model.py b/Avalara/SDK/models/A1099/V2/authorized_api_request_model.py index a07a024..df1ef77 100644 --- a/Avalara/SDK/models/A1099/V2/authorized_api_request_model.py +++ b/Avalara/SDK/models/A1099/V2/authorized_api_request_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/authorized_api_request_v2_data_model.py b/Avalara/SDK/models/A1099/V2/authorized_api_request_v2_data_model.py index 3bc4d95..6d4b780 100644 --- a/Avalara/SDK/models/A1099/V2/authorized_api_request_v2_data_model.py +++ b/Avalara/SDK/models/A1099/V2/authorized_api_request_v2_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/base_company_model.py b/Avalara/SDK/models/A1099/V2/base_company_model.py index f7cedb3..1398583 100644 --- a/Avalara/SDK/models/A1099/V2/base_company_model.py +++ b/Avalara/SDK/models/A1099/V2/base_company_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/base_form_list_request.py b/Avalara/SDK/models/A1099/V2/base_form_list_request.py index 9322d58..98e9c79 100644 --- a/Avalara/SDK/models/A1099/V2/base_form_list_request.py +++ b/Avalara/SDK/models/A1099/V2/base_form_list_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/bulk_upsert1099_forms_request.py b/Avalara/SDK/models/A1099/V2/bulk_upsert1099_forms_request.py index b4872b2..6a4f3c7 100644 --- a/Avalara/SDK/models/A1099/V2/bulk_upsert1099_forms_request.py +++ b/Avalara/SDK/models/A1099/V2/bulk_upsert1099_forms_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,6 +33,7 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.form1042_s_list import Form1042SList from Avalara.SDK.models.A1099.V2.form1095_b_list import Form1095BList from Avalara.SDK.models.A1099.V2.form1099_div_list import Form1099DivList from Avalara.SDK.models.A1099.V2.form1099_k_list import Form1099KList @@ -43,26 +44,28 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -BULKUPSERT1099FORMSREQUEST_ONE_OF_SCHEMAS = ["Form1095BList", "Form1099DivList", "Form1099KList", "Form1099MiscList", "Form1099NecList", "Form1099RList"] +BULKUPSERT1099FORMSREQUEST_ONE_OF_SCHEMAS = ["Form1042SList", "Form1095BList", "Form1099DivList", "Form1099KList", "Form1099MiscList", "Form1099NecList", "Form1099RList"] class BulkUpsert1099FormsRequest(BaseModel): """ BulkUpsert1099FormsRequest """ + # data type: Form1042SList + oneof_schema_1_validator: Optional[Form1042SList] = None # data type: Form1095BList - oneof_schema_1_validator: Optional[Form1095BList] = None + oneof_schema_2_validator: Optional[Form1095BList] = None # data type: Form1099DivList - oneof_schema_2_validator: Optional[Form1099DivList] = None + oneof_schema_3_validator: Optional[Form1099DivList] = None # data type: Form1099KList - oneof_schema_3_validator: Optional[Form1099KList] = None + oneof_schema_4_validator: Optional[Form1099KList] = None # data type: Form1099MiscList - oneof_schema_4_validator: Optional[Form1099MiscList] = None + oneof_schema_5_validator: Optional[Form1099MiscList] = None # data type: Form1099NecList - oneof_schema_5_validator: Optional[Form1099NecList] = None + oneof_schema_6_validator: Optional[Form1099NecList] = None # data type: Form1099RList - oneof_schema_6_validator: Optional[Form1099RList] = None - actual_instance: Optional[Union[Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList]] = None - one_of_schemas: Set[str] = { "Form1095BList", "Form1099DivList", "Form1099KList", "Form1099MiscList", "Form1099NecList", "Form1099RList" } + oneof_schema_7_validator: Optional[Form1099RList] = None + actual_instance: Optional[Union[Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList]] = None + one_of_schemas: Set[str] = { "Form1042SList", "Form1095BList", "Form1099DivList", "Form1099KList", "Form1099MiscList", "Form1099NecList", "Form1099RList" } model_config = ConfigDict( validate_assignment=True, @@ -85,6 +88,11 @@ def actual_instance_must_validate_oneof(cls, v): instance = BulkUpsert1099FormsRequest.model_construct() error_messages = [] match = 0 + # validate data type: Form1042SList + if not isinstance(v, Form1042SList): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1042SList`") + else: + match += 1 # validate data type: Form1095BList if not isinstance(v, Form1095BList): error_messages.append(f"Error! Input type `{type(v)}` is not `Form1095BList`") @@ -117,10 +125,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in BulkUpsert1099FormsRequest with oneOf schemas: Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in BulkUpsert1099FormsRequest with oneOf schemas: Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) else: return v @@ -135,6 +143,12 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # deserialize data into Form1042SList + try: + instance.actual_instance = Form1042SList.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into Form1095BList try: instance.actual_instance = Form1095BList.from_json(json_str) @@ -174,10 +188,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into BulkUpsert1099FormsRequest with oneOf schemas: Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into BulkUpsert1099FormsRequest with oneOf schemas: Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. Details: " + ", ".join(error_messages)) else: return instance @@ -191,7 +205,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/Avalara/SDK/models/A1099/V2/company_create_update_request_model.py b/Avalara/SDK/models/A1099/V2/company_create_update_request_model.py index b1e0ec0..30a40a3 100644 --- a/Avalara/SDK/models/A1099/V2/company_create_update_request_model.py +++ b/Avalara/SDK/models/A1099/V2/company_create_update_request_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/company_model.py b/Avalara/SDK/models/A1099/V2/company_model.py index 2e93101..62ca5ca 100644 --- a/Avalara/SDK/models/A1099/V2/company_model.py +++ b/Avalara/SDK/models/A1099/V2/company_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/company_response.py b/Avalara/SDK/models/A1099/V2/company_response.py index 0e7ece0..789b4e1 100644 --- a/Avalara/SDK/models/A1099/V2/company_response.py +++ b/Avalara/SDK/models/A1099/V2/company_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/company_response_model.py b/Avalara/SDK/models/A1099/V2/company_response_model.py index 3160549..cd8bf34 100644 --- a/Avalara/SDK/models/A1099/V2/company_response_model.py +++ b/Avalara/SDK/models/A1099/V2/company_response_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/covered_individual_reference_response.py b/Avalara/SDK/models/A1099/V2/covered_individual_reference_response.py new file mode 100644 index 0000000..133addf --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/covered_individual_reference_response.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CoveredIndividualReferenceResponse(BaseModel): + """ + CoveredIndividualReferenceResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Covered individual ID") + first_name: Optional[StrictStr] = Field(default=None, description="Covered individual's first name", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Covered individual's middle name", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Covered individual's last name", alias="lastName") + name_suffix: Optional[StrictStr] = Field(default=None, description="Covered individual's name suffix", alias="nameSuffix") + tin: Optional[StrictStr] = Field(default=None, description="Covered individual's TIN (SSN or ITIN)") + birth_date: Optional[datetime] = Field(default=None, description="Covered individual's date of birth", alias="birthDate") + covered_month0: Optional[StrictBool] = Field(default=None, description="Coverage indicator for all 12 months", alias="coveredMonth0") + covered_month1: Optional[StrictBool] = Field(default=None, description="Coverage indicator for January", alias="coveredMonth1") + covered_month2: Optional[StrictBool] = Field(default=None, description="Coverage indicator for February", alias="coveredMonth2") + covered_month3: Optional[StrictBool] = Field(default=None, description="Coverage indicator for March", alias="coveredMonth3") + covered_month4: Optional[StrictBool] = Field(default=None, description="Coverage indicator for April", alias="coveredMonth4") + covered_month5: Optional[StrictBool] = Field(default=None, description="Coverage indicator for May", alias="coveredMonth5") + covered_month6: Optional[StrictBool] = Field(default=None, description="Coverage indicator for June", alias="coveredMonth6") + covered_month7: Optional[StrictBool] = Field(default=None, description="Coverage indicator for July", alias="coveredMonth7") + covered_month8: Optional[StrictBool] = Field(default=None, description="Coverage indicator for August", alias="coveredMonth8") + covered_month9: Optional[StrictBool] = Field(default=None, description="Coverage indicator for September", alias="coveredMonth9") + covered_month10: Optional[StrictBool] = Field(default=None, description="Coverage indicator for October", alias="coveredMonth10") + covered_month11: Optional[StrictBool] = Field(default=None, description="Coverage indicator for November", alias="coveredMonth11") + covered_month12: Optional[StrictBool] = Field(default=None, description="Coverage indicator for December", alias="coveredMonth12") + __properties: ClassVar[List[str]] = ["id", "firstName", "middleName", "lastName", "nameSuffix", "tin", "birthDate", "coveredMonth0", "coveredMonth1", "coveredMonth2", "coveredMonth3", "coveredMonth4", "coveredMonth5", "coveredMonth6", "coveredMonth7", "coveredMonth8", "coveredMonth9", "coveredMonth10", "coveredMonth11", "coveredMonth12"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CoveredIndividualReferenceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict['firstName'] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict['middleName'] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict['lastName'] = None + + # set to None if name_suffix (nullable) is None + # and model_fields_set contains the field + if self.name_suffix is None and "name_suffix" in self.model_fields_set: + _dict['nameSuffix'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if birth_date (nullable) is None + # and model_fields_set contains the field + if self.birth_date is None and "birth_date" in self.model_fields_set: + _dict['birthDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CoveredIndividualReferenceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "nameSuffix": obj.get("nameSuffix"), + "tin": obj.get("tin"), + "birthDate": obj.get("birthDate"), + "coveredMonth0": obj.get("coveredMonth0"), + "coveredMonth1": obj.get("coveredMonth1"), + "coveredMonth2": obj.get("coveredMonth2"), + "coveredMonth3": obj.get("coveredMonth3"), + "coveredMonth4": obj.get("coveredMonth4"), + "coveredMonth5": obj.get("coveredMonth5"), + "coveredMonth6": obj.get("coveredMonth6"), + "coveredMonth7": obj.get("coveredMonth7"), + "coveredMonth8": obj.get("coveredMonth8"), + "coveredMonth9": obj.get("coveredMonth9"), + "coveredMonth10": obj.get("coveredMonth10"), + "coveredMonth11": obj.get("coveredMonth11"), + "coveredMonth12": obj.get("coveredMonth12") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/covered_individual_request.py b/Avalara/SDK/models/A1099/V2/covered_individual_request.py index e45f676..da4fea0 100644 --- a/Avalara/SDK/models/A1099/V2/covered_individual_request.py +++ b/Avalara/SDK/models/A1099/V2/covered_individual_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -43,25 +43,25 @@ class CoveredIndividualRequest(BaseModel): """ CoveredIndividualRequest """ # noqa: E501 - first_name: Optional[StrictStr] = Field(default=None, alias="firstName") - middle_name: Optional[StrictStr] = Field(default=None, alias="middleName") - last_name: Optional[StrictStr] = Field(default=None, alias="lastName") - name_suffix: Optional[StrictStr] = Field(default=None, alias="nameSuffix") - tin: Optional[StrictStr] = None - birth_date: Optional[datetime] = Field(default=None, alias="birthDate") - covered_month_indicator0: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator0") - covered_month_indicator1: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator1") - covered_month_indicator2: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator2") - covered_month_indicator3: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator3") - covered_month_indicator4: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator4") - covered_month_indicator5: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator5") - covered_month_indicator6: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator6") - covered_month_indicator7: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator7") - covered_month_indicator8: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator8") - covered_month_indicator9: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator9") - covered_month_indicator10: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator10") - covered_month_indicator11: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator11") - covered_month_indicator12: Optional[StrictBool] = Field(default=None, alias="coveredMonthIndicator12") + first_name: Optional[StrictStr] = Field(default=None, description="Covered individual's first name", alias="firstName") + middle_name: Optional[StrictStr] = Field(default=None, description="Covered individual's middle name", alias="middleName") + last_name: Optional[StrictStr] = Field(default=None, description="Covered individual's last name", alias="lastName") + name_suffix: Optional[StrictStr] = Field(default=None, description="Covered individual's name suffix", alias="nameSuffix") + tin: Optional[StrictStr] = Field(default=None, description="Covered individual's TIN (SSN or ITIN)") + birth_date: Optional[datetime] = Field(default=None, description="Covered individual's date of birth", alias="birthDate") + covered_month_indicator0: Optional[StrictBool] = Field(default=None, description="Coverage indicator for all 12 months", alias="coveredMonthIndicator0") + covered_month_indicator1: Optional[StrictBool] = Field(default=None, description="Coverage indicator for January", alias="coveredMonthIndicator1") + covered_month_indicator2: Optional[StrictBool] = Field(default=None, description="Coverage indicator for February", alias="coveredMonthIndicator2") + covered_month_indicator3: Optional[StrictBool] = Field(default=None, description="Coverage indicator for March", alias="coveredMonthIndicator3") + covered_month_indicator4: Optional[StrictBool] = Field(default=None, description="Coverage indicator for April", alias="coveredMonthIndicator4") + covered_month_indicator5: Optional[StrictBool] = Field(default=None, description="Coverage indicator for May", alias="coveredMonthIndicator5") + covered_month_indicator6: Optional[StrictBool] = Field(default=None, description="Coverage indicator for June", alias="coveredMonthIndicator6") + covered_month_indicator7: Optional[StrictBool] = Field(default=None, description="Coverage indicator for July", alias="coveredMonthIndicator7") + covered_month_indicator8: Optional[StrictBool] = Field(default=None, description="Coverage indicator for August", alias="coveredMonthIndicator8") + covered_month_indicator9: Optional[StrictBool] = Field(default=None, description="Coverage indicator for September", alias="coveredMonthIndicator9") + covered_month_indicator10: Optional[StrictBool] = Field(default=None, description="Coverage indicator for October", alias="coveredMonthIndicator10") + covered_month_indicator11: Optional[StrictBool] = Field(default=None, description="Coverage indicator for November", alias="coveredMonthIndicator11") + covered_month_indicator12: Optional[StrictBool] = Field(default=None, description="Coverage indicator for December", alias="coveredMonthIndicator12") __properties: ClassVar[List[str]] = ["firstName", "middleName", "lastName", "nameSuffix", "tin", "birthDate", "coveredMonthIndicator0", "coveredMonthIndicator1", "coveredMonthIndicator2", "coveredMonthIndicator3", "coveredMonthIndicator4", "coveredMonthIndicator5", "coveredMonthIndicator6", "coveredMonthIndicator7", "coveredMonthIndicator8", "coveredMonthIndicator9", "coveredMonthIndicator10", "coveredMonthIndicator11", "coveredMonthIndicator12"] model_config = ConfigDict( diff --git a/Avalara/SDK/models/A1099/V2/create1099_form201_response.py b/Avalara/SDK/models/A1099/V2/create1099_form201_response.py new file mode 100644 index 0000000..e18f4d5 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/create1099_form201_response.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.form1042_s_list_item_response import Form1042SListItemResponse +from Avalara.SDK.models.A1099.V2.form1095_b_list_item_response import Form1095BListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_base_response import Form1099BaseResponse +from Avalara.SDK.models.A1099.V2.form1099_k_list_item_response import Form1099KListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_misc_list_item_response import Form1099MiscListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_nec_list_item_response import Form1099NecListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_r_list_item_response import Form1099RListItemResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATE1099FORM201RESPONSE_ONE_OF_SCHEMAS = ["Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse"] + +class Create1099Form201Response(BaseModel): + """ + Create1099Form201Response + """ + # data type: Form1099BaseResponse + oneof_schema_1_validator: Optional[Form1099BaseResponse] = None + # data type: Form1042SListItemResponse + oneof_schema_2_validator: Optional[Form1042SListItemResponse] = None + # data type: Form1095BListItemResponse + oneof_schema_3_validator: Optional[Form1095BListItemResponse] = None + # data type: Form1099KListItemResponse + oneof_schema_4_validator: Optional[Form1099KListItemResponse] = None + # data type: Form1099MiscListItemResponse + oneof_schema_5_validator: Optional[Form1099MiscListItemResponse] = None + # data type: Form1099NecListItemResponse + oneof_schema_6_validator: Optional[Form1099NecListItemResponse] = None + # data type: Form1099RListItemResponse + oneof_schema_7_validator: Optional[Form1099RListItemResponse] = None + actual_instance: Optional[Union[Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]] = None + one_of_schemas: Set[str] = { "Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = Create1099Form201Response.model_construct() + error_messages = [] + match = 0 + # validate data type: Form1099BaseResponse + if not isinstance(v, Form1099BaseResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099BaseResponse`") + else: + match += 1 + # validate data type: Form1042SListItemResponse + if not isinstance(v, Form1042SListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1042SListItemResponse`") + else: + match += 1 + # validate data type: Form1095BListItemResponse + if not isinstance(v, Form1095BListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1095BListItemResponse`") + else: + match += 1 + # validate data type: Form1099KListItemResponse + if not isinstance(v, Form1099KListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099KListItemResponse`") + else: + match += 1 + # validate data type: Form1099MiscListItemResponse + if not isinstance(v, Form1099MiscListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099MiscListItemResponse`") + else: + match += 1 + # validate data type: Form1099NecListItemResponse + if not isinstance(v, Form1099NecListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099NecListItemResponse`") + else: + match += 1 + # validate data type: Form1099RListItemResponse + if not isinstance(v, Form1099RListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099RListItemResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Form1099BaseResponse + try: + instance.actual_instance = Form1099BaseResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1042SListItemResponse + try: + instance.actual_instance = Form1042SListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1095BListItemResponse + try: + instance.actual_instance = Form1095BListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099KListItemResponse + try: + instance.actual_instance = Form1099KListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099MiscListItemResponse + try: + instance.actual_instance = Form1099MiscListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099NecListItemResponse + try: + instance.actual_instance = Form1099NecListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099RListItemResponse + try: + instance.actual_instance = Form1099RListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py b/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py new file mode 100644 index 0000000..9c4ae81 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/create_w9_form201_response.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.w4_form_response import W4FormResponse +from Avalara.SDK.models.A1099.V2.w8_ben_e_form_response import W8BenEFormResponse +from Avalara.SDK.models.A1099.V2.w8_ben_form_response import W8BenFormResponse +from Avalara.SDK.models.A1099.V2.w8_imy_form_response import W8ImyFormResponse +from Avalara.SDK.models.A1099.V2.w9_form_response import W9FormResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEW9FORM201RESPONSE_ONE_OF_SCHEMAS = ["W4FormResponse", "W8BenEFormResponse", "W8BenFormResponse", "W8ImyFormResponse", "W9FormResponse"] + +class CreateW9Form201Response(BaseModel): + """ + CreateW9Form201Response + """ + # data type: W4FormResponse + oneof_schema_1_validator: Optional[W4FormResponse] = None + # data type: W8BenEFormResponse + oneof_schema_2_validator: Optional[W8BenEFormResponse] = None + # data type: W8BenFormResponse + oneof_schema_3_validator: Optional[W8BenFormResponse] = None + # data type: W8ImyFormResponse + oneof_schema_4_validator: Optional[W8ImyFormResponse] = None + # data type: W9FormResponse + oneof_schema_5_validator: Optional[W9FormResponse] = None + actual_instance: Optional[Union[W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse]] = None + one_of_schemas: Set[str] = { "W4FormResponse", "W8BenEFormResponse", "W8BenFormResponse", "W8ImyFormResponse", "W9FormResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateW9Form201Response.model_construct() + error_messages = [] + match = 0 + # validate data type: W4FormResponse + if not isinstance(v, W4FormResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `W4FormResponse`") + else: + match += 1 + # validate data type: W8BenEFormResponse + if not isinstance(v, W8BenEFormResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8BenEFormResponse`") + else: + match += 1 + # validate data type: W8BenFormResponse + if not isinstance(v, W8BenFormResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8BenFormResponse`") + else: + match += 1 + # validate data type: W8ImyFormResponse + if not isinstance(v, W8ImyFormResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8ImyFormResponse`") + else: + match += 1 + # validate data type: W9FormResponse + if not isinstance(v, W9FormResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `W9FormResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateW9Form201Response with oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateW9Form201Response with oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into W4FormResponse + try: + instance.actual_instance = W4FormResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8BenEFormResponse + try: + instance.actual_instance = W8BenEFormResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8BenFormResponse + try: + instance.actual_instance = W8BenFormResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8ImyFormResponse + try: + instance.actual_instance = W8ImyFormResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W9FormResponse + try: + instance.actual_instance = W9FormResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateW9Form201Response with oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateW9Form201Response with oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/Avalara/SDK/models/A1099/V2/create_w9_form_request.py b/Avalara/SDK/models/A1099/V2/create_w9_form_request.py new file mode 100644 index 0000000..a8914e6 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/create_w9_form_request.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.w4_form_request import W4FormRequest +from Avalara.SDK.models.A1099.V2.w8_ben_e_form_request import W8BenEFormRequest +from Avalara.SDK.models.A1099.V2.w8_ben_form_request import W8BenFormRequest +from Avalara.SDK.models.A1099.V2.w8_imy_form_request import W8ImyFormRequest +from Avalara.SDK.models.A1099.V2.w9_form_request import W9FormRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATEW9FORMREQUEST_ONE_OF_SCHEMAS = ["W4FormRequest", "W8BenEFormRequest", "W8BenFormRequest", "W8ImyFormRequest", "W9FormRequest"] + +class CreateW9FormRequest(BaseModel): + """ + CreateW9FormRequest + """ + # data type: W9FormRequest + oneof_schema_1_validator: Optional[W9FormRequest] = None + # data type: W8ImyFormRequest + oneof_schema_2_validator: Optional[W8ImyFormRequest] = None + # data type: W8BenEFormRequest + oneof_schema_3_validator: Optional[W8BenEFormRequest] = None + # data type: W8BenFormRequest + oneof_schema_4_validator: Optional[W8BenFormRequest] = None + # data type: W4FormRequest + oneof_schema_5_validator: Optional[W4FormRequest] = None + actual_instance: Optional[Union[W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest]] = None + one_of_schemas: Set[str] = { "W4FormRequest", "W8BenEFormRequest", "W8BenFormRequest", "W8ImyFormRequest", "W9FormRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateW9FormRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: W9FormRequest + if not isinstance(v, W9FormRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `W9FormRequest`") + else: + match += 1 + # validate data type: W8ImyFormRequest + if not isinstance(v, W8ImyFormRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8ImyFormRequest`") + else: + match += 1 + # validate data type: W8BenEFormRequest + if not isinstance(v, W8BenEFormRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8BenEFormRequest`") + else: + match += 1 + # validate data type: W8BenFormRequest + if not isinstance(v, W8BenFormRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `W8BenFormRequest`") + else: + match += 1 + # validate data type: W4FormRequest + if not isinstance(v, W4FormRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `W4FormRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateW9FormRequest with oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateW9FormRequest with oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into W9FormRequest + try: + instance.actual_instance = W9FormRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8ImyFormRequest + try: + instance.actual_instance = W8ImyFormRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8BenEFormRequest + try: + instance.actual_instance = W8BenEFormRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W8BenFormRequest + try: + instance.actual_instance = W8BenFormRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into W4FormRequest + try: + instance.actual_instance = W4FormRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateW9FormRequest with oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateW9FormRequest with oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/Avalara/SDK/models/A1099/V2/data.py b/Avalara/SDK/models/A1099/V2/data.py index 0a3b844..e690c6c 100644 --- a/Avalara/SDK/models/A1099/V2/data.py +++ b/Avalara/SDK/models/A1099/V2/data.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/error_model.py b/Avalara/SDK/models/A1099/V2/error_model.py index e94d68b..fb4e2b9 100644 --- a/Avalara/SDK/models/A1099/V2/error_model.py +++ b/Avalara/SDK/models/A1099/V2/error_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/error_response.py b/Avalara/SDK/models/A1099/V2/error_response.py index 0f84b3e..d017448 100644 --- a/Avalara/SDK/models/A1099/V2/error_response.py +++ b/Avalara/SDK/models/A1099/V2/error_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/error_response_errors_inner.py b/Avalara/SDK/models/A1099/V2/error_response_errors_inner.py index 15b0bf4..8e40611 100644 --- a/Avalara/SDK/models/A1099/V2/error_response_errors_inner.py +++ b/Avalara/SDK/models/A1099/V2/error_response_errors_inner.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1042_s_list.py b/Avalara/SDK/models/A1099/V2/form1042_s_list.py new file mode 100644 index 0000000..69ed223 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1042_s_list.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.form1042_s_list_item import Form1042SListItem +from typing import Optional, Set +from typing_extensions import Self + +class Form1042SList(BaseModel): + """ + Form1042SList + """ # noqa: E501 + forms: Optional[List[Form1042SListItem]] = None + form_type: Optional[StrictStr] = Field(default=None, alias="formType") + __properties: ClassVar[List[str]] = ["formType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1042SList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1042SList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "formType": obj.get("formType") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1042_s_list_item.py b/Avalara/SDK/models/A1099/V2/form1042_s_list_item.py new file mode 100644 index 0000000..6419ad7 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1042_s_list_item.py @@ -0,0 +1,277 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through import IntermediaryOrFlowThrough +from Avalara.SDK.models.A1099.V2.primary_withholding_agent import PrimaryWithholdingAgent +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest +from typing import Optional, Set +from typing_extensions import Self + +class Form1042SListItem(BaseModel): + """ + Form1042SListItem + """ # noqa: E501 + unique_form_id: Optional[StrictStr] = Field(default=None, description="Unique form identifier", alias="uniqueFormId") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + recipient_date_of_birth: Optional[datetime] = Field(default=None, description="Recipient's date of birth", alias="recipientDateOfBirth") + recipient_giin: Optional[StrictStr] = Field(default=None, description="Recipient's GIIN (Global Intermediary Identification Number)", alias="recipientGiin") + recipient_foreign_tin: Optional[StrictStr] = Field(default=None, description="Recipient's foreign TIN", alias="recipientForeignTin") + lob_code: Optional[StrictStr] = Field(default=None, description="Limitation on benefits code", alias="lobCode") + income_code: Optional[StrictStr] = Field(default=None, description="Income code", alias="incomeCode") + gross_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross income", alias="grossIncome") + withholding_indicator: Optional[StrictStr] = Field(default=None, description="Withholding indicator", alias="withholdingIndicator") + tax_country_code: Optional[StrictStr] = Field(default=None, description="Country code", alias="taxCountryCode") + exemption_code_chap3: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 3)", alias="exemptionCodeChap3") + exemption_code_chap4: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 4)", alias="exemptionCodeChap4") + tax_rate_chap3: Optional[StrictStr] = Field(default=None, description="Tax rate (Chapter 3)", alias="taxRateChap3") + withholding_allowance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Withholding allowance", alias="withholdingAllowance") + federal_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal tax withheld", alias="federalTaxWithheld") + tax_not_deposited_indicator: Optional[StrictBool] = Field(default=None, description="Tax not deposited indicator", alias="taxNotDepositedIndicator") + academic_indicator: Optional[StrictBool] = Field(default=None, description="Academic indicator", alias="academicIndicator") + tax_withheld_other_agents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax withheld by other agents", alias="taxWithheldOtherAgents") + amount_repaid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount repaid to recipient", alias="amountRepaid") + tax_paid_agent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax paid by withholding agent", alias="taxPaidAgent") + chap3_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 3 status code", alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 4 status code", alias="chap4StatusCode") + primary_withholding_agent: Optional[PrimaryWithholdingAgent] = Field(default=None, description="Primary withholding agent information", alias="primaryWithholdingAgent") + intermediary_or_flow_through: Optional[IntermediaryOrFlowThrough] = Field(default=None, description="Intermediary or flow-through entity information", alias="intermediaryOrFlowThrough") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + + @field_validator('lob_code') + def lob_code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Individual', 'GovernmentContractingState', 'TaxExemptPensionTrust', 'TaxExemptCharitableOrganization', 'PubliclyTradedCorporation', 'SubsidiaryOfPubliclyTradedCorporation', 'CompanyOwnershipBaseErosionTest', 'CompanyDerivativeBenefitsTest', 'CompanyActiveTradeOrBusinessTest', 'DiscretionaryDetermination', 'Other', 'NoLobArticleInTreaty']): + raise ValueError("must be one of enum values ('Individual', 'GovernmentContractingState', 'TaxExemptPensionTrust', 'TaxExemptCharitableOrganization', 'PubliclyTradedCorporation', 'SubsidiaryOfPubliclyTradedCorporation', 'CompanyOwnershipBaseErosionTest', 'CompanyDerivativeBenefitsTest', 'CompanyActiveTradeOrBusinessTest', 'DiscretionaryDetermination', 'Other', 'NoLobArticleInTreaty')") + return value + + @field_validator('exemption_code_chap3') + def exemption_code_chap3_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['TaxRateDueToBackupWithholding', 'EffectivelyConnectedIncome', 'ExemptUnderIrc', 'IncomeNotFromUsSources', 'ExemptUnderTaxTreaty', 'PortfolioInterestExemptUnderIrc', 'QiThatAssumesPrimaryWithholdingResponsibility', 'WfPorWft', 'UsBranchTreatedAsUsPerson', 'TerritoryFiTreatedAsUsPerson', 'QiRepresentsIncomeExempt', 'QslThatAssumesPrimaryWithholdingResponsibility', 'PayeeSubjectedToChapter4Withholding', 'QddThatAssumesPrimaryWithholdingResponsibility', 'ExemptUnderSection897L', 'ExemptUnderSection892']): + raise ValueError("must be one of enum values ('TaxRateDueToBackupWithholding', 'EffectivelyConnectedIncome', 'ExemptUnderIrc', 'IncomeNotFromUsSources', 'ExemptUnderTaxTreaty', 'PortfolioInterestExemptUnderIrc', 'QiThatAssumesPrimaryWithholdingResponsibility', 'WfPorWft', 'UsBranchTreatedAsUsPerson', 'TerritoryFiTreatedAsUsPerson', 'QiRepresentsIncomeExempt', 'QslThatAssumesPrimaryWithholdingResponsibility', 'PayeeSubjectedToChapter4Withholding', 'QddThatAssumesPrimaryWithholdingResponsibility', 'ExemptUnderSection897L', 'ExemptUnderSection892')") + return value + + @field_validator('exemption_code_chap4') + def exemption_code_chap4_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['NotExempt', 'GrandfatheredPayment', 'EffectivelyConnectedIncome', 'PayeeNotSubjectToChapter4Withholding', 'ExcludedNonfinancialPayment', 'ForeignEntityThatAssumesPrimaryWithholdingResponsibility', 'UsPayeesOfParticipatingFfi', 'ExemptFromWithholdingUnderIga', 'DormantAccount', 'OtherPaymentNotSubjectToChapter4Withholding']): + raise ValueError("must be one of enum values ('NotExempt', 'GrandfatheredPayment', 'EffectivelyConnectedIncome', 'PayeeNotSubjectToChapter4Withholding', 'ExcludedNonfinancialPayment', 'ForeignEntityThatAssumesPrimaryWithholdingResponsibility', 'UsPayeesOfParticipatingFfi', 'ExemptFromWithholdingUnderIga', 'DormantAccount', 'OtherPaymentNotSubjectToChapter4Withholding')") + return value + + @field_validator('chap3_status_code') + def chap3_status_code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['USWithholdingAgentFI', 'USWithholdingAgentOther', 'TerritoryFITreatedAsUSPerson', 'TerritoryFINotTreatedAsUSPerson', 'USBranchTreatedAsUSPerson', 'USBranchNotTreatedAsUSPerson', 'USBranchECIPresumptionApplied', 'PartnershipOtherThanWithholdingForeignPartnership', 'WithholdingForeignPartnership', 'TrustOtherThanWithholdingForeignTrust', 'WithholdingForeignTrust', 'QualifiedIntermediary', 'QualifiedSecuritiesLenderQualifiedIntermediary', 'QualifiedSecuritiesLenderOther', 'Corporation', 'Individual', 'Estate', 'PrivateFoundation', 'GovernmentOrInternationalOrganization', 'TaxExemptOrganizationSection501cEntities', 'UnknownRecipient', 'ArtistOrAthlete', 'Pension', 'ForeignCentralBankOfIssue', 'NonqualifiedIntermediary', 'HybridEntityMakingTreatyClaim', 'WithholdingRatePoolGeneral', 'WithholdingRatePoolExemptOrganization', 'PAIWithholdingRatePoolGeneral', 'PAIWithholdingRatePoolExemptOrganization', 'AgencyWithholdingRatePoolGeneral', 'AgencyWithholdingRatePoolExemptOrganization', 'USWithholdingAgentForeignBranchOfFI', 'QualifiedDerivativesDealer', 'ForeignGovernmentIntegralPart', 'ForeignGovernmentControlledEntity', 'PubliclyTradedPartnership', 'DisclosingQualifiedIntermediary']): + raise ValueError("must be one of enum values ('USWithholdingAgentFI', 'USWithholdingAgentOther', 'TerritoryFITreatedAsUSPerson', 'TerritoryFINotTreatedAsUSPerson', 'USBranchTreatedAsUSPerson', 'USBranchNotTreatedAsUSPerson', 'USBranchECIPresumptionApplied', 'PartnershipOtherThanWithholdingForeignPartnership', 'WithholdingForeignPartnership', 'TrustOtherThanWithholdingForeignTrust', 'WithholdingForeignTrust', 'QualifiedIntermediary', 'QualifiedSecuritiesLenderQualifiedIntermediary', 'QualifiedSecuritiesLenderOther', 'Corporation', 'Individual', 'Estate', 'PrivateFoundation', 'GovernmentOrInternationalOrganization', 'TaxExemptOrganizationSection501cEntities', 'UnknownRecipient', 'ArtistOrAthlete', 'Pension', 'ForeignCentralBankOfIssue', 'NonqualifiedIntermediary', 'HybridEntityMakingTreatyClaim', 'WithholdingRatePoolGeneral', 'WithholdingRatePoolExemptOrganization', 'PAIWithholdingRatePoolGeneral', 'PAIWithholdingRatePoolExemptOrganization', 'AgencyWithholdingRatePoolGeneral', 'AgencyWithholdingRatePoolExemptOrganization', 'USWithholdingAgentForeignBranchOfFI', 'QualifiedDerivativesDealer', 'ForeignGovernmentIntegralPart', 'ForeignGovernmentControlledEntity', 'PubliclyTradedPartnership', 'DisclosingQualifiedIntermediary')") + return value + + @field_validator('chap4_status_code') + def chap4_status_code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['UsWithholdingAgentFi', 'UsWithholdingAgentOther', 'TerritoryFiNotTreatedAsUsPerson', 'TerritoryFiTreatedAsUsPerson', 'ParticipatingFfiOther', 'ParticipatingFfiReportingModel2Ffi', 'RegisteredDeemedCompliantFfiReportingModel1Ffi', 'RegisteredDeemedCompliantFfiSponsoredEntity', 'RegisteredDeemedCompliantFfiOther', 'CertifiedDeemedCompliantFfiOther', 'CertifiedDeemedCompliantFfiffiWithLowValueAccounts', 'CertifiedDeemedCompliantFfiNonRegisteringLocalBank', 'CertifiedDeemedCompliantFfiSponsoredEntity', 'CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager', 'NonparticipatingFfi', 'OwnerDocumentedFfi', 'UsBranchTreatedAsUsPerson', 'UsBranchNotTreatedAsUsPerson', 'PassiveNffeIdentifyingSubstantialUsOwners', 'PassiveNffeWithNoSubstantialUsOwners', 'PubliclyTradedNffeOrAffiliate', 'ActiveNffe', 'Individual', 'Section501CEntities', 'ExceptedTerritoryNffe', 'ExceptedNffeOther', 'ExemptBeneficialOwner', 'EntityWhollyOwnedByExemptBeneficialOwners', 'UnknownRecipient', 'RecalcitrantAccountHolder', 'NonreportingIgafii', 'DirectReportingNffe', 'UsReportableAccount', 'NonConsentingUsAccount', 'SponsoredDirectReportingNffe', 'ExceptedInterAffiliateFfi', 'UndocumentedPreexistingObligation', 'UsBranchEciPresumptionApplied', 'AccountHolderOfExcludedFinancialAccount', 'PassiveNffeReportedByFfi', 'NffeSubjectTo1472Withholding', 'RecalcitrantPoolNoUsIndicia', 'RecalcitrantPoolUsIndicia', 'RecalcitrantPoolDormantAccount', 'RecalcitrantPoolUsPersons', 'RecalcitrantPoolPassiveNffEs', 'NonparticipatingFfiPool', 'UsPayeesPool', 'QiRecalcitrantPoolGeneral', 'UsWithholdingAgentForeignBranchOfFi']): + raise ValueError("must be one of enum values ('UsWithholdingAgentFi', 'UsWithholdingAgentOther', 'TerritoryFiNotTreatedAsUsPerson', 'TerritoryFiTreatedAsUsPerson', 'ParticipatingFfiOther', 'ParticipatingFfiReportingModel2Ffi', 'RegisteredDeemedCompliantFfiReportingModel1Ffi', 'RegisteredDeemedCompliantFfiSponsoredEntity', 'RegisteredDeemedCompliantFfiOther', 'CertifiedDeemedCompliantFfiOther', 'CertifiedDeemedCompliantFfiffiWithLowValueAccounts', 'CertifiedDeemedCompliantFfiNonRegisteringLocalBank', 'CertifiedDeemedCompliantFfiSponsoredEntity', 'CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager', 'NonparticipatingFfi', 'OwnerDocumentedFfi', 'UsBranchTreatedAsUsPerson', 'UsBranchNotTreatedAsUsPerson', 'PassiveNffeIdentifyingSubstantialUsOwners', 'PassiveNffeWithNoSubstantialUsOwners', 'PubliclyTradedNffeOrAffiliate', 'ActiveNffe', 'Individual', 'Section501CEntities', 'ExceptedTerritoryNffe', 'ExceptedNffeOther', 'ExemptBeneficialOwner', 'EntityWhollyOwnedByExemptBeneficialOwners', 'UnknownRecipient', 'RecalcitrantAccountHolder', 'NonreportingIgafii', 'DirectReportingNffe', 'UsReportableAccount', 'NonConsentingUsAccount', 'SponsoredDirectReportingNffe', 'ExceptedInterAffiliateFfi', 'UndocumentedPreexistingObligation', 'UsBranchEciPresumptionApplied', 'AccountHolderOfExcludedFinancialAccount', 'PassiveNffeReportedByFfi', 'NffeSubjectTo1472Withholding', 'RecalcitrantPoolNoUsIndicia', 'RecalcitrantPoolUsIndicia', 'RecalcitrantPoolDormantAccount', 'RecalcitrantPoolUsPersons', 'RecalcitrantPoolPassiveNffEs', 'NonparticipatingFfiPool', 'UsPayeesPool', 'QiRecalcitrantPoolGeneral', 'UsWithholdingAgentForeignBranchOfFi')") + return value + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1042SListItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_id is None and "issuer_id" in self.model_fields_set: + _dict['issuerId'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if recipient_email (nullable) is None + # and model_fields_set contains the field + if self.recipient_email is None and "recipient_email" in self.model_fields_set: + _dict['recipientEmail'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if recipient_non_us_province (nullable) is None + # and model_fields_set contains the field + if self.recipient_non_us_province is None and "recipient_non_us_province" in self.model_fields_set: + _dict['recipientNonUsProvince'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1042SListItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "issuerId": obj.get("issuerId"), + "referenceId": obj.get("referenceId"), + "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), + "tinType": obj.get("tinType"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "recipientEmail": obj.get("recipientEmail"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "recipientNonUsProvince": obj.get("recipientNonUsProvince"), + "countryCode": obj.get("countryCode"), + "federalEFile": obj.get("federalEFile"), + "postalMail": obj.get("postalMail"), + "stateEFile": obj.get("stateEFile"), + "tinMatch": obj.get("tinMatch"), + "addressVerification": obj.get("addressVerification"), + "stateAndLocalWithholding": StateAndLocalWithholdingRequest.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1042_s_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1042_s_list_item_response.py new file mode 100644 index 0000000..7479e05 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1042_s_list_item_response.py @@ -0,0 +1,351 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through_response import IntermediaryOrFlowThroughResponse +from Avalara.SDK.models.A1099.V2.primary_withholding_agent_response import PrimaryWithholdingAgentResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1042SListItemResponse(BaseModel): + """ + Form1042SListItemResponse + """ # noqa: E501 + unique_form_id: Optional[StrictStr] = Field(default=None, description="Unique form identifier", alias="uniqueFormId") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + recipient_date_of_birth: Optional[datetime] = Field(default=None, description="Recipient's date of birth", alias="recipientDateOfBirth") + recipient_giin: Optional[StrictStr] = Field(default=None, description="Recipient's GIIN (Global Intermediary Identification Number)", alias="recipientGiin") + recipient_foreign_tin: Optional[StrictStr] = Field(default=None, description="Recipient's foreign TIN", alias="recipientForeignTin") + lob_code: Optional[StrictStr] = Field(default=None, description="Limitation on benefits code", alias="lobCode") + income_code: Optional[StrictStr] = Field(default=None, description="Income code", alias="incomeCode") + gross_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross income", alias="grossIncome") + withholding_indicator: Optional[StrictStr] = Field(default=None, description="Withholding indicator", alias="withholdingIndicator") + tax_country_code: Optional[StrictStr] = Field(default=None, description="Country code", alias="taxCountryCode") + exemption_code_chap3: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 3)", alias="exemptionCodeChap3") + exemption_code_chap4: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 4)", alias="exemptionCodeChap4") + tax_rate_chap3: Optional[StrictStr] = Field(default=None, description="Tax rate (Chapter 3)", alias="taxRateChap3") + withholding_allowance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Withholding allowance", alias="withholdingAllowance") + federal_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal tax withheld", alias="federalTaxWithheld") + tax_not_deposited_indicator: Optional[StrictBool] = Field(default=None, description="Tax not deposited indicator", alias="taxNotDepositedIndicator") + academic_indicator: Optional[StrictBool] = Field(default=None, description="Academic indicator", alias="academicIndicator") + tax_withheld_other_agents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax withheld by other agents", alias="taxWithheldOtherAgents") + amount_repaid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount repaid to recipient", alias="amountRepaid") + tax_paid_agent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax paid by withholding agent", alias="taxPaidAgent") + chap3_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 3 status code", alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 4 status code", alias="chap4StatusCode") + primary_withholding_agent: Optional[PrimaryWithholdingAgentResponse] = Field(default=None, description="Primary withholding agent information", alias="primaryWithholdingAgent") + intermediary_or_flow_through: Optional[IntermediaryOrFlowThroughResponse] = Field(default=None, description="Intermediary or flow-through entity information", alias="intermediaryOrFlowThrough") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1042SListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1042SListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1042_s_request.py b/Avalara/SDK/models/A1099/V2/form1042_s_request.py new file mode 100644 index 0000000..62cca12 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1042_s_request.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through_request import IntermediaryOrFlowThroughRequest +from Avalara.SDK.models.A1099.V2.primary_withholding_agent_request import PrimaryWithholdingAgentRequest +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest +from typing import Optional, Set +from typing_extensions import Self + +class Form1042SRequest(BaseModel): + """ + Form1042SRequest + """ # noqa: E501 + unique_form_id: Optional[StrictStr] = Field(default=None, description="Unique form identifier", alias="uniqueFormId") + no_tin: Optional[StrictBool] = Field(default=None, description="No TIN indicator", alias="noTin") + recipient_date_of_birth: Optional[datetime] = Field(default=None, description="Recipient's date of birth", alias="recipientDateOfBirth") + recipient_giin: Optional[StrictStr] = Field(default=None, description="Recipient's GIIN (Global Intermediary Identification Number)", alias="recipientGiin") + recipient_foreign_tin: Optional[StrictStr] = Field(default=None, description="Recipient's foreign TIN", alias="recipientForeignTin") + lob_code: Optional[StrictStr] = Field(default=None, description="Limitation on benefits code", alias="lobCode") + income_code: Optional[StrictStr] = Field(default=None, description="Income code", alias="incomeCode") + gross_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross income", alias="grossIncome") + withholding_indicator: Optional[StrictStr] = Field(default=None, description="Withholding indicator", alias="withholdingIndicator") + tax_country_code: Optional[StrictStr] = Field(default=None, description="Country code", alias="taxCountryCode") + exemption_code_chap3: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 3)", alias="exemptionCodeChap3") + exemption_code_chap4: Optional[StrictStr] = Field(default=None, description="Exemption code (Chapter 4)", alias="exemptionCodeChap4") + tax_rate_chap3: Optional[StrictStr] = Field(default=None, description="Tax rate (Chapter 3)", alias="taxRateChap3") + withholding_allowance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Withholding allowance", alias="withholdingAllowance") + federal_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal tax withheld", alias="federalTaxWithheld") + tax_not_deposited_indicator: Optional[StrictBool] = Field(default=None, description="Tax not deposited indicator", alias="taxNotDepositedIndicator") + academic_indicator: Optional[StrictBool] = Field(default=None, description="Academic indicator", alias="academicIndicator") + tax_withheld_other_agents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax withheld by other agents", alias="taxWithheldOtherAgents") + amount_repaid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount repaid to recipient", alias="amountRepaid") + tax_paid_agent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Tax paid by withholding agent", alias="taxPaidAgent") + chap3_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 3 status code", alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, description="Chapter 4 status code", alias="chap4StatusCode") + primary_withholding_agent: Optional[PrimaryWithholdingAgentRequest] = Field(default=None, description="Primary withholding agent information", alias="primaryWithholdingAgent") + intermediary_or_flow_through: Optional[IntermediaryOrFlowThroughRequest] = Field(default=None, description="Intermediary or flow-through entity information", alias="intermediaryOrFlowThrough") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + type: Optional[StrictStr] = None + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") + return value + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1042SRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_id is None and "issuer_id" in self.model_fields_set: + _dict['issuerId'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if recipient_email (nullable) is None + # and model_fields_set contains the field + if self.recipient_email is None and "recipient_email" in self.model_fields_set: + _dict['recipientEmail'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if recipient_non_us_province (nullable) is None + # and model_fields_set contains the field + if self.recipient_non_us_province is None and "recipient_non_us_province" in self.model_fields_set: + _dict['recipientNonUsProvince'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1042SRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "referenceId": obj.get("referenceId"), + "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), + "tinType": obj.get("tinType"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "recipientEmail": obj.get("recipientEmail"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "recipientNonUsProvince": obj.get("recipientNonUsProvince"), + "countryCode": obj.get("countryCode"), + "federalEFile": obj.get("federalEFile"), + "postalMail": obj.get("postalMail"), + "stateEFile": obj.get("stateEFile"), + "tinMatch": obj.get("tinMatch"), + "addressVerification": obj.get("addressVerification"), + "stateAndLocalWithholding": StateAndLocalWithholdingRequest.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1042_s_response.py b/Avalara/SDK/models/A1099/V2/form1042_s_response.py new file mode 100644 index 0000000..3cffdc4 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1042_s_response.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.status_detail import StatusDetail +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1042SResponse(BaseModel): + """ + Form1042SResponse + """ # noqa: E501 + type: Optional[StrictStr] = None + created_at: Optional[datetime] = Field(default=None, alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, alias="updatedAt") + user_id: Optional[StrictStr] = Field(default=None, alias="userId") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") + id: Optional[StrictStr] = None + issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") + reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") + recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") + recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") + recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") + address: Optional[StrictStr] = None + address2: Optional[StrictStr] = None + city: Optional[StrictStr] = None + state: Optional[StrictStr] = None + zip: Optional[StrictStr] = None + recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") + country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") + federal_efile_status: Optional[StatusDetail] = Field(default=None, alias="federalEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, alias="stateEfileStatus") + postal_mail_status: Optional[StatusDetail] = Field(default=None, alias="postalMailStatus") + tin_match_status: Optional[StatusDetail] = Field(default=None, alias="tinMatchStatus") + address_verification_status: Optional[StatusDetail] = Field(default=None, alias="addressVerificationStatus") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, alias="validationErrors") + __properties: ClassVar[List[str]] = ["type", "createdAt", "updatedAt", "userId", "stateAndLocalWithholding", "tinType", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "recipientName", "recipientTin", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "validationErrors"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") + return value + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1042SResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # set to None if federal_efile_status (nullable) is None + # and model_fields_set contains the field + if self.federal_efile_status is None and "federal_efile_status" in self.model_fields_set: + _dict['federalEfileStatus'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1042SResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "userId": obj.get("userId"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None, + "tinType": obj.get("tinType"), + "id": obj.get("id"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "referenceId": obj.get("referenceId"), + "recipientName": obj.get("recipientName"), + "recipientTin": obj.get("recipientTin"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "recipientEmail": obj.get("recipientEmail"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "recipientNonUsProvince": obj.get("recipientNonUsProvince"), + "countryCode": obj.get("countryCode"), + "federalEFile": obj.get("federalEFile"), + "postalMail": obj.get("postalMail"), + "stateEFile": obj.get("stateEFile"), + "tinMatch": obj.get("tinMatch"), + "addressVerification": obj.get("addressVerification"), + "federalEfileStatus": StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMailStatus": StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatchStatus": StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerificationStatus": StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1095_b_list.py b/Avalara/SDK/models/A1099/V2/form1095_b_list.py index 20227c9..5c4ea7a 100644 --- a/Avalara/SDK/models/A1099/V2/form1095_b_list.py +++ b/Avalara/SDK/models/A1099/V2/form1095_b_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1095_b_list_item.py b/Avalara/SDK/models/A1099/V2/form1095_b_list_item.py index 5a7c6a7..f0567db 100644 --- a/Avalara/SDK/models/A1099/V2/form1095_b_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1095_b_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -36,6 +36,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.covered_individual_request import CoveredIndividualRequest from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set @@ -45,36 +46,36 @@ class Form1095BListItem(BaseModel): """ Form1095BListItem """ # noqa: E501 - employee_first_name: Optional[StrictStr] = Field(default=None, alias="employeeFirstName") - employee_middle_name: Optional[StrictStr] = Field(default=None, alias="employeeMiddleName") - employee_last_name: Optional[StrictStr] = Field(default=None, alias="employeeLastName") - employee_name_suffix: Optional[StrictStr] = Field(default=None, alias="employeeNameSuffix") - employee_date_of_birth: Optional[datetime] = Field(default=None, alias="employeeDateOfBirth") - origin_of_health_coverage_code: Optional[StrictStr] = Field(default=None, alias="originOfHealthCoverageCode") - covered_individuals: Optional[List[CoveredIndividualRequest]] = Field(default=None, alias="coveredIndividuals") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + employee_first_name: Optional[StrictStr] = Field(default=None, description="Employee's first name", alias="employeeFirstName") + employee_middle_name: Optional[StrictStr] = Field(default=None, description="Employee's middle name", alias="employeeMiddleName") + employee_last_name: Optional[StrictStr] = Field(default=None, description="Employee's last name", alias="employeeLastName") + employee_name_suffix: Optional[StrictStr] = Field(default=None, description="Employee's name suffix", alias="employeeNameSuffix") + employee_date_of_birth: Optional[datetime] = Field(default=None, description="Employee's date of birth", alias="employeeDateOfBirth") + origin_of_health_coverage_code: Optional[StrictStr] = Field(default=None, description="Origin of health coverage code", alias="originOfHealthCoverageCode") + covered_individuals: Optional[List[CoveredIndividualRequest]] = Field(default=None, description="Covered individuals information", alias="coveredIndividuals") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('origin_of_health_coverage_code') def origin_of_health_coverage_code_validate_enum(cls, value): @@ -82,8 +83,8 @@ def origin_of_health_coverage_code_validate_enum(cls, value): if value is None: return value - if value not in set(['SmallBusinessHealthOptionsProgram', 'EmployerSponsored', 'GovernmentSponsored', 'IndividualMarket', 'MultiemployerPlan', 'OtherDesignatedMinimumEssentialCoverage', 'EmployerSponsoredIndividualHra']): - raise ValueError("must be one of enum values ('SmallBusinessHealthOptionsProgram', 'EmployerSponsored', 'GovernmentSponsored', 'IndividualMarket', 'MultiemployerPlan', 'OtherDesignatedMinimumEssentialCoverage', 'EmployerSponsoredIndividualHra')") + if value not in set(['A', 'B', 'C', 'D', 'E', 'F', 'G']): + raise ValueError("must be one of enum values ('A', 'B', 'C', 'D', 'E', 'F', 'G')") return value @field_validator('tin_type') @@ -148,10 +149,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -192,8 +193,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1095_b_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1095_b_list_item_response.py new file mode 100644 index 0000000..a40b8df --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1095_b_list_item_response.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.covered_individual_reference_response import CoveredIndividualReferenceResponse +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1095BListItemResponse(BaseModel): + """ + Form1095BListItemResponse + """ # noqa: E501 + origin_of_health_coverage_code: Optional[StrictStr] = Field(default=None, description="Origin of health coverage code", alias="originOfHealthCoverageCode") + covered_individuals: Optional[List[CoveredIndividualReferenceResponse]] = Field(default=None, description="Covered individuals information", alias="coveredIndividuals") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1095BListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1095BListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1095_b_request.py b/Avalara/SDK/models/A1099/V2/form1095_b_request.py index d1057f9..f02f46f 100644 --- a/Avalara/SDK/models/A1099/V2/form1095_b_request.py +++ b/Avalara/SDK/models/A1099/V2/form1095_b_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -36,6 +36,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.covered_individual_request import CoveredIndividualRequest from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set @@ -45,37 +46,37 @@ class Form1095BRequest(BaseModel): """ Form1095BRequest """ # noqa: E501 - employee_first_name: Optional[StrictStr] = Field(default=None, alias="employeeFirstName") - employee_middle_name: Optional[StrictStr] = Field(default=None, alias="employeeMiddleName") - employee_last_name: Optional[StrictStr] = Field(default=None, alias="employeeLastName") - employee_name_suffix: Optional[StrictStr] = Field(default=None, alias="employeeNameSuffix") - employee_date_of_birth: Optional[datetime] = Field(default=None, alias="employeeDateOfBirth") - origin_of_health_coverage_code: Optional[StrictStr] = Field(default=None, alias="originOfHealthCoverageCode") - covered_individuals: Optional[List[CoveredIndividualRequest]] = Field(default=None, alias="coveredIndividuals") + employee_first_name: Optional[StrictStr] = Field(default=None, description="Employee's first name", alias="employeeFirstName") + employee_middle_name: Optional[StrictStr] = Field(default=None, description="Employee's middle name", alias="employeeMiddleName") + employee_last_name: Optional[StrictStr] = Field(default=None, description="Employee's last name", alias="employeeLastName") + employee_name_suffix: Optional[StrictStr] = Field(default=None, description="Employee's name suffix", alias="employeeNameSuffix") + employee_date_of_birth: Optional[datetime] = Field(default=None, description="Employee's date of birth", alias="employeeDateOfBirth") + origin_of_health_coverage_code: Optional[StrictStr] = Field(default=None, description="Origin of health coverage code", alias="originOfHealthCoverageCode") + covered_individuals: Optional[List[CoveredIndividualRequest]] = Field(default=None, description="Covered individuals information", alias="coveredIndividuals") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('origin_of_health_coverage_code') def origin_of_health_coverage_code_validate_enum(cls, value): @@ -83,8 +84,8 @@ def origin_of_health_coverage_code_validate_enum(cls, value): if value is None: return value - if value not in set(['SmallBusinessHealthOptionsProgram', 'EmployerSponsored', 'GovernmentSponsored', 'IndividualMarket', 'MultiemployerPlan', 'OtherDesignatedMinimumEssentialCoverage', 'EmployerSponsoredIndividualHra']): - raise ValueError("must be one of enum values ('SmallBusinessHealthOptionsProgram', 'EmployerSponsored', 'GovernmentSponsored', 'IndividualMarket', 'MultiemployerPlan', 'OtherDesignatedMinimumEssentialCoverage', 'EmployerSponsoredIndividualHra')") + if value not in set(['A', 'B', 'C', 'D', 'E', 'F', 'G']): + raise ValueError("must be one of enum values ('A', 'B', 'C', 'D', 'E', 'F', 'G')") return value @field_validator('type') @@ -93,8 +94,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -137,10 +138,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -161,10 +160,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -206,8 +205,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_base_response.py b/Avalara/SDK/models/A1099/V2/form1099_base_response.py new file mode 100644 index 0000000..738609f --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_base_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1099BaseResponse(BaseModel): + """ + Form1099BaseResponse + """ # noqa: E501 + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = [] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099BaseResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099BaseResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_div_list.py b/Avalara/SDK/models/A1099/V2/form1099_div_list.py index 4d545f6..bfc0653 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_div_list.py +++ b/Avalara/SDK/models/A1099/V2/form1099_div_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_div_list_item.py b/Avalara/SDK/models/A1099/V2/form1099_div_list_item.py index c0f51bd..095b156 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_div_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1099_div_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,51 +44,51 @@ class Form1099DivListItem(BaseModel): """ Form1099DivListItem """ # noqa: E501 - total_ordinary_dividends: Optional[StrictStr] = Field(default=None, alias="totalOrdinaryDividends") - qualified_dividends: Optional[StrictStr] = Field(default=None, alias="qualifiedDividends") - total_capital_gain_distr: Optional[StrictStr] = Field(default=None, alias="totalCapitalGainDistr") - unrecap_sec1250_gain: Optional[StrictStr] = Field(default=None, alias="unrecapSec1250Gain") - section1202_gain: Optional[StrictStr] = Field(default=None, alias="section1202Gain") - collectibles_gain: Optional[StrictStr] = Field(default=None, alias="collectiblesGain") - section897_ordinary_dividends: Optional[StrictStr] = Field(default=None, alias="section897OrdinaryDividends") - section897_capital_gain: Optional[StrictStr] = Field(default=None, alias="section897CapitalGain") - nondividend_distributions: Optional[StrictStr] = Field(default=None, alias="nondividendDistributions") - federal_income_tax_withheld: Optional[StrictStr] = Field(default=None, alias="federalIncomeTaxWithheld") - section199_a_dividends: Optional[StrictStr] = Field(default=None, alias="section199ADividends") - investment_expenses: Optional[StrictStr] = Field(default=None, alias="investmentExpenses") - foreign_tax_paid: Optional[StrictStr] = Field(default=None, alias="foreignTaxPaid") - foreign_country_or_us_possession: Optional[StrictStr] = Field(default=None, alias="foreignCountryOrUSPossession") - cash_liquidation_distributions: Optional[StrictStr] = Field(default=None, alias="cashLiquidationDistributions") - noncash_liquidation_distributions: Optional[StrictStr] = Field(default=None, alias="noncashLiquidationDistributions") - exempt_interest_dividends: Optional[StrictStr] = Field(default=None, alias="exemptInterestDividends") - specified_private_activity_bond_interest_dividends: Optional[StrictStr] = Field(default=None, alias="specifiedPrivateActivityBondInterestDividends") - fatca_filing_requirement: Optional[StrictStr] = Field(default=None, alias="fatcaFilingRequirement") - issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") - issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") - tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + total_ordinary_dividends: Optional[StrictStr] = Field(default=None, description="Total ordinary dividends", alias="totalOrdinaryDividends") + qualified_dividends: Optional[StrictStr] = Field(default=None, description="Qualified dividends", alias="qualifiedDividends") + total_capital_gain_distr: Optional[StrictStr] = Field(default=None, description="Total capital gain distributions", alias="totalCapitalGainDistr") + unrecap_sec1250_gain: Optional[StrictStr] = Field(default=None, description="Unrecaptured Section 1250 gain", alias="unrecapSec1250Gain") + section1202_gain: Optional[StrictStr] = Field(default=None, description="Section 1202 gain", alias="section1202Gain") + collectibles_gain: Optional[StrictStr] = Field(default=None, description="Collectibles (28%) gain", alias="collectiblesGain") + section897_ordinary_dividends: Optional[StrictStr] = Field(default=None, description="Section 897 ordinary dividends", alias="section897OrdinaryDividends") + section897_capital_gain: Optional[StrictStr] = Field(default=None, description="Section 897 capital gain", alias="section897CapitalGain") + nondividend_distributions: Optional[StrictStr] = Field(default=None, description="Nondividend distributions", alias="nondividendDistributions") + federal_income_tax_withheld: Optional[StrictStr] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + section199_a_dividends: Optional[StrictStr] = Field(default=None, description="Section 199A dividends", alias="section199ADividends") + investment_expenses: Optional[StrictStr] = Field(default=None, description="Investment expenses", alias="investmentExpenses") + foreign_tax_paid: Optional[StrictStr] = Field(default=None, description="Foreign tax paid", alias="foreignTaxPaid") + foreign_country_or_us_possession: Optional[StrictStr] = Field(default=None, description="Foreign country or U.S. possession", alias="foreignCountryOrUSPossession") + cash_liquidation_distributions: Optional[StrictStr] = Field(default=None, description="Cash liquidation distributions", alias="cashLiquidationDistributions") + noncash_liquidation_distributions: Optional[StrictStr] = Field(default=None, description="Noncash liquidation distributions", alias="noncashLiquidationDistributions") + exempt_interest_dividends: Optional[StrictStr] = Field(default=None, description="Exempt-interest dividends", alias="exemptInterestDividends") + specified_private_activity_bond_interest_dividends: Optional[StrictStr] = Field(default=None, description="Specified private activity bond interest dividends", alias="specifiedPrivateActivityBondInterestDividends") + fatca_filing_requirement: Optional[StrictStr] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('tin_type') def tin_type_validate_enum(cls, value): @@ -151,10 +152,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -198,8 +199,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "taxYear": obj.get("taxYear"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_div_request.py b/Avalara/SDK/models/A1099/V2/form1099_div_request.py index 2b2f3da..783471c 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_div_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_div_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,49 +44,49 @@ class Form1099DivRequest(BaseModel): """ Form1099DivRequest """ # noqa: E501 - total_ordinary_dividends: Optional[StrictStr] = Field(default=None, alias="totalOrdinaryDividends") - qualified_dividends: Optional[StrictStr] = Field(default=None, alias="qualifiedDividends") - total_capital_gain_distr: Optional[StrictStr] = Field(default=None, alias="totalCapitalGainDistr") - unrecap_sec1250_gain: Optional[StrictStr] = Field(default=None, alias="unrecapSec1250Gain") - section1202_gain: Optional[StrictStr] = Field(default=None, alias="section1202Gain") - collectibles_gain: Optional[StrictStr] = Field(default=None, alias="collectiblesGain") - section897_ordinary_dividends: Optional[StrictStr] = Field(default=None, alias="section897OrdinaryDividends") - section897_capital_gain: Optional[StrictStr] = Field(default=None, alias="section897CapitalGain") - nondividend_distributions: Optional[StrictStr] = Field(default=None, alias="nondividendDistributions") - federal_income_tax_withheld: Optional[StrictStr] = Field(default=None, alias="federalIncomeTaxWithheld") - section199_a_dividends: Optional[StrictStr] = Field(default=None, alias="section199ADividends") - investment_expenses: Optional[StrictStr] = Field(default=None, alias="investmentExpenses") - foreign_tax_paid: Optional[StrictStr] = Field(default=None, alias="foreignTaxPaid") - foreign_country_or_us_possession: Optional[StrictStr] = Field(default=None, alias="foreignCountryOrUSPossession") - cash_liquidation_distributions: Optional[StrictStr] = Field(default=None, alias="cashLiquidationDistributions") - noncash_liquidation_distributions: Optional[StrictStr] = Field(default=None, alias="noncashLiquidationDistributions") - exempt_interest_dividends: Optional[StrictStr] = Field(default=None, alias="exemptInterestDividends") - specified_private_activity_bond_interest_dividends: Optional[StrictStr] = Field(default=None, alias="specifiedPrivateActivityBondInterestDividends") - fatca_filing_requirement: Optional[StrictStr] = Field(default=None, alias="fatcaFilingRequirement") + total_ordinary_dividends: Optional[StrictStr] = Field(default=None, description="Total ordinary dividends", alias="totalOrdinaryDividends") + qualified_dividends: Optional[StrictStr] = Field(default=None, description="Qualified dividends", alias="qualifiedDividends") + total_capital_gain_distr: Optional[StrictStr] = Field(default=None, description="Total capital gain distributions", alias="totalCapitalGainDistr") + unrecap_sec1250_gain: Optional[StrictStr] = Field(default=None, description="Unrecaptured Section 1250 gain", alias="unrecapSec1250Gain") + section1202_gain: Optional[StrictStr] = Field(default=None, description="Section 1202 gain", alias="section1202Gain") + collectibles_gain: Optional[StrictStr] = Field(default=None, description="Collectibles (28%) gain", alias="collectiblesGain") + section897_ordinary_dividends: Optional[StrictStr] = Field(default=None, description="Section 897 ordinary dividends", alias="section897OrdinaryDividends") + section897_capital_gain: Optional[StrictStr] = Field(default=None, description="Section 897 capital gain", alias="section897CapitalGain") + nondividend_distributions: Optional[StrictStr] = Field(default=None, description="Nondividend distributions", alias="nondividendDistributions") + federal_income_tax_withheld: Optional[StrictStr] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + section199_a_dividends: Optional[StrictStr] = Field(default=None, description="Section 199A dividends", alias="section199ADividends") + investment_expenses: Optional[StrictStr] = Field(default=None, description="Investment expenses", alias="investmentExpenses") + foreign_tax_paid: Optional[StrictStr] = Field(default=None, description="Foreign tax paid", alias="foreignTaxPaid") + foreign_country_or_us_possession: Optional[StrictStr] = Field(default=None, description="Foreign country or U.S. possession", alias="foreignCountryOrUSPossession") + cash_liquidation_distributions: Optional[StrictStr] = Field(default=None, description="Cash liquidation distributions", alias="cashLiquidationDistributions") + noncash_liquidation_distributions: Optional[StrictStr] = Field(default=None, description="Noncash liquidation distributions", alias="noncashLiquidationDistributions") + exempt_interest_dividends: Optional[StrictStr] = Field(default=None, description="Exempt-interest dividends", alias="exemptInterestDividends") + specified_private_activity_bond_interest_dividends: Optional[StrictStr] = Field(default=None, description="Specified private activity bond interest dividends", alias="specifiedPrivateActivityBondInterestDividends") + fatca_filing_requirement: Optional[StrictStr] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -93,8 +94,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -137,10 +138,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -161,10 +160,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -206,8 +205,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_div_response.py b/Avalara/SDK/models/A1099/V2/form1099_div_response.py index 441119d..9a7279a 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_div_response.py +++ b/Avalara/SDK/models/A1099/V2/form1099_div_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -37,9 +37,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse -from Avalara.SDK.models.A1099.V2.state_efile_status_detail_app import StateEfileStatusDetailApp +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse from Avalara.SDK.models.A1099.V2.status_detail import StatusDetail -from Avalara.SDK.models.A1099.V2.validation_error_app import ValidationErrorApp +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -78,11 +78,11 @@ class Form1099DivResponse(BaseModel): tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") federal_efile_status: Optional[StatusDetail] = Field(default=None, alias="federalEfileStatus") - state_efile_status: Optional[List[StateEfileStatusDetailApp]] = Field(default=None, alias="stateEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, alias="stateEfileStatus") postal_mail_status: Optional[StatusDetail] = Field(default=None, alias="postalMailStatus") tin_match_status: Optional[StatusDetail] = Field(default=None, alias="tinMatchStatus") address_verification_status: Optional[StatusDetail] = Field(default=None, alias="addressVerificationStatus") - validation_errors: Optional[List[ValidationErrorApp]] = Field(default=None, alias="validationErrors") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, alias="validationErrors") __properties: ClassVar[List[str]] = ["type", "createdAt", "updatedAt", "userId", "stateAndLocalWithholding", "tinType", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "recipientName", "recipientTin", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "validationErrors"] @field_validator('type') @@ -91,8 +91,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -248,11 +248,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tinMatch": obj.get("tinMatch"), "addressVerification": obj.get("addressVerification"), "federalEfileStatus": StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, - "stateEfileStatus": [StateEfileStatusDetailApp.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, "tinMatchStatus": StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, "addressVerificationStatus": StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, - "validationErrors": [ValidationErrorApp.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/form1099_k_list.py b/Avalara/SDK/models/A1099/V2/form1099_k_list.py index c2c76b4..bc2092b 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_k_list.py +++ b/Avalara/SDK/models/A1099/V2/form1099_k_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_k_list_item.py b/Avalara/SDK/models/A1099/V2/form1099_k_list_item.py index 06189c7..e4e34fb 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_k_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1099_k_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,52 +44,52 @@ class Form1099KListItem(BaseModel): """ Form1099KListItem """ # noqa: E501 - filer_type: Optional[StrictStr] = Field(default=None, alias="filerType") - payment_type: Optional[StrictStr] = Field(default=None, alias="paymentType") - payment_settlement_entity_name_phone_number: Optional[StrictStr] = Field(default=None, alias="paymentSettlementEntityNamePhoneNumber") - gross_amount_payment_card: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossAmountPaymentCard") - card_not_present_transactions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="cardNotPresentTransactions") - merchant_category_code: Optional[StrictStr] = Field(default=None, alias="merchantCategoryCode") - payment_transaction_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="paymentTransactionNumber") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") - january: Optional[Union[StrictFloat, StrictInt]] = None - february: Optional[Union[StrictFloat, StrictInt]] = None - march: Optional[Union[StrictFloat, StrictInt]] = None - april: Optional[Union[StrictFloat, StrictInt]] = None - may: Optional[Union[StrictFloat, StrictInt]] = None - june: Optional[Union[StrictFloat, StrictInt]] = None - july: Optional[Union[StrictFloat, StrictInt]] = None - august: Optional[Union[StrictFloat, StrictInt]] = None - sept: Optional[Union[StrictFloat, StrictInt]] = None - october: Optional[Union[StrictFloat, StrictInt]] = None - november: Optional[Union[StrictFloat, StrictInt]] = None - december: Optional[Union[StrictFloat, StrictInt]] = None - issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") - issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") - tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + filer_type: Optional[StrictStr] = Field(default=None, description="Filer type (PSE or EPF)", alias="filerType") + payment_type: Optional[StrictStr] = Field(default=None, description="Payment type (payment card or third party network)", alias="paymentType") + payment_settlement_entity_name_phone_number: Optional[StrictStr] = Field(default=None, description="Payment settlement entity name and phone number", alias="paymentSettlementEntityNamePhoneNumber") + gross_amount_payment_card: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross amount of payment card/third party network transactions", alias="grossAmountPaymentCard") + card_not_present_transactions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Card not present transactions", alias="cardNotPresentTransactions") + merchant_category_code: Optional[StrictStr] = Field(default=None, description="Merchant category code", alias="merchantCategoryCode") + payment_transaction_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of payment transactions", alias="paymentTransactionNumber") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + january: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="January gross payments") + february: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="February gross payments") + march: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="March gross payments") + april: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="April gross payments") + may: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="May gross payments") + june: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="June gross payments") + july: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="July gross payments") + august: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="August gross payments") + sept: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="September gross payments") + october: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="October gross payments") + november: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="November gross payments") + december: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="December gross payments") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('filer_type') def filer_type_validate_enum(cls, value): @@ -172,10 +173,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -219,8 +220,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "taxYear": obj.get("taxYear"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_k_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1099_k_list_item_response.py new file mode 100644 index 0000000..4f4c1a5 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_k_list_item_response.py @@ -0,0 +1,365 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1099KListItemResponse(BaseModel): + """ + Form1099KListItemResponse + """ # noqa: E501 + filer_type: Optional[StrictStr] = Field(default=None, description="Filer type (PSE or EPF)", alias="filerType") + payment_type: Optional[StrictStr] = Field(default=None, description="Payment type (payment card or third party network)", alias="paymentType") + payment_settlement_entity_name_phone_number: Optional[StrictStr] = Field(default=None, description="Payment settlement entity name and phone number", alias="paymentSettlementEntityNamePhoneNumber") + gross_amount_payment_card: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross amount of payment card/third party network transactions", alias="grossAmountPaymentCard") + card_not_present_transactions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Card not present transactions", alias="cardNotPresentTransactions") + merchant_category_code: Optional[StrictStr] = Field(default=None, description="Merchant category code", alias="merchantCategoryCode") + payment_transaction_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of payment transactions", alias="paymentTransactionNumber") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + january: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="January gross payments") + february: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="February gross payments") + march: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="March gross payments") + april: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="April gross payments") + may: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="May gross payments") + june: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="June gross payments") + july: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="July gross payments") + august: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="August gross payments") + sept: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="September gross payments") + october: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="October gross payments") + november: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="November gross payments") + december: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="December gross payments") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + @field_validator('filer_type') + def filer_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['PSE', 'EPF', 'Other']): + raise ValueError("must be one of enum values ('PSE', 'EPF', 'Other')") + return value + + @field_validator('payment_type') + def payment_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MerchantPaymentCard', 'ThirdPartyNetwork']): + raise ValueError("must be one of enum values ('MerchantPaymentCard', 'ThirdPartyNetwork')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099KListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099KListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_k_request.py b/Avalara/SDK/models/A1099/V2/form1099_k_request.py index a2fd3a6..3449e20 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_k_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_k_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,50 +44,50 @@ class Form1099KRequest(BaseModel): """ Form1099KRequest """ # noqa: E501 - filer_type: Optional[StrictInt] = Field(default=None, alias="filerType") - payment_type: Optional[StrictInt] = Field(default=None, alias="paymentType") - payment_settlement_entity_name_phone_number: Optional[StrictStr] = Field(default=None, alias="paymentSettlementEntityNamePhoneNumber") - gross_amount_payment_card: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossAmountPaymentCard") - card_not_present_transactions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="cardNotPresentTransactions") - merchant_category_code: Optional[StrictStr] = Field(default=None, alias="merchantCategoryCode") - payment_transaction_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="paymentTransactionNumber") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") - january: Optional[Union[StrictFloat, StrictInt]] = None - february: Optional[Union[StrictFloat, StrictInt]] = None - march: Optional[Union[StrictFloat, StrictInt]] = None - april: Optional[Union[StrictFloat, StrictInt]] = None - may: Optional[Union[StrictFloat, StrictInt]] = None - june: Optional[Union[StrictFloat, StrictInt]] = None - july: Optional[Union[StrictFloat, StrictInt]] = None - august: Optional[Union[StrictFloat, StrictInt]] = None - sept: Optional[Union[StrictFloat, StrictInt]] = None - october: Optional[Union[StrictFloat, StrictInt]] = None - november: Optional[Union[StrictFloat, StrictInt]] = None - december: Optional[Union[StrictFloat, StrictInt]] = None + filer_type: Optional[StrictInt] = Field(default=None, description="Filer type (PSE or EPF)", alias="filerType") + payment_type: Optional[StrictInt] = Field(default=None, description="Payment type (payment card or third party network)", alias="paymentType") + payment_settlement_entity_name_phone_number: Optional[StrictStr] = Field(default=None, description="Payment settlement entity name and phone number", alias="paymentSettlementEntityNamePhoneNumber") + gross_amount_payment_card: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross amount of payment card/third party network transactions", alias="grossAmountPaymentCard") + card_not_present_transactions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Card not present transactions", alias="cardNotPresentTransactions") + merchant_category_code: Optional[StrictStr] = Field(default=None, description="Merchant category code", alias="merchantCategoryCode") + payment_transaction_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of payment transactions", alias="paymentTransactionNumber") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + january: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="January gross payments") + february: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="February gross payments") + march: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="March gross payments") + april: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="April gross payments") + may: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="May gross payments") + june: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="June gross payments") + july: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="July gross payments") + august: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="August gross payments") + sept: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="September gross payments") + october: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="October gross payments") + november: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="November gross payments") + december: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="December gross payments") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -94,8 +95,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -138,10 +139,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -162,10 +161,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -207,8 +206,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_list_response.py b/Avalara/SDK/models/A1099/V2/form1099_list_response.py new file mode 100644 index 0000000..d56bc74 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_list_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.form1099_list_response_value_inner import Form1099ListResponseValueInner +from typing import Optional, Set +from typing_extensions import Self + +class Form1099ListResponse(BaseModel): + """ + Form1099ListResponse + """ # noqa: E501 + value: Optional[List[Form1099ListResponseValueInner]] = Field(default=None, description="List of Form 1099 responses") + __properties: ClassVar[List[str]] = ["value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099ListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in value (list) + _items = [] + if self.value: + for _item in self.value: + if _item: + _items.append(_item.to_dict()) + _dict['value'] = _items + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099ListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": [Form1099ListResponseValueInner.from_dict(_item) for _item in obj["value"]] if obj.get("value") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_list_response_value_inner.py b/Avalara/SDK/models/A1099/V2/form1099_list_response_value_inner.py new file mode 100644 index 0000000..f62de12 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_list_response_value_inner.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.form1042_s_list_item_response import Form1042SListItemResponse +from Avalara.SDK.models.A1099.V2.form1095_b_list_item_response import Form1095BListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_base_response import Form1099BaseResponse +from Avalara.SDK.models.A1099.V2.form1099_k_list_item_response import Form1099KListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_misc_list_item_response import Form1099MiscListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_nec_list_item_response import Form1099NecListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_r_list_item_response import Form1099RListItemResponse +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +FORM1099LISTRESPONSEVALUEINNER_ONE_OF_SCHEMAS = ["Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse"] + +class Form1099ListResponseValueInner(BaseModel): + """ + Form1099ListResponseValueInner + """ + # data type: Form1099BaseResponse + oneof_schema_1_validator: Optional[Form1099BaseResponse] = None + # data type: Form1042SListItemResponse + oneof_schema_2_validator: Optional[Form1042SListItemResponse] = None + # data type: Form1095BListItemResponse + oneof_schema_3_validator: Optional[Form1095BListItemResponse] = None + # data type: Form1099KListItemResponse + oneof_schema_4_validator: Optional[Form1099KListItemResponse] = None + # data type: Form1099MiscListItemResponse + oneof_schema_5_validator: Optional[Form1099MiscListItemResponse] = None + # data type: Form1099NecListItemResponse + oneof_schema_6_validator: Optional[Form1099NecListItemResponse] = None + # data type: Form1099RListItemResponse + oneof_schema_7_validator: Optional[Form1099RListItemResponse] = None + actual_instance: Optional[Union[Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]] = None + one_of_schemas: Set[str] = { "Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = Form1099ListResponseValueInner.model_construct() + error_messages = [] + match = 0 + # validate data type: Form1099BaseResponse + if not isinstance(v, Form1099BaseResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099BaseResponse`") + else: + match += 1 + # validate data type: Form1042SListItemResponse + if not isinstance(v, Form1042SListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1042SListItemResponse`") + else: + match += 1 + # validate data type: Form1095BListItemResponse + if not isinstance(v, Form1095BListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1095BListItemResponse`") + else: + match += 1 + # validate data type: Form1099KListItemResponse + if not isinstance(v, Form1099KListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099KListItemResponse`") + else: + match += 1 + # validate data type: Form1099MiscListItemResponse + if not isinstance(v, Form1099MiscListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099MiscListItemResponse`") + else: + match += 1 + # validate data type: Form1099NecListItemResponse + if not isinstance(v, Form1099NecListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099NecListItemResponse`") + else: + match += 1 + # validate data type: Form1099RListItemResponse + if not isinstance(v, Form1099RListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099RListItemResponse`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into Form1099BaseResponse + try: + instance.actual_instance = Form1099BaseResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1042SListItemResponse + try: + instance.actual_instance = Form1042SListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1095BListItemResponse + try: + instance.actual_instance = Form1095BListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099KListItemResponse + try: + instance.actual_instance = Form1099KListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099MiscListItemResponse + try: + instance.actual_instance = Form1099MiscListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099NecListItemResponse + try: + instance.actual_instance = Form1099NecListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1099RListItemResponse + try: + instance.actual_instance = Form1099RListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc_list.py b/Avalara/SDK/models/A1099/V2/form1099_misc_list.py index 2e8b0ff..23ff7f8 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_misc_list.py +++ b/Avalara/SDK/models/A1099/V2/form1099_misc_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc_list_item.py b/Avalara/SDK/models/A1099/V2/form1099_misc_list_item.py index 6b390c8..8404417 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_misc_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1099_misc_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,48 +44,48 @@ class Form1099MiscListItem(BaseModel): """ Form1099MiscListItem """ # noqa: E501 - second_tin_notice: Optional[StrictBool] = Field(default=None, alias="secondTinNotice") - rents: Optional[Union[StrictFloat, StrictInt]] = None - royalties: Optional[Union[StrictFloat, StrictInt]] = None - other_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="otherIncome") - fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fedIncomeTaxWithheld") - fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fishingBoatProceeds") - medical_health_care_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="medicalHealthCarePayments") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") - substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="substitutePayments") - crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="cropInsuranceProceeds") - gross_proceeds_paid_to_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossProceedsPaidToAttorney") - fish_purchased_for_resale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fishPurchasedForResale") - section409_a_deferrals: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="section409ADeferrals") - fatca_filing_requirement: Optional[StrictBool] = Field(default=None, alias="fatcaFilingRequirement") - excess_golden_parachute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="excessGoldenParachutePayments") - nonqualified_deferred_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nonqualifiedDeferredCompensation") - issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") - issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") - tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") + rents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Rents") + royalties: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Royalties") + other_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other income", alias="otherIncome") + fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="fedIncomeTaxWithheld") + fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fishing boat proceeds", alias="fishingBoatProceeds") + medical_health_care_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Medical and health care payments", alias="medicalHealthCarePayments") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Substitute payments in lieu of dividends or interest", alias="substitutePayments") + crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crop insurance proceeds", alias="cropInsuranceProceeds") + gross_proceeds_paid_to_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross proceeds paid to an attorney", alias="grossProceedsPaidToAttorney") + fish_purchased_for_resale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fish purchased for resale", alias="fishPurchasedForResale") + section409_a_deferrals: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Section 409A deferrals", alias="section409ADeferrals") + fatca_filing_requirement: Optional[StrictBool] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") + excess_golden_parachute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Legacy field) Excess golden parachute payments", alias="excessGoldenParachutePayments") + nonqualified_deferred_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nonqualified deferred compensation", alias="nonqualifiedDeferredCompensation") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('tin_type') def tin_type_validate_enum(cls, value): @@ -148,10 +149,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -195,8 +196,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "taxYear": obj.get("taxYear"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1099_misc_list_item_response.py new file mode 100644 index 0000000..1dc7003 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_misc_list_item_response.py @@ -0,0 +1,338 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1099MiscListItemResponse(BaseModel): + """ + Form1099MiscListItemResponse + """ # noqa: E501 + rents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Rents") + royalties: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Royalties") + other_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other income", alias="otherIncome") + fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="fedIncomeTaxWithheld") + fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fishing boat proceeds", alias="fishingBoatProceeds") + medical_and_health_care: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Medical and health care payments", alias="medicalAndHealthCare") + substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Substitute payments in lieu of dividends or interest", alias="substitutePayments") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crop insurance proceeds", alias="cropInsuranceProceeds") + excess_golden_parachute: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Legacy field) Excess golden parachute payments", alias="excessGoldenParachute") + gross_amount_paid_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross proceeds paid to an attorney", alias="grossAmountPaidAttorney") + section409_a_deferrals: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Section 409A deferrals", alias="section409ADeferrals") + section409_a_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nonqualified deferred compensation", alias="section409AIncome") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099MiscListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099MiscListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc_request.py b/Avalara/SDK/models/A1099/V2/form1099_misc_request.py index b451c82..a48ca3f 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_misc_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_misc_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,46 +44,46 @@ class Form1099MiscRequest(BaseModel): """ Form1099MiscRequest """ # noqa: E501 - second_tin_notice: Optional[StrictBool] = Field(default=None, alias="secondTinNotice") - rents: Optional[Union[StrictFloat, StrictInt]] = None - royalties: Optional[Union[StrictFloat, StrictInt]] = None - other_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="otherIncome") - fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fedIncomeTaxWithheld") - fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fishingBoatProceeds") - medical_health_care_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="medicalHealthCarePayments") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") - substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="substitutePayments") - crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="cropInsuranceProceeds") - gross_proceeds_paid_to_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossProceedsPaidToAttorney") - fish_purchased_for_resale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fishPurchasedForResale") - section409_a_deferrals: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="section409ADeferrals") - fatca_filing_requirement: Optional[StrictBool] = Field(default=None, alias="fatcaFilingRequirement") - excess_golden_parachute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="excessGoldenParachutePayments") - nonqualified_deferred_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nonqualifiedDeferredCompensation") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") + rents: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Rents") + royalties: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Royalties") + other_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other income", alias="otherIncome") + fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="fedIncomeTaxWithheld") + fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fishing boat proceeds", alias="fishingBoatProceeds") + medical_health_care_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Medical and health care payments", alias="medicalHealthCarePayments") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Substitute payments in lieu of dividends or interest", alias="substitutePayments") + crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Crop insurance proceeds", alias="cropInsuranceProceeds") + gross_proceeds_paid_to_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross proceeds paid to an attorney", alias="grossProceedsPaidToAttorney") + fish_purchased_for_resale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Fish purchased for resale", alias="fishPurchasedForResale") + section409_a_deferrals: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Section 409A deferrals", alias="section409ADeferrals") + fatca_filing_requirement: Optional[StrictBool] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") + excess_golden_parachute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="(Legacy field) Excess golden parachute payments", alias="excessGoldenParachutePayments") + nonqualified_deferred_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nonqualified deferred compensation", alias="nonqualifiedDeferredCompensation") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -90,8 +91,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -134,10 +135,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -158,10 +157,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -203,8 +202,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_misc_response.py b/Avalara/SDK/models/A1099/V2/form1099_misc_response.py index 3518168..07b2158 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_misc_response.py +++ b/Avalara/SDK/models/A1099/V2/form1099_misc_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -37,9 +37,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse -from Avalara.SDK.models.A1099.V2.state_efile_status_detail_app import StateEfileStatusDetailApp +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse from Avalara.SDK.models.A1099.V2.status_detail import StatusDetail -from Avalara.SDK.models.A1099.V2.validation_error_app import ValidationErrorApp +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -54,7 +54,7 @@ class Form1099MiscResponse(BaseModel): fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fedIncomeTaxWithheld") fishing_boat_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="fishingBoatProceeds") medical_health_care_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="medicalHealthCarePayments") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, alias="directSalesIndicator") substitute_payments: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="substitutePayments") crop_insurance_proceeds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="cropInsuranceProceeds") gross_proceeds_paid_to_attorney: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossProceedsPaidToAttorney") @@ -94,11 +94,11 @@ class Form1099MiscResponse(BaseModel): tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") federal_efile_status: Optional[StatusDetail] = Field(default=None, alias="federalEfileStatus") - state_efile_status: Optional[List[StateEfileStatusDetailApp]] = Field(default=None, alias="stateEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, alias="stateEfileStatus") postal_mail_status: Optional[StatusDetail] = Field(default=None, alias="postalMailStatus") tin_match_status: Optional[StatusDetail] = Field(default=None, alias="tinMatchStatus") address_verification_status: Optional[StatusDetail] = Field(default=None, alias="addressVerificationStatus") - validation_errors: Optional[List[ValidationErrorApp]] = Field(default=None, alias="validationErrors") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, alias="validationErrors") __properties: ClassVar[List[str]] = ["type", "createdAt", "updatedAt", "userId", "stateAndLocalWithholding", "tinType", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "recipientName", "recipientTin", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "validationErrors"] @field_validator('type') @@ -107,8 +107,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -264,11 +264,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tinMatch": obj.get("tinMatch"), "addressVerification": obj.get("addressVerification"), "federalEfileStatus": StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, - "stateEfileStatus": [StateEfileStatusDetailApp.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, "tinMatchStatus": StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, "addressVerificationStatus": StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, - "validationErrors": [ValidationErrorApp.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec_list.py b/Avalara/SDK/models/A1099/V2/form1099_nec_list.py index 6c65223..5f0effe 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_nec_list.py +++ b/Avalara/SDK/models/A1099/V2/form1099_nec_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec_list_item.py b/Avalara/SDK/models/A1099/V2/form1099_nec_list_item.py index ab96ca5..601a860 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_nec_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1099_nec_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,44 +35,45 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self class Form1099NecListItem(BaseModel): """ - Form1099NecListItem + 1099-NEC - Nonemployee compensation """ # noqa: E501 - second_tin_notice: Optional[StrictBool] = Field(default=None, alias="secondTinNotice") - nonemployee_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nonemployeeCompensation") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") - issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") - issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") - tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") + nonemployee_compensation: Union[StrictFloat, StrictInt] = Field(description="Nonemployee compensation", alias="nonemployeeCompensation") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('tin_type') def tin_type_validate_enum(cls, value): @@ -136,10 +137,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -183,8 +184,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "taxYear": obj.get("taxYear"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1099_nec_list_item_response.py new file mode 100644 index 0000000..abd2a14 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_nec_list_item_response.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1099NecListItemResponse(BaseModel): + """ + Form1099NecListItemResponse + """ # noqa: E501 + nonemployee_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Nonemployee compensation", alias="nonemployeeCompensation") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099NecListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099NecListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec_request.py b/Avalara/SDK/models/A1099/V2/form1099_nec_request.py index ad90663..2a5fa98 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_nec_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_nec_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,34 +44,34 @@ class Form1099NecRequest(BaseModel): """ Form1099NecRequest """ # noqa: E501 - second_tin_notice: Optional[StrictBool] = Field(default=None, alias="secondTinNotice") - nonemployee_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nonemployeeCompensation") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") + second_tin_notice: Optional[StrictBool] = Field(default=None, description="Second TIN notice", alias="secondTinNotice") + nonemployee_compensation: Union[StrictFloat, StrictInt] = Field(description="Nonemployee compensation", alias="nonemployeeCompensation") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, description="Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale", alias="directSalesIndicator") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -78,8 +79,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -122,10 +123,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -146,10 +145,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -191,8 +190,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_nec_response.py b/Avalara/SDK/models/A1099/V2/form1099_nec_response.py index 38787c3..6d8ba8e 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_nec_response.py +++ b/Avalara/SDK/models/A1099/V2/form1099_nec_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -37,9 +37,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse -from Avalara.SDK.models.A1099.V2.state_efile_status_detail_app import StateEfileStatusDetailApp +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse from Avalara.SDK.models.A1099.V2.status_detail import StatusDetail -from Avalara.SDK.models.A1099.V2.validation_error_app import ValidationErrorApp +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -49,7 +49,7 @@ class Form1099NecResponse(BaseModel): """ # noqa: E501 second_tin_notice: Optional[StrictBool] = Field(default=None, alias="secondTinNotice") nonemployee_compensation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nonemployeeCompensation") - payer_made_direct_sales: Optional[StrictBool] = Field(default=None, alias="payerMadeDirectSales") + direct_sales_indicator: Optional[StrictBool] = Field(default=None, alias="directSalesIndicator") federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") type: Optional[StrictStr] = None created_at: Optional[datetime] = Field(default=None, alias="createdAt") @@ -82,11 +82,11 @@ class Form1099NecResponse(BaseModel): tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") federal_efile_status: Optional[StatusDetail] = Field(default=None, alias="federalEfileStatus") - state_efile_status: Optional[List[StateEfileStatusDetailApp]] = Field(default=None, alias="stateEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, alias="stateEfileStatus") postal_mail_status: Optional[StatusDetail] = Field(default=None, alias="postalMailStatus") tin_match_status: Optional[StatusDetail] = Field(default=None, alias="tinMatchStatus") address_verification_status: Optional[StatusDetail] = Field(default=None, alias="addressVerificationStatus") - validation_errors: Optional[List[ValidationErrorApp]] = Field(default=None, alias="validationErrors") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, alias="validationErrors") __properties: ClassVar[List[str]] = ["type", "createdAt", "updatedAt", "userId", "stateAndLocalWithholding", "tinType", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "recipientName", "recipientTin", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "validationErrors"] @field_validator('type') @@ -95,8 +95,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -252,11 +252,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tinMatch": obj.get("tinMatch"), "addressVerification": obj.get("addressVerification"), "federalEfileStatus": StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, - "stateEfileStatus": [StateEfileStatusDetailApp.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, "tinMatchStatus": StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, "addressVerificationStatus": StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, - "validationErrors": [ValidationErrorApp.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/form1099_proccess_result.py b/Avalara/SDK/models/A1099/V2/form1099_proccess_result.py index c4eff7c..fdc3d99 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_proccess_result.py +++ b/Avalara/SDK/models/A1099/V2/form1099_proccess_result.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_r_list.py b/Avalara/SDK/models/A1099/V2/form1099_r_list.py index f4cec14..446b54e 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_r_list.py +++ b/Avalara/SDK/models/A1099/V2/form1099_r_list.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/form1099_r_list_item.py b/Avalara/SDK/models/A1099/V2/form1099_r_list_item.py index d1210d4..65c3e27 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_r_list_item.py +++ b/Avalara/SDK/models/A1099/V2/form1099_r_list_item.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -36,6 +36,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -44,52 +45,52 @@ class Form1099RListItem(BaseModel): """ Form1099RListItem """ # noqa: E501 - gross_distribution: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossDistribution") - taxable_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="taxableAmount") - taxable_amount_not_determined: Optional[StrictBool] = Field(default=None, alias="taxableAmountNotDetermined") - total_distribution_determined: Optional[StrictBool] = Field(default=None, alias="totalDistributionDetermined") - capital_gain: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="capitalGain") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") - employee_contributions_or_designated_roth_or_insurance_premiums: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="employeeContributionsOrDesignatedRothOrInsurancePremiums") - net_unrealized_appreciation_in_employer_securities: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="netUnrealizedAppreciationInEmployerSecurities") - distribution_code: Optional[StrictStr] = Field(default=None, alias="distributionCode") - second_distribution_code: Optional[StrictStr] = Field(default=None, alias="secondDistributionCode") - ira_sep_simple: Optional[StrictBool] = Field(default=None, alias="iraSepSimple") - traditional_ira_sep_simple_or_roth_conversion_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="traditionalIraSepSimpleOrRothConversionAmount") - other_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="otherAmount") - other_percentage: Optional[StrictStr] = Field(default=None, alias="otherPercentage") - total_distribution_percentage: Optional[StrictStr] = Field(default=None, alias="totalDistributionPercentage") - total_employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalEmployeeContributions") - amount_allocable_to_irr_within5_years: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="amountAllocableToIrrWithin5Years") - first_year_of_designated_roth_contribution: Optional[StrictInt] = Field(default=None, alias="firstYearOfDesignatedRothContribution") - fatca_filing_requirement: Optional[StrictBool] = Field(default=None, alias="fatcaFilingRequirement") - date_of_payment: Optional[datetime] = Field(default=None, alias="dateOfPayment") - issuer_reference_id: Optional[StrictStr] = Field(default=None, alias="issuerReferenceId") - issuer_tin: Optional[StrictStr] = Field(default=None, alias="issuerTin") - tax_year: Optional[StrictInt] = Field(default=None, alias="taxYear") - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + gross_distribution: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross distribution", alias="grossDistribution") + taxable_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Taxable amount", alias="taxableAmount") + taxable_amount_not_determined: Optional[StrictBool] = Field(default=None, description="Taxable amount not determined", alias="taxableAmountNotDetermined") + total_distribution_determined: Optional[StrictBool] = Field(default=None, description="Total distribution", alias="totalDistributionDetermined") + capital_gain: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Capital gain (included in Box 2a)", alias="capitalGain") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + employee_contributions_or_designated_roth_or_insurance_premiums: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Employee contributions/Designated Roth contributions or insurance premiums", alias="employeeContributionsOrDesignatedRothOrInsurancePremiums") + net_unrealized_appreciation_in_employer_securities: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Net unrealized appreciation in employer's securities", alias="netUnrealizedAppreciationInEmployerSecurities") + distribution_code: Optional[StrictStr] = Field(default=None, description="Distribution code", alias="distributionCode") + second_distribution_code: Optional[StrictStr] = Field(default=None, description="Second distribution code", alias="secondDistributionCode") + ira_sep_simple: Optional[StrictBool] = Field(default=None, description="IRA/SEP/SIMPLE", alias="iraSepSimple") + traditional_ira_sep_simple_or_roth_conversion_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Traditional IRA/SEP/SIMPLE or Roth conversion amount", alias="traditionalIraSepSimpleOrRothConversionAmount") + other_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other amount", alias="otherAmount") + other_percentage: Optional[StrictStr] = Field(default=None, description="Other percentage", alias="otherPercentage") + total_distribution_percentage: Optional[StrictStr] = Field(default=None, description="Total distribution percentage", alias="totalDistributionPercentage") + total_employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total employee contributions", alias="totalEmployeeContributions") + amount_allocable_to_irr_within5_years: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount allocable to IRR within 5 years", alias="amountAllocableToIrrWithin5Years") + first_year_of_designated_roth_contribution: Optional[StrictInt] = Field(default=None, description="First year of designated Roth contribution", alias="firstYearOfDesignatedRothContribution") + fatca_filing_requirement: Optional[StrictBool] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") + date_of_payment: Optional[datetime] = Field(default=None, description="Date of payment", alias="dateOfPayment") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerReferenceId", "issuerTin", "taxYear", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('distribution_code') def distribution_code_validate_enum(cls, value): @@ -97,8 +98,8 @@ def distribution_code_validate_enum(cls, value): if value is None: return value - if value not in set(['EarlyDistributionNoException', 'EarlyDistributionWithException', 'Disability', 'Death', 'ProhibitedTransaction', 'Section1035Exchange', 'NormalDistribution', 'ExcessContributionsCurrentYear', 'CurrentLifeInsuranceProtectionCost', 'TenYearTaxOption', 'DesignatedRothDistribution', 'ReportableDeathBenefits', 'NonqualifiedAnnuityPayments', 'EPCRSDistribution', 'CharitableGiftAnnuity', 'DirectRollover', 'RothAccountToIRADirectRollover', 'EarlyRothIRADistribution', 'IRAAssetsNoFMV', 'LoansDeemedDistributions', 'QualifiedPlanLoanOffsets', 'RecharacterizedIRANextYear', 'ExcessContributionsPreviousYear', 'QualifiedRothIRADistribution', 'RecharacterizedIRAPreviousYear', 'EarlySimpleIRADistribution', 'RothIRADistributionException', 'ESOPDistribution', 'LongTermCareInsurance']): - raise ValueError("must be one of enum values ('EarlyDistributionNoException', 'EarlyDistributionWithException', 'Disability', 'Death', 'ProhibitedTransaction', 'Section1035Exchange', 'NormalDistribution', 'ExcessContributionsCurrentYear', 'CurrentLifeInsuranceProtectionCost', 'TenYearTaxOption', 'DesignatedRothDistribution', 'ReportableDeathBenefits', 'NonqualifiedAnnuityPayments', 'EPCRSDistribution', 'CharitableGiftAnnuity', 'DirectRollover', 'RothAccountToIRADirectRollover', 'EarlyRothIRADistribution', 'IRAAssetsNoFMV', 'LoansDeemedDistributions', 'QualifiedPlanLoanOffsets', 'RecharacterizedIRANextYear', 'ExcessContributionsPreviousYear', 'QualifiedRothIRADistribution', 'RecharacterizedIRAPreviousYear', 'EarlySimpleIRADistribution', 'RothIRADistributionException', 'ESOPDistribution', 'LongTermCareInsurance')") + if value not in set(['1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'W']): + raise ValueError("must be one of enum values ('1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'W')") return value @field_validator('second_distribution_code') @@ -173,10 +174,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -220,8 +221,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "taxYear": obj.get("taxYear"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_r_list_item_response.py b/Avalara/SDK/models/A1099/V2/form1099_r_list_item_response.py new file mode 100644 index 0000000..be68451 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_r_list_item_response.py @@ -0,0 +1,345 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse +from typing import Optional, Set +from typing_extensions import Self + +class Form1099RListItemResponse(BaseModel): + """ + Form1099RListItemResponse + """ # noqa: E501 + gross_distributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross distribution", alias="grossDistributions") + taxable_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Taxable amount", alias="taxableAmount") + taxable_amount_not_determined: Optional[StrictBool] = Field(default=None, description="Taxable amount not determined", alias="taxableAmountNotDetermined") + total_distribution_indicator: Optional[StrictBool] = Field(default=None, description="Total distribution", alias="totalDistributionIndicator") + capital_gain: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Capital gain (included in Box 2a)", alias="capitalGain") + fed_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="fedIncomeTaxWithheld") + employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Employee contributions/Designated Roth contributions or insurance premiums", alias="employeeContributions") + net_unrealized_appreciation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Net unrealized appreciation in employer's securities", alias="netUnrealizedAppreciation") + distribution_code_required: Optional[StrictStr] = Field(default=None, description="Distribution code", alias="distributionCodeRequired") + distribution_code_optional: Optional[StrictStr] = Field(default=None, description="Second distribution code", alias="distributionCodeOptional") + ira_sep_simple_indicator: Optional[StrictBool] = Field(default=None, description="IRA/SEP/SIMPLE", alias="iraSepSimpleIndicator") + total_ira_sep_simple_distribution: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Traditional IRA/SEP/SIMPLE or Roth conversion amount", alias="totalIraSepSimpleDistribution") + other: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other amount") + other_percent: Optional[StrictStr] = Field(default=None, description="Other percentage", alias="otherPercent") + percentage_total_distribution: Optional[StrictStr] = Field(default=None, description="Total distribution percentage", alias="percentageTotalDistribution") + total_employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total employee contributions", alias="totalEmployeeContributions") + amount_allocable_to_irr: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount allocable to IRR within 5 years", alias="amountAllocableToIrr") + first_year_designated_roth_contrib: Optional[StrictStr] = Field(default=None, description="First year of designated Roth contribution", alias="firstYearDesignatedRothContrib") + fatca_requirement_indicator: Optional[StrictBool] = Field(default=None, description="FATCA filing requirement", alias="fatcaRequirementIndicator") + date_of_payment: Optional[StrictStr] = Field(default=None, description="Date of payment", alias="dateOfPayment") + id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="ID of the form") + type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC") + issuer_id: StrictInt = Field(description="Issuer ID", alias="issuerId") + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN", alias="issuerTin") + tax_year: Optional[StrictInt] = Field(default=None, description="Tax year", alias="taxYear") + federal_efile: StrictBool = Field(description="Boolean indicating that federal e-filing has been scheduled for this form", alias="federalEfile") + federal_efile_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Federal e-file status", alias="federalEfileStatus") + state_efile: StrictBool = Field(description="Boolean indicating that state e-filing has been scheduled for this form", alias="stateEfile") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, description="State e-file status", alias="stateEfileStatus") + postal_mail: StrictBool = Field(description="Boolean indicating that postal mailing to the recipient has been scheduled for this form", alias="postalMail") + postal_mail_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Postal mail to recipient status", alias="postalMailStatus") + tin_match: StrictBool = Field(description="Boolean indicating that TIN Matching has been scheduled for this form", alias="tinMatch") + tin_match_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="TIN Match status", alias="tinMatchStatus") + address_verification: StrictBool = Field(description="Boolean indicating that address verification has been scheduled for this form", alias="addressVerification") + address_verification_status: Optional[Form1099StatusDetailResponse] = Field(default=None, description="Address verification status", alias="addressVerificationStatus") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="Recipient email address") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number") + recipient_name: Optional[StrictStr] = Field(default=None, description="Recipient name", alias="recipientName") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Optional[StrictStr] = Field(default=None, description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Optional[StrictStr] = Field(default=None, description="City") + state: Optional[StrictStr] = Field(default=None, description="US state") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + foreign_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="foreignProvince") + country_code: Optional[StrictStr] = Field(default=None, description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, description="Validation errors", alias="validationErrors") + created_at: Optional[datetime] = Field(default=None, description="Creation time", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Update time", alias="updatedAt") + state_and_local_withholding: Optional[StateAndLocalWithholdingResponse] = Field(default=None, alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["id", "type", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "federalEfile", "federalEfileStatus", "stateEfile", "stateEfileStatus", "postalMail", "postalMailStatus", "tinMatch", "tinMatchStatus", "addressVerification", "addressVerificationStatus", "referenceId", "email", "tinType", "tin", "recipientName", "recipientSecondName", "address", "address2", "city", "state", "zip", "foreignProvince", "countryCode", "validationErrors", "createdAt", "updatedAt", "stateAndLocalWithholding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099RListItemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "federal_efile_status", + "state_efile_status", + "postal_mail_status", + "tin_match_status", + "address_verification_status", + "validation_errors", + "created_at", + "updated_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of federal_efile_status + if self.federal_efile_status: + _dict['federalEfileStatus'] = self.federal_efile_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in state_efile_status (list) + _items = [] + if self.state_efile_status: + for _item in self.state_efile_status: + if _item: + _items.append(_item.to_dict()) + _dict['stateEfileStatus'] = _items + # override the default output from pydantic by calling `to_dict()` of postal_mail_status + if self.postal_mail_status: + _dict['postalMailStatus'] = self.postal_mail_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of tin_match_status + if self.tin_match_status: + _dict['tinMatchStatus'] = self.tin_match_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of address_verification_status + if self.address_verification_status: + _dict['addressVerificationStatus'] = self.address_verification_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_reference_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_reference_id is None and "issuer_reference_id" in self.model_fields_set: + _dict['issuerReferenceId'] = None + + # set to None if issuer_tin (nullable) is None + # and model_fields_set contains the field + if self.issuer_tin is None and "issuer_tin" in self.model_fields_set: + _dict['issuerTin'] = None + + # set to None if state_efile_status (nullable) is None + # and model_fields_set contains the field + if self.state_efile_status is None and "state_efile_status" in self.model_fields_set: + _dict['stateEfileStatus'] = None + + # set to None if postal_mail_status (nullable) is None + # and model_fields_set contains the field + if self.postal_mail_status is None and "postal_mail_status" in self.model_fields_set: + _dict['postalMailStatus'] = None + + # set to None if tin_match_status (nullable) is None + # and model_fields_set contains the field + if self.tin_match_status is None and "tin_match_status" in self.model_fields_set: + _dict['tinMatchStatus'] = None + + # set to None if address_verification_status (nullable) is None + # and model_fields_set contains the field + if self.address_verification_status is None and "address_verification_status" in self.model_fields_set: + _dict['addressVerificationStatus'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if tin_type (nullable) is None + # and model_fields_set contains the field + if self.tin_type is None and "tin_type" in self.model_fields_set: + _dict['tinType'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + # set to None if recipient_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_name is None and "recipient_name" in self.model_fields_set: + _dict['recipientName'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + # set to None if foreign_province (nullable) is None + # and model_fields_set contains the field + if self.foreign_province is None and "foreign_province" in self.model_fields_set: + _dict['foreignProvince'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if validation_errors (nullable) is None + # and model_fields_set contains the field + if self.validation_errors is None and "validation_errors" in self.model_fields_set: + _dict['validationErrors'] = None + + # set to None if state_and_local_withholding (nullable) is None + # and model_fields_set contains the field + if self.state_and_local_withholding is None and "state_and_local_withholding" in self.model_fields_set: + _dict['stateAndLocalWithholding'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099RListItemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "issuerId": obj.get("issuerId"), + "issuerReferenceId": obj.get("issuerReferenceId"), + "issuerTin": obj.get("issuerTin"), + "taxYear": obj.get("taxYear"), + "federalEfile": obj.get("federalEfile"), + "federalEfileStatus": Form1099StatusDetailResponse.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, + "stateEfile": obj.get("stateEfile"), + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "postalMail": obj.get("postalMail"), + "postalMailStatus": Form1099StatusDetailResponse.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, + "tinMatch": obj.get("tinMatch"), + "tinMatchStatus": Form1099StatusDetailResponse.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, + "addressVerification": obj.get("addressVerification"), + "addressVerificationStatus": Form1099StatusDetailResponse.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "tinType": obj.get("tinType"), + "tin": obj.get("tin"), + "recipientName": obj.get("recipientName"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "foreignProvince": obj.get("foreignProvince"), + "countryCode": obj.get("countryCode"), + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "stateAndLocalWithholding": StateAndLocalWithholdingResponse.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form1099_r_request.py b/Avalara/SDK/models/A1099/V2/form1099_r_request.py index a2b2cc6..0391280 100644 --- a/Avalara/SDK/models/A1099/V2/form1099_r_request.py +++ b/Avalara/SDK/models/A1099/V2/form1099_r_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -36,6 +36,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -44,50 +45,50 @@ class Form1099RRequest(BaseModel): """ Form1099RRequest """ # noqa: E501 - gross_distribution: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="grossDistribution") - taxable_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="taxableAmount") - taxable_amount_not_determined: Optional[StrictBool] = Field(default=None, alias="taxableAmountNotDetermined") - total_distribution_determined: Optional[StrictBool] = Field(default=None, alias="totalDistributionDetermined") - capital_gain: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="capitalGain") - federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="federalIncomeTaxWithheld") - employee_contributions_or_designated_roth_or_insurance_premiums: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="employeeContributionsOrDesignatedRothOrInsurancePremiums") - net_unrealized_appreciation_in_employer_securities: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="netUnrealizedAppreciationInEmployerSecurities") - distribution_code: Optional[StrictStr] = Field(default=None, alias="distributionCode") - second_distribution_code: Optional[StrictStr] = Field(default=None, alias="secondDistributionCode") - ira_sep_simple: Optional[StrictBool] = Field(default=None, alias="iraSepSimple") - traditional_ira_sep_simple_or_roth_conversion_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="traditionalIraSepSimpleOrRothConversionAmount") - other_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="otherAmount") - other_percentage: Optional[StrictStr] = Field(default=None, alias="otherPercentage") - total_distribution_percentage: Optional[StrictStr] = Field(default=None, alias="totalDistributionPercentage") - total_employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="totalEmployeeContributions") - amount_allocable_to_irr_within5_years: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="amountAllocableToIrrWithin5Years") - first_year_of_designated_roth_contribution: Optional[StrictStr] = Field(default=None, alias="firstYearOfDesignatedRothContribution") - fatca_filing_requirement: Optional[StrictBool] = Field(default=None, alias="fatcaFilingRequirement") - date_of_payment: Optional[datetime] = Field(default=None, alias="dateOfPayment") + gross_distribution: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Gross distribution", alias="grossDistribution") + taxable_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Taxable amount", alias="taxableAmount") + taxable_amount_not_determined: Optional[StrictBool] = Field(default=None, description="Taxable amount not determined", alias="taxableAmountNotDetermined") + total_distribution_determined: Optional[StrictBool] = Field(default=None, description="Total distribution", alias="totalDistributionDetermined") + capital_gain: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Capital gain (included in Box 2a)", alias="capitalGain") + federal_income_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Federal income tax withheld", alias="federalIncomeTaxWithheld") + employee_contributions_or_designated_roth_or_insurance_premiums: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Employee contributions/Designated Roth contributions or insurance premiums", alias="employeeContributionsOrDesignatedRothOrInsurancePremiums") + net_unrealized_appreciation_in_employer_securities: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Net unrealized appreciation in employer's securities", alias="netUnrealizedAppreciationInEmployerSecurities") + distribution_code: Optional[StrictStr] = Field(default=None, description="Distribution code", alias="distributionCode") + second_distribution_code: Optional[StrictStr] = Field(default=None, description="Second distribution code", alias="secondDistributionCode") + ira_sep_simple: Optional[StrictBool] = Field(default=None, description="IRA/SEP/SIMPLE", alias="iraSepSimple") + traditional_ira_sep_simple_or_roth_conversion_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Traditional IRA/SEP/SIMPLE or Roth conversion amount", alias="traditionalIraSepSimpleOrRothConversionAmount") + other_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Other amount", alias="otherAmount") + other_percentage: Optional[StrictStr] = Field(default=None, description="Other percentage", alias="otherPercentage") + total_distribution_percentage: Optional[StrictStr] = Field(default=None, description="Total distribution percentage", alias="totalDistributionPercentage") + total_employee_contributions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total employee contributions", alias="totalEmployeeContributions") + amount_allocable_to_irr_within5_years: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount allocable to IRR within 5 years", alias="amountAllocableToIrrWithin5Years") + first_year_of_designated_roth_contribution: Optional[StrictStr] = Field(default=None, description="First year of designated Roth contribution", alias="firstYearOfDesignatedRothContribution") + fatca_filing_requirement: Optional[StrictBool] = Field(default=None, description="FATCA filing requirement", alias="fatcaFilingRequirement") + date_of_payment: Optional[datetime] = Field(default=None, description="Date of payment", alias="dateOfPayment") type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["type", "issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -95,8 +96,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -139,10 +140,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -163,10 +162,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -208,8 +207,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form1099_status_detail_response.py b/Avalara/SDK/models/A1099/V2/form1099_status_detail_response.py new file mode 100644 index 0000000..387a98b --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form1099_status_detail_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Form1099StatusDetailResponse(BaseModel): + """ + Form1099StatusDetailResponse + """ # noqa: E501 + time: Optional[StrictStr] = Field(default=None, description="The date the form is scheduled for or the time the status last changed") + status: Optional[StrictStr] = Field(default=None, description="The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown") + __properties: ClassVar[List[str]] = [] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Form1099StatusDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Form1099StatusDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form_request_base.py b/Avalara/SDK/models/A1099/V2/form_request_base.py index 96c0c62..93f1450 100644 --- a/Avalara/SDK/models/A1099/V2/form_request_base.py +++ b/Avalara/SDK/models/A1099/V2/form_request_base.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -43,29 +44,29 @@ class FormRequestBase(BaseModel): """ FormRequestBase """ # noqa: E501 - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('tin_type') def tin_type_validate_enum(cls, value): @@ -129,10 +130,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -173,8 +174,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/form_request_list_item_base.py b/Avalara/SDK/models/A1099/V2/form_request_list_item_base.py new file mode 100644 index 0000000..05cbe54 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/form_request_list_item_base.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest +from typing import Optional, Set +from typing_extensions import Self + +class FormRequestListItemBase(BaseModel): + """ + FormRequestListItemBase + """ # noqa: E501 + issuer_reference_id: Optional[StrictStr] = Field(default=None, description="Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerReferenceId") + issuer_tin: Optional[StrictStr] = Field(default=None, description="Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required.", alias="issuerTin") + tax_year: StrictInt = Field(description="Tax year", alias="taxYear") + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + + @field_validator('tin_type') + def tin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['EIN', 'SSN', 'ITIN', 'ATIN']): + raise ValueError("must be one of enum values ('EIN', 'SSN', 'ITIN', 'ATIN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FormRequestListItemBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of state_and_local_withholding + if self.state_and_local_withholding: + _dict['stateAndLocalWithholding'] = self.state_and_local_withholding.to_dict() + # set to None if issuer_id (nullable) is None + # and model_fields_set contains the field + if self.issuer_id is None and "issuer_id" in self.model_fields_set: + _dict['issuerId'] = None + + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if recipient_second_name (nullable) is None + # and model_fields_set contains the field + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if recipient_email (nullable) is None + # and model_fields_set contains the field + if self.recipient_email is None and "recipient_email" in self.model_fields_set: + _dict['recipientEmail'] = None + + # set to None if account_number (nullable) is None + # and model_fields_set contains the field + if self.account_number is None and "account_number" in self.model_fields_set: + _dict['accountNumber'] = None + + # set to None if office_code (nullable) is None + # and model_fields_set contains the field + if self.office_code is None and "office_code" in self.model_fields_set: + _dict['officeCode'] = None + + # set to None if recipient_non_us_province (nullable) is None + # and model_fields_set contains the field + if self.recipient_non_us_province is None and "recipient_non_us_province" in self.model_fields_set: + _dict['recipientNonUsProvince'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FormRequestListItemBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "issuerId": obj.get("issuerId"), + "referenceId": obj.get("referenceId"), + "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), + "tinType": obj.get("tinType"), + "recipientSecondName": obj.get("recipientSecondName"), + "address": obj.get("address"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + "recipientEmail": obj.get("recipientEmail"), + "accountNumber": obj.get("accountNumber"), + "officeCode": obj.get("officeCode"), + "recipientNonUsProvince": obj.get("recipientNonUsProvince"), + "countryCode": obj.get("countryCode"), + "federalEFile": obj.get("federalEFile"), + "postalMail": obj.get("postalMail"), + "stateEFile": obj.get("stateEFile"), + "tinMatch": obj.get("tinMatch"), + "addressVerification": obj.get("addressVerification"), + "stateAndLocalWithholding": StateAndLocalWithholdingRequest.from_dict(obj["stateAndLocalWithholding"]) if obj.get("stateAndLocalWithholding") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/form_response_base.py b/Avalara/SDK/models/A1099/V2/form_response_base.py index 27bd02a..5afbd43 100644 --- a/Avalara/SDK/models/A1099/V2/form_response_base.py +++ b/Avalara/SDK/models/A1099/V2/form_response_base.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -37,9 +37,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from Avalara.SDK.models.A1099.V2.state_and_local_withholding_response import StateAndLocalWithholdingResponse -from Avalara.SDK.models.A1099.V2.state_efile_status_detail_app import StateEfileStatusDetailApp +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse from Avalara.SDK.models.A1099.V2.status_detail import StatusDetail -from Avalara.SDK.models.A1099.V2.validation_error_app import ValidationErrorApp +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -78,11 +78,11 @@ class FormResponseBase(BaseModel): tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") federal_efile_status: Optional[StatusDetail] = Field(default=None, alias="federalEfileStatus") - state_efile_status: Optional[List[StateEfileStatusDetailApp]] = Field(default=None, alias="stateEfileStatus") + state_efile_status: Optional[List[StateEfileStatusDetailResponse]] = Field(default=None, alias="stateEfileStatus") postal_mail_status: Optional[StatusDetail] = Field(default=None, alias="postalMailStatus") tin_match_status: Optional[StatusDetail] = Field(default=None, alias="tinMatchStatus") address_verification_status: Optional[StatusDetail] = Field(default=None, alias="addressVerificationStatus") - validation_errors: Optional[List[ValidationErrorApp]] = Field(default=None, alias="validationErrors") + validation_errors: Optional[List[ValidationErrorResponse]] = Field(default=None, alias="validationErrors") __properties: ClassVar[List[str]] = ["type", "createdAt", "updatedAt", "userId", "stateAndLocalWithholding", "tinType", "id", "issuerId", "issuerReferenceId", "issuerTin", "taxYear", "referenceId", "recipientName", "recipientTin", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "federalEfileStatus", "stateEfileStatus", "postalMailStatus", "tinMatchStatus", "addressVerificationStatus", "validationErrors"] @field_validator('type') @@ -91,8 +91,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -248,11 +248,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tinMatch": obj.get("tinMatch"), "addressVerification": obj.get("addressVerification"), "federalEfileStatus": StatusDetail.from_dict(obj["federalEfileStatus"]) if obj.get("federalEfileStatus") is not None else None, - "stateEfileStatus": [StateEfileStatusDetailApp.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, + "stateEfileStatus": [StateEfileStatusDetailResponse.from_dict(_item) for _item in obj["stateEfileStatus"]] if obj.get("stateEfileStatus") is not None else None, "postalMailStatus": StatusDetail.from_dict(obj["postalMailStatus"]) if obj.get("postalMailStatus") is not None else None, "tinMatchStatus": StatusDetail.from_dict(obj["tinMatchStatus"]) if obj.get("tinMatchStatus") is not None else None, "addressVerificationStatus": StatusDetail.from_dict(obj["addressVerificationStatus"]) if obj.get("addressVerificationStatus") is not None else None, - "validationErrors": [ValidationErrorApp.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + "validationErrors": [ValidationErrorResponse.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None }) return _obj diff --git a/Avalara/SDK/models/A1099/V2/form_single_request_base.py b/Avalara/SDK/models/A1099/V2/form_single_request_base.py index b80b2bc..d4b8786 100644 --- a/Avalara/SDK/models/A1099/V2/form_single_request_base.py +++ b/Avalara/SDK/models/A1099/V2/form_single_request_base.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -35,6 +35,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from Avalara.SDK.models.A1099.V2.state_and_local_withholding_request import StateAndLocalWithholdingRequest from typing import Optional, Set from typing_extensions import Self @@ -44,29 +45,29 @@ class FormSingleRequestBase(BaseModel): FormSingleRequestBase """ # noqa: E501 type: Optional[StrictStr] = None - issuer_id: Optional[StrictStr] = Field(default=None, alias="issuerId") - reference_id: Optional[StrictStr] = Field(default=None, alias="referenceId") - recipient_name: Optional[StrictStr] = Field(default=None, alias="recipientName") - recipient_tin: Optional[StrictStr] = Field(default=None, alias="recipientTin") - tin_type: Optional[StrictStr] = Field(default=None, alias="tinType") - recipient_second_name: Optional[StrictStr] = Field(default=None, alias="recipientSecondName") - address: Optional[StrictStr] = None - address2: Optional[StrictStr] = None - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zip: Optional[StrictStr] = None - recipient_email: Optional[StrictStr] = Field(default=None, alias="recipientEmail") - account_number: Optional[StrictStr] = Field(default=None, alias="accountNumber") - office_code: Optional[StrictStr] = Field(default=None, alias="officeCode") - recipient_non_us_province: Optional[StrictStr] = Field(default=None, alias="recipientNonUsProvince") - country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") - federal_e_file: Optional[StrictBool] = Field(default=None, alias="federalEFile") - postal_mail: Optional[StrictBool] = Field(default=None, alias="postalMail") - state_e_file: Optional[StrictBool] = Field(default=None, alias="stateEFile") - tin_match: Optional[StrictBool] = Field(default=None, alias="tinMatch") - address_verification: Optional[StrictBool] = Field(default=None, alias="addressVerification") - state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, alias="stateAndLocalWithholding") - __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientName", "recipientTin", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] + issuer_id: Optional[StrictStr] = Field(default=None, description="Issuer ID", alias="issuerId") + reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID", alias="referenceId") + recipient_tin: Optional[StrictStr] = Field(default=None, description="Recipient Tax ID Number", alias="recipientTin") + recipient_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Recipient name", alias="recipientName") + tin_type: Optional[StrictStr] = Field(default=None, description="Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN", alias="tinType") + recipient_second_name: Optional[StrictStr] = Field(default=None, description="Recipient second name", alias="recipientSecondName") + address: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2") + city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City") + state: Optional[StrictStr] = Field(default=None, description="US state. Required if CountryCode is \"US\".") + zip: Optional[StrictStr] = Field(default=None, description="Zip/postal code") + recipient_email: Optional[StrictStr] = Field(default=None, description="Recipient email address", alias="recipientEmail") + account_number: Optional[StrictStr] = Field(default=None, description="Account number", alias="accountNumber") + office_code: Optional[StrictStr] = Field(default=None, description="Office code", alias="officeCode") + recipient_non_us_province: Optional[StrictStr] = Field(default=None, description="Foreign province", alias="recipientNonUsProvince") + country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country code, as defined at https://www.irs.gov/e-file-providers/country-codes", alias="countryCode") + federal_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that federal e-filing should be scheduled for this form", alias="federalEFile") + postal_mail: Optional[StrictBool] = Field(default=None, description="Boolean indicating that postal mailing to the recipient should be scheduled for this form", alias="postalMail") + state_e_file: Optional[StrictBool] = Field(default=None, description="Boolean indicating that state e-filing should be scheduled for this form", alias="stateEFile") + tin_match: Optional[StrictBool] = Field(default=None, description="Boolean indicating that TIN Matching should be scheduled for this form", alias="tinMatch") + address_verification: Optional[StrictBool] = Field(default=None, description="Boolean indicating that address verification should be scheduled for this form", alias="addressVerification") + state_and_local_withholding: Optional[StateAndLocalWithholdingRequest] = Field(default=None, description="State and local withholding information", alias="stateAndLocalWithholding") + __properties: ClassVar[List[str]] = ["issuerId", "referenceId", "recipientTin", "recipientName", "tinType", "recipientSecondName", "address", "address2", "city", "state", "zip", "recipientEmail", "accountNumber", "officeCode", "recipientNonUsProvince", "countryCode", "federalEFile", "postalMail", "stateEFile", "tinMatch", "addressVerification", "stateAndLocalWithholding"] @field_validator('type') def type_validate_enum(cls, value): @@ -74,8 +75,8 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in set(['Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B']): - raise ValueError("must be one of enum values ('Form1099Nec', 'Form1099Misc', 'Form1099Div', 'Form1099R', 'Form1099K', 'Form1095B')") + if value not in set(['1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S']): + raise ValueError("must be one of enum values ('1099-NEC', '1099-MISC', '1099-DIV', '1099-R', '1099-K', '1095-B', '1042-S')") return value @field_validator('tin_type') @@ -118,10 +119,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "type", ]) _dict = self.model_dump( @@ -142,10 +141,10 @@ def to_dict(self) -> Dict[str, Any]: if self.reference_id is None and "reference_id" in self.model_fields_set: _dict['referenceId'] = None - # set to None if recipient_name (nullable) is None + # set to None if recipient_second_name (nullable) is None # and model_fields_set contains the field - if self.recipient_name is None and "recipient_name" in self.model_fields_set: - _dict['recipientName'] = None + if self.recipient_second_name is None and "recipient_second_name" in self.model_fields_set: + _dict['recipientSecondName'] = None # set to None if address2 (nullable) is None # and model_fields_set contains the field @@ -186,8 +185,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "issuerId": obj.get("issuerId"), "referenceId": obj.get("referenceId"), - "recipientName": obj.get("recipientName"), "recipientTin": obj.get("recipientTin"), + "recipientName": obj.get("recipientName"), "tinType": obj.get("tinType"), "recipientSecondName": obj.get("recipientSecondName"), "address": obj.get("address"), diff --git a/Avalara/SDK/models/A1099/V2/get1099_form200_response.py b/Avalara/SDK/models/A1099/V2/get1099_form200_response.py index aad752e..00b57cf 100644 --- a/Avalara/SDK/models/A1099/V2/get1099_form200_response.py +++ b/Avalara/SDK/models/A1099/V2/get1099_form200_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,33 +33,39 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from Avalara.SDK.models.A1099.V2.form1095_b import Form1095B -from Avalara.SDK.models.A1099.V2.form1099_k import Form1099K -from Avalara.SDK.models.A1099.V2.form1099_misc import Form1099Misc -from Avalara.SDK.models.A1099.V2.form1099_nec import Form1099Nec -from Avalara.SDK.models.A1099.V2.form1099_r import Form1099R +from Avalara.SDK.models.A1099.V2.form1042_s_list_item_response import Form1042SListItemResponse +from Avalara.SDK.models.A1099.V2.form1095_b_list_item_response import Form1095BListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_base_response import Form1099BaseResponse +from Avalara.SDK.models.A1099.V2.form1099_k_list_item_response import Form1099KListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_misc_list_item_response import Form1099MiscListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_nec_list_item_response import Form1099NecListItemResponse +from Avalara.SDK.models.A1099.V2.form1099_r_list_item_response import Form1099RListItemResponse from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -GET1099FORM200RESPONSE_ONE_OF_SCHEMAS = ["Form1095B", "Form1099K", "Form1099Misc", "Form1099Nec", "Form1099R"] +GET1099FORM200RESPONSE_ONE_OF_SCHEMAS = ["Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse"] class Get1099Form200Response(BaseModel): """ Get1099Form200Response """ - # data type: Form1095B - oneof_schema_1_validator: Optional[Form1095B] = None - # data type: Form1099K - oneof_schema_2_validator: Optional[Form1099K] = None - # data type: Form1099Misc - oneof_schema_3_validator: Optional[Form1099Misc] = None - # data type: Form1099Nec - oneof_schema_4_validator: Optional[Form1099Nec] = None - # data type: Form1099R - oneof_schema_5_validator: Optional[Form1099R] = None - actual_instance: Optional[Union[Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R]] = None - one_of_schemas: Set[str] = { "Form1095B", "Form1099K", "Form1099Misc", "Form1099Nec", "Form1099R" } + # data type: Form1099BaseResponse + oneof_schema_1_validator: Optional[Form1099BaseResponse] = None + # data type: Form1042SListItemResponse + oneof_schema_2_validator: Optional[Form1042SListItemResponse] = None + # data type: Form1095BListItemResponse + oneof_schema_3_validator: Optional[Form1095BListItemResponse] = None + # data type: Form1099KListItemResponse + oneof_schema_4_validator: Optional[Form1099KListItemResponse] = None + # data type: Form1099MiscListItemResponse + oneof_schema_5_validator: Optional[Form1099MiscListItemResponse] = None + # data type: Form1099NecListItemResponse + oneof_schema_6_validator: Optional[Form1099NecListItemResponse] = None + # data type: Form1099RListItemResponse + oneof_schema_7_validator: Optional[Form1099RListItemResponse] = None + actual_instance: Optional[Union[Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]] = None + one_of_schemas: Set[str] = { "Form1042SListItemResponse", "Form1095BListItemResponse", "Form1099BaseResponse", "Form1099KListItemResponse", "Form1099MiscListItemResponse", "Form1099NecListItemResponse", "Form1099RListItemResponse" } model_config = ConfigDict( validate_assignment=True, @@ -82,37 +88,47 @@ def actual_instance_must_validate_oneof(cls, v): instance = Get1099Form200Response.model_construct() error_messages = [] match = 0 - # validate data type: Form1095B - if not isinstance(v, Form1095B): - error_messages.append(f"Error! Input type `{type(v)}` is not `Form1095B`") + # validate data type: Form1099BaseResponse + if not isinstance(v, Form1099BaseResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099BaseResponse`") else: match += 1 - # validate data type: Form1099K - if not isinstance(v, Form1099K): - error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099K`") + # validate data type: Form1042SListItemResponse + if not isinstance(v, Form1042SListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1042SListItemResponse`") else: match += 1 - # validate data type: Form1099Misc - if not isinstance(v, Form1099Misc): - error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099Misc`") + # validate data type: Form1095BListItemResponse + if not isinstance(v, Form1095BListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1095BListItemResponse`") else: match += 1 - # validate data type: Form1099Nec - if not isinstance(v, Form1099Nec): - error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099Nec`") + # validate data type: Form1099KListItemResponse + if not isinstance(v, Form1099KListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099KListItemResponse`") else: match += 1 - # validate data type: Form1099R - if not isinstance(v, Form1099R): - error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099R`") + # validate data type: Form1099MiscListItemResponse + if not isinstance(v, Form1099MiscListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099MiscListItemResponse`") + else: + match += 1 + # validate data type: Form1099NecListItemResponse + if not isinstance(v, Form1099NecListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099NecListItemResponse`") + else: + match += 1 + # validate data type: Form1099RListItemResponse + if not isinstance(v, Form1099RListItemResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099RListItemResponse`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in Get1099Form200Response with oneOf schemas: Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in Get1099Form200Response with oneOf schemas: Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) else: return v @@ -127,43 +143,55 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into Form1095B + # deserialize data into Form1099BaseResponse + try: + instance.actual_instance = Form1099BaseResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1042SListItemResponse + try: + instance.actual_instance = Form1042SListItemResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into Form1095BListItemResponse try: - instance.actual_instance = Form1095B.from_json(json_str) + instance.actual_instance = Form1095BListItemResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Form1099K + # deserialize data into Form1099KListItemResponse try: - instance.actual_instance = Form1099K.from_json(json_str) + instance.actual_instance = Form1099KListItemResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Form1099Misc + # deserialize data into Form1099MiscListItemResponse try: - instance.actual_instance = Form1099Misc.from_json(json_str) + instance.actual_instance = Form1099MiscListItemResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Form1099Nec + # deserialize data into Form1099NecListItemResponse try: - instance.actual_instance = Form1099Nec.from_json(json_str) + instance.actual_instance = Form1099NecListItemResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Form1099R + # deserialize data into Form1099RListItemResponse try: - instance.actual_instance = Form1099R.from_json(json_str) + instance.actual_instance = Form1099RListItemResponse.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into Get1099Form200Response with oneOf schemas: Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into Get1099Form200Response with oneOf schemas: Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. Details: " + ", ".join(error_messages)) else: return instance @@ -177,7 +205,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/Avalara/SDK/models/A1099/V2/http_validation_problem_details.py b/Avalara/SDK/models/A1099/V2/http_validation_problem_details.py index 856e68c..8a48204 100644 --- a/Avalara/SDK/models/A1099/V2/http_validation_problem_details.py +++ b/Avalara/SDK/models/A1099/V2/http_validation_problem_details.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/i_create_form1099_request.py b/Avalara/SDK/models/A1099/V2/i_create_form1099_request.py index db7c870..29ce9c8 100644 --- a/Avalara/SDK/models/A1099/V2/i_create_form1099_request.py +++ b/Avalara/SDK/models/A1099/V2/i_create_form1099_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/i_update_form1099_request.py b/Avalara/SDK/models/A1099/V2/i_update_form1099_request.py index d8e7a42..9d13173 100644 --- a/Avalara/SDK/models/A1099/V2/i_update_form1099_request.py +++ b/Avalara/SDK/models/A1099/V2/i_update_form1099_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py new file mode 100644 index 0000000..db93fc5 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IntermediaryOrFlowThrough(BaseModel): + """ + IntermediaryOrFlowThrough + """ # noqa: E501 + ein: Optional[StrictStr] = None + chap3_status_code: Optional[StrictStr] = Field(default=None, alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, alias="chap4StatusCode") + name: Optional[StrictStr] = None + giin: Optional[StrictStr] = None + country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") + foreign_tin: Optional[StrictStr] = Field(default=None, alias="foreignTin") + address: Optional[StrictStr] = None + city: Optional[StrictStr] = None + state: Optional[StrictStr] = None + zip: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["ein", "chap3StatusCode", "chap4StatusCode", "name", "giin", "countryCode", "foreignTin", "address", "city", "state", "zip"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThrough from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if ein (nullable) is None + # and model_fields_set contains the field + if self.ein is None and "ein" in self.model_fields_set: + _dict['ein'] = None + + # set to None if chap3_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap3_status_code is None and "chap3_status_code" in self.model_fields_set: + _dict['chap3StatusCode'] = None + + # set to None if chap4_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap4_status_code is None and "chap4_status_code" in self.model_fields_set: + _dict['chap4StatusCode'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if giin (nullable) is None + # and model_fields_set contains the field + if self.giin is None and "giin" in self.model_fields_set: + _dict['giin'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if foreign_tin (nullable) is None + # and model_fields_set contains the field + if self.foreign_tin is None and "foreign_tin" in self.model_fields_set: + _dict['foreignTin'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThrough from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ein": obj.get("ein"), + "chap3StatusCode": obj.get("chap3StatusCode"), + "chap4StatusCode": obj.get("chap4StatusCode"), + "name": obj.get("name"), + "giin": obj.get("giin"), + "countryCode": obj.get("countryCode"), + "foreignTin": obj.get("foreignTin"), + "address": obj.get("address"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_request.py b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_request.py new file mode 100644 index 0000000..e191598 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_request.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IntermediaryOrFlowThroughRequest(BaseModel): + """ + IntermediaryOrFlowThroughRequest + """ # noqa: E501 + ein: Optional[StrictStr] = None + chap3_status_code: Optional[StrictStr] = Field(default=None, alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, alias="chap4StatusCode") + name: Optional[StrictStr] = None + giin: Optional[StrictStr] = None + country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") + foreign_tin: Optional[StrictStr] = Field(default=None, alias="foreignTin") + address: Optional[StrictStr] = None + city: Optional[StrictStr] = None + state: Optional[StrictStr] = None + zip: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["ein", "chap3StatusCode", "chap4StatusCode", "name", "giin", "countryCode", "foreignTin", "address", "city", "state", "zip"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThroughRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if ein (nullable) is None + # and model_fields_set contains the field + if self.ein is None and "ein" in self.model_fields_set: + _dict['ein'] = None + + # set to None if chap3_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap3_status_code is None and "chap3_status_code" in self.model_fields_set: + _dict['chap3StatusCode'] = None + + # set to None if chap4_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap4_status_code is None and "chap4_status_code" in self.model_fields_set: + _dict['chap4StatusCode'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if giin (nullable) is None + # and model_fields_set contains the field + if self.giin is None and "giin" in self.model_fields_set: + _dict['giin'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if foreign_tin (nullable) is None + # and model_fields_set contains the field + if self.foreign_tin is None and "foreign_tin" in self.model_fields_set: + _dict['foreignTin'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThroughRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ein": obj.get("ein"), + "chap3StatusCode": obj.get("chap3StatusCode"), + "chap4StatusCode": obj.get("chap4StatusCode"), + "name": obj.get("name"), + "giin": obj.get("giin"), + "countryCode": obj.get("countryCode"), + "foreignTin": obj.get("foreignTin"), + "address": obj.get("address"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_response.py b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_response.py new file mode 100644 index 0000000..88264c1 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/intermediary_or_flow_through_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IntermediaryOrFlowThroughResponse(BaseModel): + """ + IntermediaryOrFlowThroughResponse + """ # noqa: E501 + ein: Optional[StrictStr] = None + chap3_status_code: Optional[StrictStr] = Field(default=None, alias="chap3StatusCode") + chap4_status_code: Optional[StrictStr] = Field(default=None, alias="chap4StatusCode") + name: Optional[StrictStr] = None + giin: Optional[StrictStr] = None + country_code: Optional[StrictStr] = Field(default=None, alias="countryCode") + foreign_tin: Optional[StrictStr] = Field(default=None, alias="foreignTin") + address: Optional[StrictStr] = None + city: Optional[StrictStr] = None + state: Optional[StrictStr] = None + zip: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["ein", "chap3StatusCode", "chap4StatusCode", "name", "giin", "countryCode", "foreignTin", "address", "city", "state", "zip"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThroughResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if ein (nullable) is None + # and model_fields_set contains the field + if self.ein is None and "ein" in self.model_fields_set: + _dict['ein'] = None + + # set to None if chap3_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap3_status_code is None and "chap3_status_code" in self.model_fields_set: + _dict['chap3StatusCode'] = None + + # set to None if chap4_status_code (nullable) is None + # and model_fields_set contains the field + if self.chap4_status_code is None and "chap4_status_code" in self.model_fields_set: + _dict['chap4StatusCode'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if giin (nullable) is None + # and model_fields_set contains the field + if self.giin is None and "giin" in self.model_fields_set: + _dict['giin'] = None + + # set to None if country_code (nullable) is None + # and model_fields_set contains the field + if self.country_code is None and "country_code" in self.model_fields_set: + _dict['countryCode'] = None + + # set to None if foreign_tin (nullable) is None + # and model_fields_set contains the field + if self.foreign_tin is None and "foreign_tin" in self.model_fields_set: + _dict['foreignTin'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict['zip'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IntermediaryOrFlowThroughResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ein": obj.get("ein"), + "chap3StatusCode": obj.get("chap3StatusCode"), + "chap4StatusCode": obj.get("chap4StatusCode"), + "name": obj.get("name"), + "giin": obj.get("giin"), + "countryCode": obj.get("countryCode"), + "foreignTin": obj.get("foreignTin"), + "address": obj.get("address"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/issuer_command.py b/Avalara/SDK/models/A1099/V2/issuer_command.py index 5906c8a..74f53bc 100644 --- a/Avalara/SDK/models/A1099/V2/issuer_command.py +++ b/Avalara/SDK/models/A1099/V2/issuer_command.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/issuer_response.py b/Avalara/SDK/models/A1099/V2/issuer_response.py index 132c690..1593a40 100644 --- a/Avalara/SDK/models/A1099/V2/issuer_response.py +++ b/Avalara/SDK/models/A1099/V2/issuer_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py b/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py index acf9132..a5cc37f 100644 --- a/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py +++ b/Avalara/SDK/models/A1099/V2/iw9_form_data_models_one_of.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/job_result.py b/Avalara/SDK/models/A1099/V2/job_result.py index 30d661f..f49b16b 100644 --- a/Avalara/SDK/models/A1099/V2/job_result.py +++ b/Avalara/SDK/models/A1099/V2/job_result.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -44,22 +44,22 @@ class JobResult(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = None type: Optional[StrictStr] = None - dry_run: Optional[StrictBool] = Field(default=None, alias="dryRun") - upsert: Optional[StrictBool] = None - status: Optional[StrictStr] = None + dry_run: Optional[StrictBool] = Field(default=None, description="Dry run. If `true`, this job only simulates the changes but doesn't actually persist them.", alias="dryRun") + upsert: Optional[StrictBool] = Field(default=None, description="Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year") + status: Optional[StrictStr] = Field(default=None, description="Status of the job") error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage") - total_processed: Optional[StrictInt] = Field(default=None, alias="totalProcessed") - total_rows: Optional[StrictInt] = Field(default=None, alias="totalRows") - updated_valid: Optional[StrictInt] = Field(default=None, alias="updatedValid") - updated_no_email: Optional[StrictInt] = Field(default=None, alias="updatedNoEmail") - updated_invalid: Optional[StrictInt] = Field(default=None, alias="updatedInvalid") - skipped_duplicate: Optional[StrictInt] = Field(default=None, alias="skippedDuplicate") - skipped_invalid: Optional[StrictInt] = Field(default=None, alias="skippedInvalid") - skipped_multiple_matches: Optional[StrictInt] = Field(default=None, alias="skippedMultipleMatches") - not_found: Optional[StrictInt] = Field(default=None, alias="notFound") - created_invalid: Optional[StrictInt] = Field(default=None, alias="createdInvalid") - created_no_email: Optional[StrictInt] = Field(default=None, alias="createdNoEmail") - created_valid: Optional[StrictInt] = Field(default=None, alias="createdValid") + total_processed: Optional[StrictInt] = Field(default=None, description="Total number of forms processed", alias="totalProcessed") + total_rows: Optional[StrictInt] = Field(default=None, description="Total number of forms in the request", alias="totalRows") + updated_valid: Optional[StrictInt] = Field(default=None, description="Number of forms updated and valid for e-filing and e-delivery", alias="updatedValid") + updated_no_email: Optional[StrictInt] = Field(default=None, description="Number of forms updated and valid for e-filing but missing email or email is undeliverable", alias="updatedNoEmail") + updated_invalid: Optional[StrictInt] = Field(default=None, description="Number of forms updated but invalid for e-filing", alias="updatedInvalid") + skipped_duplicate: Optional[StrictInt] = Field(default=None, description="Number of forms skipped because they would have updated a record already updated once in the request", alias="skippedDuplicate") + skipped_invalid: Optional[StrictInt] = Field(default=None, description="Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing", alias="skippedInvalid") + skipped_multiple_matches: Optional[StrictInt] = Field(default=None, description="Number of forms skipped because they matched multiple forms", alias="skippedMultipleMatches") + not_found: Optional[StrictInt] = Field(default=None, description="Number of forms skipped because no matching form or issuer could be found", alias="notFound") + created_invalid: Optional[StrictInt] = Field(default=None, description="Number of new forms created because no matching form could be found (and `upsert` was true) - with errors", alias="createdInvalid") + created_no_email: Optional[StrictInt] = Field(default=None, description="Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable", alias="createdNoEmail") + created_valid: Optional[StrictInt] = Field(default=None, description="Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery", alias="createdValid") __properties: ClassVar[List[str]] = ["id", "type", "dryRun", "upsert", "status", "errorMessage", "totalProcessed", "totalRows", "updatedValid", "updatedNoEmail", "updatedInvalid", "skippedDuplicate", "skippedInvalid", "skippedMultipleMatches", "notFound", "createdInvalid", "createdNoEmail", "createdValid"] model_config = ConfigDict( diff --git a/Avalara/SDK/models/A1099/V2/link.py b/Avalara/SDK/models/A1099/V2/link.py index 59e5c46..9b5f319 100644 --- a/Avalara/SDK/models/A1099/V2/link.py +++ b/Avalara/SDK/models/A1099/V2/link.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model.py index 121e342..3cd4679 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py index 15c9517..de4dd23 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_company_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py index f2ed1d3..2c4b69e 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py +++ b/Avalara/SDK/models/A1099/V2/paginated_query_result_model_issuer_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/paginated_w9_forms_model.py b/Avalara/SDK/models/A1099/V2/paginated_w9_forms_model.py index 17b0af8..ae782c8 100644 --- a/Avalara/SDK/models/A1099/V2/paginated_w9_forms_model.py +++ b/Avalara/SDK/models/A1099/V2/paginated_w9_forms_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py b/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py new file mode 100644 index 0000000..b2a98a7 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/primary_withholding_agent.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PrimaryWithholdingAgent(BaseModel): + """ + PrimaryWithholdingAgent + """ # noqa: E501 + primary_withholding_agent_name: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentName") + primary_withholding_agent_ein: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentEin") + __properties: ClassVar[List[str]] = ["primaryWithholdingAgentName", "primaryWithholdingAgentEin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if primary_withholding_agent_name (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_name is None and "primary_withholding_agent_name" in self.model_fields_set: + _dict['primaryWithholdingAgentName'] = None + + # set to None if primary_withholding_agent_ein (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_ein is None and "primary_withholding_agent_ein" in self.model_fields_set: + _dict['primaryWithholdingAgentEin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryWithholdingAgentName": obj.get("primaryWithholdingAgentName"), + "primaryWithholdingAgentEin": obj.get("primaryWithholdingAgentEin") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/primary_withholding_agent_request.py b/Avalara/SDK/models/A1099/V2/primary_withholding_agent_request.py new file mode 100644 index 0000000..a4ffefc --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/primary_withholding_agent_request.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PrimaryWithholdingAgentRequest(BaseModel): + """ + PrimaryWithholdingAgentRequest + """ # noqa: E501 + primary_withholding_agent_name: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentName") + primary_withholding_agent_ein: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentEin") + __properties: ClassVar[List[str]] = ["primaryWithholdingAgentName", "primaryWithholdingAgentEin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgentRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if primary_withholding_agent_name (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_name is None and "primary_withholding_agent_name" in self.model_fields_set: + _dict['primaryWithholdingAgentName'] = None + + # set to None if primary_withholding_agent_ein (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_ein is None and "primary_withholding_agent_ein" in self.model_fields_set: + _dict['primaryWithholdingAgentEin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgentRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryWithholdingAgentName": obj.get("primaryWithholdingAgentName"), + "primaryWithholdingAgentEin": obj.get("primaryWithholdingAgentEin") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/primary_withholding_agent_response.py b/Avalara/SDK/models/A1099/V2/primary_withholding_agent_response.py new file mode 100644 index 0000000..a713eb3 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/primary_withholding_agent_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PrimaryWithholdingAgentResponse(BaseModel): + """ + PrimaryWithholdingAgentResponse + """ # noqa: E501 + primary_withholding_agent_name: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentName") + primary_withholding_agent_ein: Optional[StrictStr] = Field(default=None, alias="primaryWithholdingAgentEin") + __properties: ClassVar[List[str]] = ["primaryWithholdingAgentName", "primaryWithholdingAgentEin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if primary_withholding_agent_name (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_name is None and "primary_withholding_agent_name" in self.model_fields_set: + _dict['primaryWithholdingAgentName'] = None + + # set to None if primary_withholding_agent_ein (nullable) is None + # and model_fields_set contains the field + if self.primary_withholding_agent_ein is None and "primary_withholding_agent_ein" in self.model_fields_set: + _dict['primaryWithholdingAgentEin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrimaryWithholdingAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "primaryWithholdingAgentName": obj.get("primaryWithholdingAgentName"), + "primaryWithholdingAgentEin": obj.get("primaryWithholdingAgentEin") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/problem_details.py b/Avalara/SDK/models/A1099/V2/problem_details.py index 73c1422..f6cd0a8 100644 --- a/Avalara/SDK/models/A1099/V2/problem_details.py +++ b/Avalara/SDK/models/A1099/V2/problem_details.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/state_and_local_withholding_request.py b/Avalara/SDK/models/A1099/V2/state_and_local_withholding_request.py index e7ca87c..b95430c 100644 --- a/Avalara/SDK/models/A1099/V2/state_and_local_withholding_request.py +++ b/Avalara/SDK/models/A1099/V2/state_and_local_withholding_request.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -91,11 +91,31 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if state_income (nullable) is None + # and model_fields_set contains the field + if self.state_income is None and "state_income" in self.model_fields_set: + _dict['stateIncome'] = None + + # set to None if local_tax_withheld (nullable) is None + # and model_fields_set contains the field + if self.local_tax_withheld is None and "local_tax_withheld" in self.model_fields_set: + _dict['localTaxWithheld'] = None + + # set to None if locality (nullable) is None + # and model_fields_set contains the field + if self.locality is None and "locality" in self.model_fields_set: + _dict['locality'] = None + # set to None if locality_id_number (nullable) is None # and model_fields_set contains the field if self.locality_id_number is None and "locality_id_number" in self.model_fields_set: _dict['localityIdNumber'] = None + # set to None if local_income (nullable) is None + # and model_fields_set contains the field + if self.local_income is None and "local_income" in self.model_fields_set: + _dict['localIncome'] = None + return _dict @classmethod diff --git a/Avalara/SDK/models/A1099/V2/state_and_local_withholding_response.py b/Avalara/SDK/models/A1099/V2/state_and_local_withholding_response.py index 460add3..ba5f814 100644 --- a/Avalara/SDK/models/A1099/V2/state_and_local_withholding_response.py +++ b/Avalara/SDK/models/A1099/V2/state_and_local_withholding_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -42,14 +42,14 @@ class StateAndLocalWithholdingResponse(BaseModel): """ StateAndLocalWithholdingResponse """ # noqa: E501 - state_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="stateTaxWithheld") - state: Optional[StrictStr] = None - state_id_number: Optional[StrictStr] = Field(default=None, alias="stateIdNumber") - state_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="stateIncome") - local_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="localTaxWithheld") - locality: Optional[StrictStr] = None - locality_id_number: Optional[StrictStr] = Field(default=None, alias="localityIdNumber") - local_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="localIncome") + state_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of state tax that was withheld", alias="stateTaxWithheld") + state: Optional[StrictStr] = Field(default=None, description="US state") + state_id_number: Optional[StrictStr] = Field(default=None, description="State ID number of the entity issuing the form", alias="stateIdNumber") + state_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of state income", alias="stateIncome") + local_tax_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of local tax that was withheld", alias="localTaxWithheld") + locality: Optional[StrictStr] = Field(default=None, description="Locality name") + locality_id_number: Optional[StrictStr] = Field(default=None, description="Locality ID number of the entity issuing the form", alias="localityIdNumber") + local_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount of local income", alias="localIncome") __properties: ClassVar[List[str]] = ["stateTaxWithheld", "state", "stateIdNumber", "stateIncome", "localTaxWithheld", "locality", "localityIdNumber", "localIncome"] model_config = ConfigDict( diff --git a/Avalara/SDK/models/A1099/V2/state_efile_status_detail_response.py b/Avalara/SDK/models/A1099/V2/state_efile_status_detail_response.py new file mode 100644 index 0000000..264dfe2 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/state_efile_status_detail_response.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StateEfileStatusDetailResponse(BaseModel): + """ + StateEfileStatusDetailResponse + """ # noqa: E501 + status: Optional[StrictStr] = None + time: Optional[StrictStr] = None + jurisdiction: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "time", "jurisdiction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StateEfileStatusDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if time (nullable) is None + # and model_fields_set contains the field + if self.time is None and "time" in self.model_fields_set: + _dict['time'] = None + + # set to None if jurisdiction (nullable) is None + # and model_fields_set contains the field + if self.jurisdiction is None and "jurisdiction" in self.model_fields_set: + _dict['jurisdiction'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StateEfileStatusDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "time": obj.get("time"), + "jurisdiction": obj.get("jurisdiction") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/status_detail.py b/Avalara/SDK/models/A1099/V2/status_detail.py index 8df48fb..af93c13 100644 --- a/Avalara/SDK/models/A1099/V2/status_detail.py +++ b/Avalara/SDK/models/A1099/V2/status_detail.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py b/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py new file mode 100644 index 0000000..243feb8 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/substantial_us_owner_request.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SubstantialUsOwnerRequest(BaseModel): + """ + SubstantialUsOwnerRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the substantial U.S. owner of the NFFE.") + address: Optional[StrictStr] = Field(default=None, description="The address of the substantial U.S. owner of the NFFE.") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN) of the substantial U.S. owner of the NFFE.") + __properties: ClassVar[List[str]] = ["name", "address", "tin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubstantialUsOwnerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if tin (nullable) is None + # and model_fields_set contains the field + if self.tin is None and "tin" in self.model_fields_set: + _dict['tin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubstantialUsOwnerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "address": obj.get("address"), + "tin": obj.get("tin") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py b/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py index 31014c9..1421c25 100644 --- a/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py +++ b/Avalara/SDK/models/A1099/V2/substantial_us_owner_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/update1099_form200_response.py b/Avalara/SDK/models/A1099/V2/update1099_form200_response.py index be71ea0..38d3bd4 100644 --- a/Avalara/SDK/models/A1099/V2/update1099_form200_response.py +++ b/Avalara/SDK/models/A1099/V2/update1099_form200_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,6 +33,7 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional +from Avalara.SDK.models.A1099.V2.form1042_s_response import Form1042SResponse from Avalara.SDK.models.A1099.V2.form1099_div_response import Form1099DivResponse from Avalara.SDK.models.A1099.V2.form1099_misc_response import Form1099MiscResponse from Avalara.SDK.models.A1099.V2.form1099_nec_response import Form1099NecResponse @@ -41,7 +42,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -UPDATE1099FORM200RESPONSE_ONE_OF_SCHEMAS = ["Form1099DivResponse", "Form1099MiscResponse", "Form1099NecResponse", "FormResponseBase"] +UPDATE1099FORM200RESPONSE_ONE_OF_SCHEMAS = ["Form1042SResponse", "Form1099DivResponse", "Form1099MiscResponse", "Form1099NecResponse", "FormResponseBase"] class Update1099Form200Response(BaseModel): """ @@ -49,14 +50,16 @@ class Update1099Form200Response(BaseModel): """ # data type: FormResponseBase oneof_schema_1_validator: Optional[FormResponseBase] = None + # data type: Form1042SResponse + oneof_schema_2_validator: Optional[Form1042SResponse] = None # data type: Form1099DivResponse - oneof_schema_2_validator: Optional[Form1099DivResponse] = None + oneof_schema_3_validator: Optional[Form1099DivResponse] = None # data type: Form1099MiscResponse - oneof_schema_3_validator: Optional[Form1099MiscResponse] = None + oneof_schema_4_validator: Optional[Form1099MiscResponse] = None # data type: Form1099NecResponse - oneof_schema_4_validator: Optional[Form1099NecResponse] = None - actual_instance: Optional[Union[Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase]] = None - one_of_schemas: Set[str] = { "Form1099DivResponse", "Form1099MiscResponse", "Form1099NecResponse", "FormResponseBase" } + oneof_schema_5_validator: Optional[Form1099NecResponse] = None + actual_instance: Optional[Union[Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase]] = None + one_of_schemas: Set[str] = { "Form1042SResponse", "Form1099DivResponse", "Form1099MiscResponse", "Form1099NecResponse", "FormResponseBase" } model_config = ConfigDict( validate_assignment=True, @@ -84,6 +87,11 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `FormResponseBase`") else: match += 1 + # validate data type: Form1042SResponse + if not isinstance(v, Form1042SResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `Form1042SResponse`") + else: + match += 1 # validate data type: Form1099DivResponse if not isinstance(v, Form1099DivResponse): error_messages.append(f"Error! Input type `{type(v)}` is not `Form1099DivResponse`") @@ -101,10 +109,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in Update1099Form200Response with oneOf schemas: Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in Update1099Form200Response with oneOf schemas: Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) else: return v @@ -125,6 +133,12 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into Form1042SResponse + try: + instance.actual_instance = Form1042SResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into Form1099DivResponse try: instance.actual_instance = Form1099DivResponse.from_json(json_str) @@ -146,10 +160,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into Update1099Form200Response with oneOf schemas: Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into Update1099Form200Response with oneOf schemas: Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. Details: " + ", ".join(error_messages)) else: return instance @@ -163,7 +177,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/Avalara/SDK/models/A1099/V2/validation_error_response.py b/Avalara/SDK/models/A1099/V2/validation_error_response.py new file mode 100644 index 0000000..1f5e6cd --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/validation_error_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ValidationErrorResponse(BaseModel): + """ + ValidationErrorResponse + """ # noqa: E501 + var_field: Optional[StrictStr] = Field(default=None, description="The field containing the error", alias="field") + errors: Optional[List[StrictStr]] = Field(default=None, description="The list of error messages") + __properties: ClassVar[List[str]] = ["field", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if var_field (nullable) is None + # and model_fields_set contains the field + if self.var_field is None and "var_field" in self.model_fields_set: + _dict['field'] = None + + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "field": obj.get("field"), + "errors": obj.get("errors") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w4_form_data_model.py b/Avalara/SDK/models/A1099/V2/w4_form_data_model.py index ee66c43..602c6cd 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel @@ -160,9 +160,9 @@ class W4FormDataModel(BaseModel): certify_box41: Optional[StrictBool] = Field(default=None, alias="certifyBox41") certify_box43: Optional[StrictBool] = Field(default=None, alias="certifyBox43") certify_part29_signature: Optional[StrictBool] = Field(default=None, alias="certifyPart29Signature") - part19_formation_or_resolution_date: Optional[datetime] = Field(default=None, alias="part19FormationOrResolutionDate") - part20_filing_date: Optional[datetime] = Field(default=None, alias="part20FilingDate") - part21_determination_date: Optional[datetime] = Field(default=None, alias="part21DeterminationDate") + part19_formation_or_resolution_date: Optional[date] = Field(default=None, alias="part19FormationOrResolutionDate") + part20_filing_date: Optional[date] = Field(default=None, alias="part20FilingDate") + part21_determination_date: Optional[date] = Field(default=None, alias="part21DeterminationDate") substantial_us_owners: Optional[List[W8BenESubstantialUsOwnerDataModel]] = Field(default=None, alias="substantialUsOwners") birthday: Optional[StrictStr] = Field(default=None, description="The birthday of the individual associated with the form.") foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") @@ -241,8 +241,8 @@ class W4FormDataModel(BaseModel): certify_box40: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 40.", alias="certifyBox40") box41_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The sponsoring entity information for box 41.", alias="box41SponsoringEntity") certify_box42: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 42.", alias="certifyBox42") - box35_formed_on_date: Optional[datetime] = Field(default=None, alias="box35FormedOnDate") - box36_filed_on_date: Optional[datetime] = Field(default=None, alias="box36FiledOnDate") + box35_formed_on_date: Optional[date] = Field(default=None, alias="box35FormedOnDate") + box36_filed_on_date: Optional[date] = Field(default=None, alias="box36FiledOnDate") tin_match_status: Optional[StrictStr] = Field(default=None, description="The status of the TIN match.", alias="tinMatchStatus") signature: Optional[StrictStr] = Field(default=None, description="The signature itself") business_classification: Optional[StrictStr] = Field(default=None, description="The classification of the business.", alias="businessClassification") diff --git a/Avalara/SDK/models/A1099/V2/w4_form_request.py b/Avalara/SDK/models/A1099/V2/w4_form_request.py new file mode 100644 index 0000000..e908400 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w4_form_request.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class W4FormRequest(BaseModel): + """ + W4FormRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type (always \"w4\" for this model).") + employee_first_name: Optional[StrictStr] = Field(default=None, description="The first name of the employee.", alias="employeeFirstName") + employee_middle_name: Optional[StrictStr] = Field(default=None, description="The middle name of the employee.", alias="employeeMiddleName") + employee_last_name: Optional[StrictStr] = Field(default=None, description="The last name of the employee.", alias="employeeLastName") + employee_name_suffix: Optional[StrictStr] = Field(default=None, description="The name suffix of the employee.", alias="employeeNameSuffix") + tin_type: Optional[StrictStr] = Field(default=None, description="The type of TIN provided.", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") + address: Optional[StrictStr] = Field(default=None, description="The address of the employee.") + city: Optional[StrictStr] = Field(default=None, description="The city of residence of the employee.") + state: Optional[StrictStr] = Field(default=None, description="The state of residence of the employee.") + zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of residence of the employee.") + marital_status: Optional[StrictStr] = Field(default=None, description="The marital status of the employee.", alias="maritalStatus") + last_name_differs: Optional[StrictBool] = Field(default=None, description="Indicates whether the last name differs from prior records.", alias="lastNameDiffers") + num_allowances: Optional[StrictInt] = Field(default=None, description="The number of allowances claimed by the employee.", alias="numAllowances") + other_dependents: Optional[StrictInt] = Field(default=None, description="The number of dependents other than allowances.", alias="otherDependents") + non_job_income: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The amount of non-job income.", alias="nonJobIncome") + deductions: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The amount of deductions claimed.") + additional_withheld: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The additional amount withheld.", alias="additionalWithheld") + exempt_from_withholding: Optional[StrictBool] = Field(default=None, description="Indicates whether the employee is exempt from withholding.", alias="exemptFromWithholding") + office_code: Optional[StrictStr] = Field(default=None, description="The office code associated with the form.", alias="officeCode") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W4FormRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W4FormRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w4_form_response.py b/Avalara/SDK/models/A1099/V2/w4_form_response.py index 56feb2b..ccbb84f 100644 --- a/Avalara/SDK/models/A1099/V2/w4_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w4_form_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py new file mode 100644 index 0000000..95d8558 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_request.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date, datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.A1099.V2.substantial_us_owner_request import SubstantialUsOwnerRequest +from typing import Optional, Set +from typing_extensions import Self + +class W8BenEFormRequest(BaseModel): + """ + W8BenEFormRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type (always \"w8bene\" for this model).") + name: Optional[StrictStr] = Field(default=None, description="The name of the individual or entity associated with the form.") + citizenship_country: Optional[StrictStr] = Field(default=None, description="The country of citizenship.", alias="citizenshipCountry") + disregarded_entity: Optional[StrictStr] = Field(default=None, description="The name of the disregarded entity receiving the payment (if applicable).", alias="disregardedEntity") + entity_type: Optional[StrictStr] = Field(default=None, description="The entity type.", alias="entityType") + making_treaty_claim: Optional[StrictBool] = Field(default=None, description="Indicates whether the entity is making a treaty claim.", alias="makingTreatyClaim") + fatca_status: Optional[StrictStr] = Field(default=None, description="The FATCA status.", alias="fatcaStatus") + residence_address: Optional[StrictStr] = Field(default=None, description="The residential address of the individual or entity.", alias="residenceAddress") + residence_city: Optional[StrictStr] = Field(default=None, description="The city of residence.", alias="residenceCity") + residence_state: Optional[StrictStr] = Field(default=None, description="The state of residence.", alias="residenceState") + residence_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the residence.", alias="residenceZip") + residence_country: Optional[StrictStr] = Field(default=None, description="The country of residence.", alias="residenceCountry") + residence_is_mailing: Optional[StrictBool] = Field(default=None, description="Indicates whether the residence address is also the mailing address.", alias="residenceIsMailing") + mailing_address: Optional[StrictStr] = Field(default=None, description="The mailing address.", alias="mailingAddress") + mailing_city: Optional[StrictStr] = Field(default=None, description="The city of the mailing address.", alias="mailingCity") + mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") + mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") + mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") + giin: Optional[StrictStr] = Field(default=None, description="The global intermediary identification number (GIIN).") + foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") + foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") + reference_number: Optional[StrictStr] = Field(default=None, description="A reference number for the form.", alias="referenceNumber") + disregarded_entity_fatca_status: Optional[StrictStr] = Field(default=None, description="The FATCA status of disregarded entity or branch receiving payment.", alias="disregardedEntityFatcaStatus") + disregarded_address: Optional[StrictStr] = Field(default=None, description="The address for disregarded entities.", alias="disregardedAddress") + disregarded_city: Optional[StrictStr] = Field(default=None, description="The city for disregarded entities.", alias="disregardedCity") + disregarded_state: Optional[StrictStr] = Field(default=None, description="The state for disregarded entities.", alias="disregardedState") + disregarded_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code for disregarded entities.", alias="disregardedZip") + disregarded_country: Optional[StrictStr] = Field(default=None, description="The country for disregarded entities.", alias="disregardedCountry") + disregarded_entity_giin: Optional[StrictStr] = Field(default=None, description="The GIIN for disregarded entities.", alias="disregardedEntityGiin") + treaty_country_certification: Optional[StrictBool] = Field(default=None, description="Certifies the beneficial owner's country under the U.S. tax treaty.", alias="treatyCountryCertification") + treaty_country: Optional[StrictStr] = Field(default=None, description="The treaty country of the beneficial owner.", alias="treatyCountry") + benefit_limitation_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements.", alias="benefitLimitationCertification") + benefit_limitation: Optional[StrictStr] = Field(default=None, description="The benefit limitation for tax treaty claims.", alias="benefitLimitation") + qualified_resident_status_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income.", alias="qualifiedResidentStatusCertification") + treaty_article: Optional[StrictStr] = Field(default=None, description="Indicates the specific article and paragraph of the tax treaty under which the beneficial owner is claiming benefits.", alias="treatyArticle") + withholding_rate: Optional[StrictStr] = Field(default=None, description="Specifies the reduced withholding rate claimed under the applicable tax treaty.", alias="withholdingRate") + income_type: Optional[StrictStr] = Field(default=None, description="Specifies the type of income for which the reduced treaty withholding rate is being claimed.", alias="incomeType") + treaty_reasons: Optional[StrictStr] = Field(default=None, description="The additional conditions in the article the beneficial owner meets to be eligible for the rate of withholding.", alias="treatyReasons") + ffi_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of the entity that sponsors the foreign financial institution (FFI).", alias="ffiSponsoringEntity") + investment_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity.", alias="investmentEntityCertification") + controlled_foreign_corporation_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency.", alias="controlledForeignCorporationCertification") + compliant_nonregistering_local_bank_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization.", alias="compliantNonregisteringLocalBankCertification") + compliant_ffi_low_value_accounts_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group.", alias="compliantFfiLowValueAccountsCertification") + sponsored_closely_held_entity_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle.", alias="sponsoredCloselyHeldEntitySponsoringEntity") + sponsored_closely_held_investment_vehicle_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity.", alias="sponsoredCloselyHeldInvestmentVehicleCertification") + compliant_limited_life_debt_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements.", alias="compliantLimitedLifeDebtEntityCertification") + investment_entity_no_financial_accounts_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts.", alias="investmentEntityNoFinancialAccountsCertification") + owner_documented_ffi_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships.", alias="ownerDocumentedFfiCertification") + owner_documented_ffi_reporting_statement_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder.", alias="ownerDocumentedFfiReportingStatementCertification") + owner_documented_ffi_auditor_letter_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI.", alias="ownerDocumentedFfiAuditorLetterCertification") + owner_documented_ffi_trust_beneficiaries_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries.", alias="ownerDocumentedFfiTrustBeneficiariesCertification") + restricted_distributor_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations.", alias="restrictedDistributorCertification") + restricted_distributor_agreement_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities.", alias="restrictedDistributorAgreementCertification") + restricted_distributor_preexisting_sales_compliance_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations.", alias="restrictedDistributorPreexistingSalesComplianceCertification") + nonreporting_iga_ffi_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA.", alias="nonreportingIgaFfiCertification") + iga_country: Optional[StrictStr] = Field(default=None, description="The country for the applicable IGA with the United States.", alias="igaCountry") + iga_model: Optional[StrictStr] = Field(default=None, description="The applicable IGA model.", alias="igaModel") + iga_legal_status_treatment: Optional[StrictStr] = Field(default=None, description="Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations.", alias="igaLegalStatusTreatment") + iga_ffi_trustee_or_sponsor: Optional[StrictStr] = Field(default=None, description="The trustee or sponsor name for the nonreporting IGA FFI.", alias="igaFfiTrusteeOrSponsor") + iga_ffi_trustee_is_foreign: Optional[StrictBool] = Field(default=None, description="Indicates whether the trustee for the nonreporting IGA FFI is foreign.", alias="igaFfiTrusteeIsForeign") + non_commercial_financial_activity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted.", alias="nonCommercialFinancialActivityCertification") + internation_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an international organization described in section 7701(a)(18).", alias="internationOrganizationCertification") + intergovernmental_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities.", alias="intergovernmentalOrganizationCertification") + treaty_qualified_pension_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income.", alias="treatyQualifiedPensionFundCertification") + qualified_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions.", alias="qualifiedRetirementFundCertification") + narrow_participation_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs.", alias="narrowParticipationRetirementFundCertification") + section401_a_equivalent_pension_plan_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded.", alias="section401AEquivalentPensionPlanCertification") + investment_entity_for_retirement_funds_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs.", alias="investmentEntityForRetirementFundsCertification") + exempt_beneficial_owner_sponsored_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor.", alias="exemptBeneficialOwnerSponsoredRetirementFundCertification") + exempt_beneficial_owner_owned_investment_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations.", alias="exemptBeneficialOwnerOwnedInvestmentEntityCertification") + territory_financial_institution_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States.", alias="territoryFinancialInstitutionCertification") + excepted_nonfinancial_group_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution.", alias="exceptedNonfinancialGroupEntityCertification") + excepted_nonfinancial_start_up_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund.", alias="exceptedNonfinancialStartUpCertification") + startup_formation_or_resolution_date: Optional[date] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") + excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years.", alias="exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification") + nonfinancial_entity_filing_date: Optional[date] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") + section501_c_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel.", alias="section501COrganizationCertification") + determination_letter_date: Optional[date] = Field(default=None, description="The date of the IRS determination letter confirming the entity’s section 501(c) status.", alias="determinationLetterDate") + nonprofit_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law.", alias="nonprofitOrganizationCertification") + publicly_traded_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market.", alias="publiclyTradedNffeCertification") + publicly_traded_nffe_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the securities market where the corporation's stock is regularly traded.", alias="publiclyTradedNffeSecuritiesMarket") + nffe_affiliate_of_publicly_traded_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group.", alias="nffeAffiliateOfPubliclyTradedEntityCertification") + publicly_traded_entity: Optional[StrictStr] = Field(default=None, description="The name of the affiliated entity whose stock is regularly traded on an established securities market.", alias="publiclyTradedEntity") + nffe_affiliate_of_publicly_traded_entity_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the established securities market where the affiliated entity's stock is traded.", alias="nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") + excepted_territory_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession.", alias="exceptedTerritoryNffeCertification") + active_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income.", alias="activeNffeCertification") + passive_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution.", alias="passiveNffeCertification") + passive_nffe_no_substantial_us_owners_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons.", alias="passiveNffeNoSubstantialUsOwnersCertification") + passive_nffe_substantial_us_owners_provided_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person.", alias="passiveNffeSubstantialUsOwnersProvidedCertification") + excepted_inter_affiliate_ffi_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group.", alias="exceptedInterAffiliateFfiCertification") + sponsored_direct_reporting_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a sponsored direct reporting NFFE.", alias="sponsoredDirectReportingNffeCertification") + direct_reporting_nffe_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of the entity that sponsors the direct reporting NFFE.", alias="directReportingNffeSponsoringEntity") + substantial_us_owners: Optional[List[SubstantialUsOwnerRequest]] = Field(default=None, description="The list of substantial U.S. owners of passive NFFE.", alias="substantialUsOwners") + signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer.", alias="signerName") + capacity_to_sign_certification: Optional[StrictBool] = Field(default=None, description="Certifies signer has the capacity to sign for the beneficial owner.", alias="capacityToSignCertification") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W8BenEFormRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W8BenEFormRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py index 25d066d..ab90665 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_form_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from Avalara.SDK.models.A1099.V2.substantial_us_owner_response import SubstantialUsOwnerResponse @@ -118,11 +118,11 @@ class W8BenEFormResponse(BaseModel): territory_financial_institution_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States.", alias="territoryFinancialInstitutionCertification") excepted_nonfinancial_group_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution.", alias="exceptedNonfinancialGroupEntityCertification") excepted_nonfinancial_start_up_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund.", alias="exceptedNonfinancialStartUpCertification") - startup_formation_or_resolution_date: Optional[datetime] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") + startup_formation_or_resolution_date: Optional[date] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years.", alias="exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification") - nonfinancial_entity_filing_date: Optional[datetime] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") + nonfinancial_entity_filing_date: Optional[date] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") section501_c_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel.", alias="section501COrganizationCertification") - determination_letter_date: Optional[datetime] = Field(default=None, description="The date of the IRS determination letter confirming the entity’s section 501(c) status.", alias="determinationLetterDate") + determination_letter_date: Optional[date] = Field(default=None, description="The date of the IRS determination letter confirming the entity’s section 501(c) status.", alias="determinationLetterDate") nonprofit_organization_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law.", alias="nonprofitOrganizationCertification") publicly_traded_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market.", alias="publiclyTradedNffeCertification") publicly_traded_nffe_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the securities market where the corporation's stock is regularly traded.", alias="publiclyTradedNffeSecuritiesMarket") diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_e_substantial_us_owner_data_model.py b/Avalara/SDK/models/A1099/V2/w8_ben_e_substantial_us_owner_data_model.py index 95c59b6..0b75fe9 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_e_substantial_us_owner_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_e_substantial_us_owner_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py index c7c2479..b189be6 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel @@ -169,9 +169,9 @@ class W8BenFormDataModel(BaseModel): certify_box41: Optional[StrictBool] = Field(default=None, alias="certifyBox41") certify_box43: Optional[StrictBool] = Field(default=None, alias="certifyBox43") certify_part29_signature: Optional[StrictBool] = Field(default=None, alias="certifyPart29Signature") - part19_formation_or_resolution_date: Optional[datetime] = Field(default=None, alias="part19FormationOrResolutionDate") - part20_filing_date: Optional[datetime] = Field(default=None, alias="part20FilingDate") - part21_determination_date: Optional[datetime] = Field(default=None, alias="part21DeterminationDate") + part19_formation_or_resolution_date: Optional[date] = Field(default=None, alias="part19FormationOrResolutionDate") + part20_filing_date: Optional[date] = Field(default=None, alias="part20FilingDate") + part21_determination_date: Optional[date] = Field(default=None, alias="part21DeterminationDate") substantial_us_owners: Optional[List[W8BenESubstantialUsOwnerDataModel]] = Field(default=None, alias="substantialUsOwners") ein: Optional[StrictStr] = Field(default=None, description="The employer identification number (EIN).") ein_type: Optional[StrictStr] = Field(default=None, description="The type of employer identification number (EIN).", alias="einType") @@ -241,8 +241,8 @@ class W8BenFormDataModel(BaseModel): certify_box40: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 40.", alias="certifyBox40") box41_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The sponsoring entity information for box 41.", alias="box41SponsoringEntity") certify_box42: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 42.", alias="certifyBox42") - box35_formed_on_date: Optional[datetime] = Field(default=None, alias="box35FormedOnDate") - box36_filed_on_date: Optional[datetime] = Field(default=None, alias="box36FiledOnDate") + box35_formed_on_date: Optional[date] = Field(default=None, alias="box35FormedOnDate") + box36_filed_on_date: Optional[date] = Field(default=None, alias="box36FiledOnDate") tin_match_status: Optional[StrictStr] = Field(default=None, description="The status of the TIN match.", alias="tinMatchStatus") signature: Optional[StrictStr] = Field(default=None, description="The signature itself") business_classification: Optional[StrictStr] = Field(default=None, description="The classification of the business.", alias="businessClassification") diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py new file mode 100644 index 0000000..d460f85 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_request.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date, datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class W8BenFormRequest(BaseModel): + """ + W8BenFormRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type (always \"w8ben\" for this model).") + name: Optional[StrictStr] = Field(default=None, description="The name of the individual or entity associated with the form.") + citizenship_country: Optional[StrictStr] = Field(default=None, description="The country of citizenship.", alias="citizenshipCountry") + residence_address: Optional[StrictStr] = Field(default=None, description="The residential address of the individual or entity.", alias="residenceAddress") + residence_city: Optional[StrictStr] = Field(default=None, description="The city of residence.", alias="residenceCity") + residence_state: Optional[StrictStr] = Field(default=None, description="The state of residence.", alias="residenceState") + residence_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the residence.", alias="residenceZip") + residence_country: Optional[StrictStr] = Field(default=None, description="The country of residence.", alias="residenceCountry") + residence_is_mailing: Optional[StrictBool] = Field(default=None, description="Indicates whether the residence address is the mailing address.", alias="residenceIsMailing") + mailing_address: Optional[StrictStr] = Field(default=None, description="The mailing address.", alias="mailingAddress") + mailing_city: Optional[StrictStr] = Field(default=None, description="The city of the mailing address.", alias="mailingCity") + mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") + mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") + mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") + foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not legally required.", alias="foreignTinNotRequired") + foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") + reference_number: Optional[StrictStr] = Field(default=None, description="A reference number for the form.", alias="referenceNumber") + birthday: Optional[date] = Field(default=None, description="The birthday of the individual associated with the form.") + treaty_country: Optional[StrictStr] = Field(default=None, description="The country for which the treaty applies.", alias="treatyCountry") + treaty_article: Optional[StrictStr] = Field(default=None, description="The specific article of the treaty being claimed.", alias="treatyArticle") + treaty_reasons: Optional[StrictStr] = Field(default=None, description="The reasons for claiming treaty benefits.", alias="treatyReasons") + withholding_rate: Optional[StrictStr] = Field(default=None, description="The withholding rate applied as per the treaty.", alias="withholdingRate") + income_type: Optional[StrictStr] = Field(default=None, description="The type of income covered by the treaty.", alias="incomeType") + signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer of the form.", alias="signerName") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W8BenFormRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W8BenFormRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py b/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py index 6f8343f..342c81f 100644 --- a/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_ben_form_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py index 349b31c..476ea27 100644 --- a/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_bene_form_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel @@ -143,9 +143,9 @@ class W8BeneFormDataModel(BaseModel): certify_box41: Optional[StrictBool] = Field(default=None, alias="certifyBox41") certify_box43: Optional[StrictBool] = Field(default=None, alias="certifyBox43") certify_part29_signature: Optional[StrictBool] = Field(default=None, alias="certifyPart29Signature") - part19_formation_or_resolution_date: Optional[datetime] = Field(default=None, alias="part19FormationOrResolutionDate") - part20_filing_date: Optional[datetime] = Field(default=None, alias="part20FilingDate") - part21_determination_date: Optional[datetime] = Field(default=None, alias="part21DeterminationDate") + part19_formation_or_resolution_date: Optional[date] = Field(default=None, alias="part19FormationOrResolutionDate") + part20_filing_date: Optional[date] = Field(default=None, alias="part20FilingDate") + part21_determination_date: Optional[date] = Field(default=None, alias="part21DeterminationDate") substantial_us_owners: Optional[List[W8BenESubstantialUsOwnerDataModel]] = Field(default=None, alias="substantialUsOwners") employee_first_name: Optional[StrictStr] = Field(default=None, description="The first name of the employee.", alias="employeeFirstName") employee_middle_name: Optional[StrictStr] = Field(default=None, description="The middle name of the employee.", alias="employeeMiddleName") @@ -241,8 +241,8 @@ class W8BeneFormDataModel(BaseModel): certify_box40: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 40.", alias="certifyBox40") box41_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The sponsoring entity information for box 41.", alias="box41SponsoringEntity") certify_box42: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 42.", alias="certifyBox42") - box35_formed_on_date: Optional[datetime] = Field(default=None, alias="box35FormedOnDate") - box36_filed_on_date: Optional[datetime] = Field(default=None, alias="box36FiledOnDate") + box35_formed_on_date: Optional[date] = Field(default=None, alias="box35FormedOnDate") + box36_filed_on_date: Optional[date] = Field(default=None, alias="box36FiledOnDate") tin_match_status: Optional[StrictStr] = Field(default=None, description="The status of the TIN match.", alias="tinMatchStatus") signature: Optional[StrictStr] = Field(default=None, description="The signature itself") business_classification: Optional[StrictStr] = Field(default=None, description="The classification of the business.", alias="businessClassification") diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py index 366bb7b..54d2fa1 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel @@ -162,8 +162,8 @@ class W8ImyFormDataModel(BaseModel): certify_box42: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 42.", alias="certifyBox42") signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer of the form.", alias="signerName") e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") - box35_formed_on_date: Optional[datetime] = Field(default=None, alias="box35FormedOnDate") - box36_filed_on_date: Optional[datetime] = Field(default=None, alias="box36FiledOnDate") + box35_formed_on_date: Optional[date] = Field(default=None, alias="box35FormedOnDate") + box36_filed_on_date: Optional[date] = Field(default=None, alias="box36FiledOnDate") employee_first_name: Optional[StrictStr] = Field(default=None, description="The first name of the employee.", alias="employeeFirstName") employee_middle_name: Optional[StrictStr] = Field(default=None, description="The middle name of the employee.", alias="employeeMiddleName") employee_last_name: Optional[StrictStr] = Field(default=None, description="The last name of the employee.", alias="employeeLastName") @@ -233,9 +233,9 @@ class W8ImyFormDataModel(BaseModel): certify_box41: Optional[StrictBool] = Field(default=None, alias="certifyBox41") certify_box43: Optional[StrictBool] = Field(default=None, alias="certifyBox43") certify_part29_signature: Optional[StrictBool] = Field(default=None, alias="certifyPart29Signature") - part19_formation_or_resolution_date: Optional[datetime] = Field(default=None, alias="part19FormationOrResolutionDate") - part20_filing_date: Optional[datetime] = Field(default=None, alias="part20FilingDate") - part21_determination_date: Optional[datetime] = Field(default=None, alias="part21DeterminationDate") + part19_formation_or_resolution_date: Optional[date] = Field(default=None, alias="part19FormationOrResolutionDate") + part20_filing_date: Optional[date] = Field(default=None, alias="part20FilingDate") + part21_determination_date: Optional[date] = Field(default=None, alias="part21DeterminationDate") substantial_us_owners: Optional[List[W8BenESubstantialUsOwnerDataModel]] = Field(default=None, alias="substantialUsOwners") birthday: Optional[StrictStr] = Field(default=None, description="The birthday of the individual associated with the form.") foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py new file mode 100644 index 0000000..0b057f4 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_request.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date, datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class W8ImyFormRequest(BaseModel): + """ + W8ImyFormRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type (always \"w8imy\" for this model).") + name: Optional[StrictStr] = Field(default=None, description="The name of the individual or entity associated with the form.") + citizenship_country: Optional[StrictStr] = Field(default=None, description="The country of citizenship.", alias="citizenshipCountry") + disregarded_entity: Optional[StrictStr] = Field(default=None, description="The name of the disregarded entity receiving the payment (if applicable).", alias="disregardedEntity") + entity_type: Optional[StrictStr] = Field(default=None, description="The entity type.", alias="entityType") + fatca_status: Optional[StrictStr] = Field(default=None, description="The FATCA status.", alias="fatcaStatus") + residence_address: Optional[StrictStr] = Field(default=None, description="The residential address of the individual or entity.", alias="residenceAddress") + residence_city: Optional[StrictStr] = Field(default=None, description="The city of residence.", alias="residenceCity") + residence_state: Optional[StrictStr] = Field(default=None, description="The state of residence.", alias="residenceState") + residence_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the residence.", alias="residenceZip") + residence_country: Optional[StrictStr] = Field(default=None, description="The country of residence.", alias="residenceCountry") + residence_is_mailing: Optional[StrictBool] = Field(default=None, description="Indicates whether the residence address is also the mailing address.", alias="residenceIsMailing") + mailing_address: Optional[StrictStr] = Field(default=None, description="The mailing address.", alias="mailingAddress") + mailing_city: Optional[StrictStr] = Field(default=None, description="The city of the mailing address.", alias="mailingCity") + mailing_state: Optional[StrictStr] = Field(default=None, description="The state of the mailing address.", alias="mailingState") + mailing_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the mailing address.", alias="mailingZip") + mailing_country: Optional[StrictStr] = Field(default=None, description="The country of the mailing address.", alias="mailingCountry") + tin_type: Optional[StrictStr] = Field(default=None, description="The type of TIN provided.", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") + giin: Optional[StrictStr] = Field(default=None, description="The global intermediary identification number (GIIN).") + foreign_tin: Optional[StrictStr] = Field(default=None, description="The foreign taxpayer identification number (TIN).", alias="foreignTin") + reference_number: Optional[StrictStr] = Field(default=None, description="A reference number for the form.", alias="referenceNumber") + disregarded_entity_fatca_status: Optional[StrictStr] = Field(default=None, description="The FATCA status of disregarded entity or branch receiving payment.", alias="disregardedEntityFatcaStatus") + disregarded_address: Optional[StrictStr] = Field(default=None, description="The address for disregarded entities.", alias="disregardedAddress") + disregarded_city: Optional[StrictStr] = Field(default=None, description="The city for disregarded entities.", alias="disregardedCity") + disregarded_state: Optional[StrictStr] = Field(default=None, description="The state for disregarded entities.", alias="disregardedState") + disregarded_zip: Optional[StrictStr] = Field(default=None, description="The ZIP code for disregarded entities.", alias="disregardedZip") + disregarded_country: Optional[StrictStr] = Field(default=None, description="The country for disregarded entities.", alias="disregardedCountry") + disregarded_entity_giin: Optional[StrictStr] = Field(default=None, description="The GIIN for disregarded entities.", alias="disregardedEntityGiin") + qualified_intermediary_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a Qualified Intermediary (QI) acting in accordance with its QI Agreement, providing required withholding statements and documentation for relevant tax withholding purposes.", alias="qualifiedIntermediaryCertification") + qi_primary_withholding_responsibility_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts.", alias="qiPrimaryWithholdingResponsibilityCertification") + qi_withholding_responsibility_for_ptp_sales_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships.", alias="qiWithholdingResponsibilityForPtpSalesCertification") + qi_nominee_withholding_responsibility_for_ptp_distributions_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions.", alias="qiNomineeWithholdingResponsibilityForPtpDistributionsCertification") + qi_securities_lender_substitute_dividend_withholding_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments.", alias="qiSecuritiesLenderSubstituteDividendWithholdingCertification") + qi_withholding_and1099_reporting_responsibility_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments.", alias="qiWithholdingAnd1099ReportingResponsibilityCertification") + qi_form1099_or_fatca_reporting_responsibility_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons.", alias="qiForm1099OrFatcaReportingResponsibilityCertification") + qi_opt_out_of_form1099_reporting_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form.", alias="qiOptOutOfForm1099ReportingCertification") + qi_withholding_rate_pool_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii).", alias="qiWithholdingRatePoolCertification") + qi_intermediary_or_flow_through_entity_documentation_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool.", alias="qiIntermediaryOrFlowThroughEntityDocumentationCertification") + qualified_derivatives_dealer_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions.", alias="qualifiedDerivativesDealerCertification") + qdd_corporation: Optional[StrictBool] = Field(default=None, description="Indicates QDD classification is Corporation.", alias="qddCorporation") + qdd_partnership: Optional[StrictBool] = Field(default=None, description="Indicates QDD classification is Partnership.", alias="qddPartnership") + qdd_disregarded_entity: Optional[StrictBool] = Field(default=None, description="Indicates QDD classification is Disregarded Entity.", alias="qddDisregardedEntity") + nonqualified_intermediary_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form.", alias="nonqualifiedIntermediaryCertification") + nqi_withholding_statement_transmission_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement.", alias="nqiWithholdingStatementTransmissionCertification") + nqi_withholding_rate_pool_compliance_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions.", alias="nqiWithholdingRatePoolComplianceCertification") + nqi_qualified_securities_lender_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments.", alias="nqiQualifiedSecuritiesLenderCertification") + nqi_alternative_withholding_statement_verification_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471.", alias="nqiAlternativeWithholdingStatementVerificationCertification") + territory_financial_institution_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States.", alias="territoryFinancialInstitutionCertification") + tfi_treated_as_us_person_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments.", alias="tfiTreatedAsUsPersonCertification") + tfi_withholding_statement_transmission_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments.", alias="tfiWithholdingStatementTransmissionCertification") + tfi_treated_as_us_person_for_ptp_sales_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests.", alias="tfiTreatedAsUsPersonForPtpSalesCertification") + tfi_nominee_us_person_for_ptp_distributions_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations.", alias="tfiNomineeUsPersonForPtpDistributionsCertification") + tfi_not_nominee_for_ptp_distributions_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions.", alias="tfiNotNomineeForPtpDistributionsCertification") + us_branch_non_effectively_connected_income_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales.", alias="usBranchNonEffectivelyConnectedIncomeCertification") + us_branch_agreement_to_be_treated_as_us_person_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations.", alias="usBranchAgreementToBeTreatedAsUsPersonCertification") + us_branch_withholding_statement_and_compliance_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations.", alias="usBranchWithholdingStatementAndComplianceCertification") + us_branch_acting_as_us_person_for_ptp_sales_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations.", alias="usBranchActingAsUsPersonForPtpSalesCertification") + us_branch_nominee_for_ptp_distributions_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations.", alias="usBranchNomineeForPtpDistributionsCertification") + us_branch_not_nominee_for_ptp_distributions_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements.", alias="usBranchNotNomineeForPtpDistributionsCertification") + withholding_foreign_partnership_or_trust_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement.", alias="withholdingForeignPartnershipOrTrustCertification") + nonwithholding_foreign_entity_withholding_statement_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4.", alias="nonwithholdingForeignEntityWithholdingStatementCertification") + foreign_entity_partner_in_lower_tier_partnership_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a).", alias="foreignEntityPartnerInLowerTierPartnershipCertification") + foreign_partnership_amount_realized_section1446_f_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f).", alias="foreignPartnershipAmountRealizedSection1446FCertification") + foreign_partnership_modified_amount_realized_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable.", alias="foreignPartnershipModifiedAmountRealizedCertification") + foreign_grantor_trust_amount_realized_allocation_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations.", alias="foreignGrantorTrustAmountRealizedAllocationCertification") + alternative_withholding_statement_reliance_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement.", alias="alternativeWithholdingStatementRelianceCertification") + np_ffi_with_exempt_beneficial_owners_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners.", alias="npFfiWithExemptBeneficialOwnersCertification") + ffi_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of the entity that sponsors the foreign financial institution (FFI).", alias="ffiSponsoringEntity") + investment_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity.", alias="investmentEntityCertification") + controlled_foreign_corporation_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency.", alias="controlledForeignCorporationCertification") + owner_documented_ffi_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships.", alias="ownerDocumentedFfiCertification") + owner_documented_ffi_reporting_statement_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder.", alias="ownerDocumentedFfiReportingStatementCertification") + owner_documented_ffi_auditor_letter_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations.", alias="ownerDocumentedFfiAuditorLetterCertification") + compliant_nonregistering_local_bank_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization.", alias="compliantNonregisteringLocalBankCertification") + compliant_ffi_low_value_accounts_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group.", alias="compliantFfiLowValueAccountsCertification") + sponsored_closely_held_entity_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle.", alias="sponsoredCloselyHeldEntitySponsoringEntity") + sponsored_closely_held_investment_vehicle_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity.", alias="sponsoredCloselyHeldInvestmentVehicleCertification") + compliant_limited_life_debt_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements.", alias="compliantLimitedLifeDebtEntityCertification") + investment_entity_no_financial_accounts_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts.", alias="investmentEntityNoFinancialAccountsCertification") + restricted_distributor_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations.", alias="restrictedDistributorCertification") + restricted_distributor_agreement_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities.", alias="restrictedDistributorAgreementCertification") + restricted_distributor_preexisting_sales_compliance_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations.", alias="restrictedDistributorPreexistingSalesComplianceCertification") + foreign_central_bank_of_issue_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4).", alias="foreignCentralBankOfIssueCertification") + nonreporting_iga_ffi_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA.", alias="nonreportingIgaFfiCertification") + iga_country: Optional[StrictStr] = Field(default=None, description="The country for the applicable IGA with the United States.", alias="igaCountry") + iga_model: Optional[StrictStr] = Field(default=None, description="The applicable IGA model.", alias="igaModel") + iga_legal_status_treatment: Optional[StrictStr] = Field(default=None, description="Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations.", alias="igaLegalStatusTreatment") + iga_ffi_trustee_or_sponsor: Optional[StrictStr] = Field(default=None, description="The trustee or sponsor name for the nonreporting IGA FFI.", alias="igaFfiTrusteeOrSponsor") + iga_ffi_trustee_is_foreign: Optional[StrictBool] = Field(default=None, description="Indicates whether the trustee for the nonreporting IGA FFI is foreign.", alias="igaFfiTrusteeIsForeign") + treaty_qualified_pension_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income.", alias="treatyQualifiedPensionFundCertification") + qualified_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions.", alias="qualifiedRetirementFundCertification") + narrow_participation_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs.", alias="narrowParticipationRetirementFundCertification") + section401_a_equivalent_pension_plan_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded.", alias="section401AEquivalentPensionPlanCertification") + investment_entity_for_retirement_funds_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs.", alias="investmentEntityForRetirementFundsCertification") + exempt_beneficial_owner_sponsored_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor.", alias="exemptBeneficialOwnerSponsoredRetirementFundCertification") + excepted_nonfinancial_group_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution.", alias="exceptedNonfinancialGroupEntityCertification") + excepted_nonfinancial_start_up_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund.", alias="exceptedNonfinancialStartUpCertification") + startup_formation_or_resolution_date: Optional[date] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") + excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years.", alias="exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification") + nonfinancial_entity_filing_date: Optional[date] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") + publicly_traded_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market.", alias="publiclyTradedNffeCertification") + publicly_traded_nffe_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the securities market where the corporation's stock is regularly traded.", alias="publiclyTradedNffeSecuritiesMarket") + nffe_affiliate_of_publicly_traded_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group.", alias="nffeAffiliateOfPubliclyTradedEntityCertification") + publicly_traded_entity: Optional[StrictStr] = Field(default=None, description="The name of the affiliated entity whose stock is regularly traded on an established securities market.", alias="publiclyTradedEntity") + nffe_affiliate_of_publicly_traded_entity_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the established securities market where the affiliated entity's stock is traded.", alias="nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") + excepted_territory_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession.", alias="exceptedTerritoryNffeCertification") + active_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income.", alias="activeNffeCertification") + passive_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution.", alias="passiveNffeCertification") + sponsored_direct_reporting_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a sponsored direct reporting NFFE.", alias="sponsoredDirectReportingNffeCertification") + direct_reporting_nffe_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The name of the entity that sponsors the direct reporting NFFE.", alias="directReportingNffeSponsoringEntity") + signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer.", alias="signerName") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W8ImyFormRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W8ImyFormRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py b/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py index 4083bd0..c2a083b 100644 --- a/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w8_imy_form_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set @@ -140,9 +140,9 @@ class W8ImyFormResponse(BaseModel): exempt_beneficial_owner_sponsored_retirement_fund_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor.", alias="exemptBeneficialOwnerSponsoredRetirementFundCertification") excepted_nonfinancial_group_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution.", alias="exceptedNonfinancialGroupEntityCertification") excepted_nonfinancial_start_up_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund.", alias="exceptedNonfinancialStartUpCertification") - startup_formation_or_resolution_date: Optional[datetime] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") + startup_formation_or_resolution_date: Optional[date] = Field(default=None, description="The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business).", alias="startupFormationOrResolutionDate") excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years.", alias="exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification") - nonfinancial_entity_filing_date: Optional[datetime] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") + nonfinancial_entity_filing_date: Optional[date] = Field(default=None, description="The filed date for a plan of reorganization, liquidation or bankruptcy.", alias="nonfinancialEntityFilingDate") publicly_traded_nffe_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market.", alias="publiclyTradedNffeCertification") publicly_traded_nffe_securities_market: Optional[StrictStr] = Field(default=None, description="The name of the securities market where the corporation's stock is regularly traded.", alias="publiclyTradedNffeSecuritiesMarket") nffe_affiliate_of_publicly_traded_entity_certification: Optional[StrictBool] = Field(default=None, description="Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group.", alias="nffeAffiliateOfPubliclyTradedEntityCertification") diff --git a/Avalara/SDK/models/A1099/V2/w9_form_base_request.py b/Avalara/SDK/models/A1099/V2/w9_form_base_request.py new file mode 100644 index 0000000..8c8d6b2 --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w9_form_base_request.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class W9FormBaseRequest(BaseModel): + """ + W9FormBaseRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type.") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W9FormBaseRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W9FormBaseRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w9_form_base_response.py b/Avalara/SDK/models/A1099/V2/w9_form_base_response.py index 7218460..b07de9c 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_base_response.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_base_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/A1099/V2/w9_form_data_model.py b/Avalara/SDK/models/A1099/V2/w9_form_data_model.py index fa7e2e4..3a059cd 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_data_model.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_data_model.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -33,7 +33,7 @@ import re # noqa: F401 import json -from datetime import datetime +from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from Avalara.SDK.models.A1099.V2.w8_ben_e_substantial_us_owner_data_model import W8BenESubstantialUsOwnerDataModel @@ -173,9 +173,9 @@ class W9FormDataModel(BaseModel): certify_box41: Optional[StrictBool] = Field(default=None, alias="certifyBox41") certify_box43: Optional[StrictBool] = Field(default=None, alias="certifyBox43") certify_part29_signature: Optional[StrictBool] = Field(default=None, alias="certifyPart29Signature") - part19_formation_or_resolution_date: Optional[datetime] = Field(default=None, alias="part19FormationOrResolutionDate") - part20_filing_date: Optional[datetime] = Field(default=None, alias="part20FilingDate") - part21_determination_date: Optional[datetime] = Field(default=None, alias="part21DeterminationDate") + part19_formation_or_resolution_date: Optional[date] = Field(default=None, alias="part19FormationOrResolutionDate") + part20_filing_date: Optional[date] = Field(default=None, alias="part20FilingDate") + part21_determination_date: Optional[date] = Field(default=None, alias="part21DeterminationDate") substantial_us_owners: Optional[List[W8BenESubstantialUsOwnerDataModel]] = Field(default=None, alias="substantialUsOwners") birthday: Optional[StrictStr] = Field(default=None, description="The birthday of the individual associated with the form.") foreign_tin_not_required: Optional[StrictBool] = Field(default=None, description="Indicates whether a foreign TIN is not required.", alias="foreignTinNotRequired") @@ -254,8 +254,8 @@ class W9FormDataModel(BaseModel): certify_box40: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 40.", alias="certifyBox40") box41_sponsoring_entity: Optional[StrictStr] = Field(default=None, description="The sponsoring entity information for box 41.", alias="box41SponsoringEntity") certify_box42: Optional[StrictBool] = Field(default=None, description="Indicates certification for box 42.", alias="certifyBox42") - box35_formed_on_date: Optional[datetime] = Field(default=None, alias="box35FormedOnDate") - box36_filed_on_date: Optional[datetime] = Field(default=None, alias="box36FiledOnDate") + box35_formed_on_date: Optional[date] = Field(default=None, alias="box35FormedOnDate") + box36_filed_on_date: Optional[date] = Field(default=None, alias="box36FiledOnDate") __properties: ClassVar[List[str]] = ["type", "signedDate", "createdAt", "employeeFirstName", "employeeMiddleName", "employeeLastName", "employeeNameSuffix", "address", "city", "state", "zip", "typeOfTin", "tin", "box3MaritalStatus", "box4LastNameDiffers", "box5NumAllowances", "otherDependents", "nonJobIncome", "deductions", "box6AdditionalWithheld", "box7ExemptFromWithholding", "officeCode", "eDeliveryConsentedAt", "disregardedEntityChapter4FatcaStatus", "name", "residenceAddress", "residenceCity", "residenceState", "residencePostalCode", "residenceCountry", "mailingAddress", "mailingCity", "mailingState", "mailingPostalCode", "mailingCountry", "disregardedAddress", "disregardedCity", "disregardedState", "disregardedPostalCode", "disregardedCountry", "foreignTin", "ftinNotRequired", "referenceNumber", "giin", "chapter3EntityType", "chapter4FatcaStatus", "disregardedEntity", "disregardedEntityGiin", "benefitLimitation", "part4SponsoringEntity", "part4SponsoringEntityGiin", "part7SponsoringEntity", "part12IgaCountry", "part12IgaType", "part12FatcaStatusUnderIgaAnnexIi", "part12TrusteeName", "part12TrusteeIsForeign", "part12Model2IgaGiin", "box37AExchange", "box37BExchange", "box37BEntity", "part28SponsoringEntity", "part28SponsoringEntityGiin", "signerName", "residenceIsMailing", "citizenshipCountry", "makingTreatyClaim", "treatyCountry", "treatyArticle", "withholdingRate", "incomeType", "treatyReasons", "certifyBox14A", "certifyBox14B", "certifyBox14C", "certifyBox17_1", "certifyBox17_2", "certifyBox18", "certifyBox19", "certifyBox21", "certifyBox22", "certifyBox23", "certifyBox24A", "certifyBox24B", "certifyBox24C", "certifyBox24D", "certifyBox25A", "certifyBox25B", "certifyBox25C", "certifyBox26", "certifyBox27", "certifyBox28A", "certifyBox28B", "certifyBox29A", "certifyBox29B", "certifyBox29C", "certifyBox29D", "certifyBox29E", "certifyBox29F", "certifyBox30", "certifyBox31", "certifyBox32", "certifyBox33", "certifyBox34", "certifyBox35", "certifyBox36", "certifyBox37A", "certifyBox37B", "certifyBox38", "certifyBox39", "certifyBox40A", "certifyBox40B", "certifyBox40C", "certifyBox41", "certifyBox43", "certifyPart29Signature", "part19FormationOrResolutionDate", "part20FilingDate", "part21DeterminationDate", "substantialUsOwners", "birthday", "foreignTinNotRequired", "archived", "referenceId", "companyId", "displayName", "email", "signerCapacity", "updatedAt", "ein", "einType", "certifyBox14", "certifyBox15A", "certifyBox15B", "certifyBox15C", "certifyBox15D", "certifyBox15E", "certifyBox15F", "certifyBox15G", "certifyBox15H", "certifyBox15I", "certifyBox16A", "box16BQddCorporate", "box16BQddPartnership", "box16BQddDisregardedEntity", "certifyBox17A", "certifyBox17B", "certifyBox17C", "certifyBox17D", "certifyBox17E", "certifyBox18A", "certifyBox18B", "certifyBox18C", "certifyBox18D", "certifyBox18E", "certifyBox18F", "certifyBox19A", "certifyBox19B", "certifyBox19C", "certifyBox19D", "certifyBox19E", "certifyBox19F", "certifyBox20", "certifyBox21A", "certifyBox21B", "certifyBox21C", "certifyBox21D", "certifyBox21E", "certifyBox21F", "box23ANameSponsoringEntity", "certifyBox23B", "certifyBox23C", "certifyBox25", "box27ANameSponsoringEntity", "certifyBox27B", "certifyBox28", "certifyBox29", "certifyBox30A", "certifyBox30B", "certifyBox30C", "box32IgaCountry", "box32IgaType", "box32IgaTreatedAs", "box32TrusteeOrSponsor", "box32TrusteeIsForeign", "certifyBox33A", "certifyBox33B", "certifyBox33C", "certifyBox33D", "certifyBox33E", "certifyBox33F", "box37ASecuritiesMarket", "box37BNameOfEntity", "box37BSecuritiesMarket", "certifyBox40", "box41SponsoringEntity", "certifyBox42", "box35FormedOnDate", "box36FiledOnDate", "tinMatchStatus", "signature", "businessClassification", "businessName", "businessOther", "exemptPayeeCode", "exemptFatcaCode", "accountNumber", "foreignCountryIndicator", "foreignAddress", "backupWithholding", "is1099able", "foreignPartnerOwnerOrBeneficiary"] @field_validator('type') diff --git a/Avalara/SDK/models/A1099/V2/w9_form_request.py b/Avalara/SDK/models/A1099/V2/w9_form_request.py new file mode 100644 index 0000000..71bb7fb --- /dev/null +++ b/Avalara/SDK/models/A1099/V2/w9_form_request.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara 1099 & W-9 API Definition + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class W9FormRequest(BaseModel): + """ + W9FormRequest + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="The form type (always \"w9\" for this model).") + name: Optional[StrictStr] = Field(default=None, description="The name of the individual or entity associated with the form.") + business_name: Optional[StrictStr] = Field(default=None, description="The name of the business associated with the form.", alias="businessName") + business_classification: Optional[StrictStr] = Field(default=None, description="The classification of the business.", alias="businessClassification") + business_other: Optional[StrictStr] = Field(default=None, description="The classification description when \"businessClassification\" is \"Other\".", alias="businessOther") + foreign_partner_owner_or_beneficiary: Optional[StrictBool] = Field(default=None, description="Indicates whether the individual is a foreign partner, owner, or beneficiary.", alias="foreignPartnerOwnerOrBeneficiary") + exempt_payee_code: Optional[StrictStr] = Field(default=None, description="The exempt payee code.", alias="exemptPayeeCode") + exempt_fatca_code: Optional[StrictStr] = Field(default=None, description="The exemption from FATCA reporting code.", alias="exemptFatcaCode") + foreign_country_indicator: Optional[StrictBool] = Field(default=None, description="Indicates whether the individual or entity is in a foreign country.", alias="foreignCountryIndicator") + address: Optional[StrictStr] = Field(default=None, description="The address of the individual or entity.") + foreign_address: Optional[StrictStr] = Field(default=None, description="The foreign address of the individual or entity.", alias="foreignAddress") + city: Optional[StrictStr] = Field(default=None, description="The city of the address.") + state: Optional[StrictStr] = Field(default=None, description="The state of the address.") + zip: Optional[StrictStr] = Field(default=None, description="The ZIP code of the address.") + account_number: Optional[StrictStr] = Field(default=None, description="The account number associated with the form.", alias="accountNumber") + tin_type: Optional[StrictStr] = Field(default=None, description="The type of TIN provided.", alias="tinType") + tin: Optional[StrictStr] = Field(default=None, description="The taxpayer identification number (TIN).") + backup_withholding: Optional[StrictBool] = Field(default=None, description="Indicates whether backup withholding applies.", alias="backupWithholding") + is1099able: Optional[StrictBool] = Field(default=None, description="Indicates whether the individual or entity should be issued a 1099 form.") + company_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated company.", alias="companyId") + reference_id: Optional[StrictStr] = Field(default=None, description="A reference identifier for the form.", alias="referenceId") + email: Optional[StrictStr] = Field(default=None, description="The email address of the individual associated with the form.") + e_delivery_consented_at: Optional[datetime] = Field(default=None, description="The date when e-delivery was consented.", alias="eDeliveryConsentedAt") + signature: Optional[StrictStr] = Field(default=None, description="The signature of the form.") + __properties: ClassVar[List[str]] = ["type", "companyId", "referenceId", "email", "eDeliveryConsentedAt", "signature"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9']): + raise ValueError("must be one of enum values ('W4', 'W8Ben', 'W8BenE', 'W8Imy', 'W9')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of W9FormRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if reference_id (nullable) is None + # and model_fields_set contains the field + if self.reference_id is None and "reference_id" in self.model_fields_set: + _dict['referenceId'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if e_delivery_consented_at (nullable) is None + # and model_fields_set contains the field + if self.e_delivery_consented_at is None and "e_delivery_consented_at" in self.model_fields_set: + _dict['eDeliveryConsentedAt'] = None + + # set to None if signature (nullable) is None + # and model_fields_set contains the field + if self.signature is None and "signature" in self.model_fields_set: + _dict['signature'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of W9FormRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "companyId": obj.get("companyId"), + "referenceId": obj.get("referenceId"), + "email": obj.get("email"), + "eDeliveryConsentedAt": obj.get("eDeliveryConsentedAt"), + "signature": obj.get("signature") + }) + return _obj + + diff --git a/Avalara/SDK/models/A1099/V2/w9_form_response.py b/Avalara/SDK/models/A1099/V2/w9_form_response.py index 4b482d6..d0702fd 100644 --- a/Avalara/SDK/models/A1099/V2/w9_form_response.py +++ b/Avalara/SDK/models/A1099/V2/w9_form_response.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/address.py b/Avalara/SDK/models/EInvoicing/V1/address.py new file mode 100644 index 0000000..2b6a518 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/address.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Address(BaseModel): + """ + Address + """ # noqa: E501 + line1: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="Address line 1") + line2: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="Address line 2") + city: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="City") + state: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="State") + country: Annotated[str, Field(strict=True, max_length=250)] = Field(description="Country (ISO 3166)") + postal_code: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="Postal code", alias="postalCode") + __properties: ClassVar[List[str]] = ["line1", "line2", "city", "state", "country", "postalCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Address from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Address from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "line1": obj.get("line1"), + "line2": obj.get("line2"), + "city": obj.get("city"), + "state": obj.get("state"), + "country": obj.get("country"), + "postalCode": obj.get("postalCode") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py b/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py index f6f97f5..b5df97e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/bad_download_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/bad_request.py b/Avalara/SDK/models/EInvoicing/V1/bad_request.py index 28b8f36..c0d23d0 100644 --- a/Avalara/SDK/models/EInvoicing/V1/bad_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/bad_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py b/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py new file mode 100644 index 0000000..e0936d2 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/batch_error_detail.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.EInvoicing.V1.validation_error import ValidationError +from typing import Optional, Set +from typing_extensions import Self + +class BatchErrorDetail(BaseModel): + """ + Represents detailed error information for an individual entry in a batch request. Includes the index of the failed item and associated validation errors. + """ # noqa: E501 + index: Optional[StrictInt] = Field(default=None, description="The index of the request that caused the error in the batch.") + validation_errors: Optional[List[ValidationError]] = Field(default=None, alias="validationErrors") + __properties: ClassVar[List[str]] = ["index", "validationErrors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BatchErrorDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in validation_errors (list) + _items = [] + if self.validation_errors: + for _item in self.validation_errors: + if _item: + _items.append(_item.to_dict()) + _dict['validationErrors'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BatchErrorDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "validationErrors": [ValidationError.from_dict(_item) for _item in obj["validationErrors"]] if obj.get("validationErrors") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search.py b/Avalara/SDK/models/EInvoicing/V1/batch_search.py index 8a35bc9..9b81bf7 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -42,7 +42,7 @@ class BatchSearch(BaseModel): """ - Provides details about a batch search operation, including status, timestamps, and potential errors. + Represents a single batch search operation """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="ID of the batch search") name: Optional[StrictStr] = Field(default=None, description="Name of the batch report") diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py b/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py index 2dc71d9..adcc009 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -41,11 +41,11 @@ class BatchSearchListResponse(BaseModel): """ - Schema for batch search list + Response schema for listing batch search details. """ # noqa: E501 - record_set_count: Optional[StrictInt] = Field(default=None, description="The count of records in the result set", alias="@recordSetCount") + record_set_count: Optional[StrictInt] = Field(default=None, description="The count of records in the result set.", alias="@recordSetCount") next_link: Optional[StrictStr] = Field(default=None, description="Next Link", alias="@nextLink") - value: Optional[List[BatchSearch]] = None + value: Optional[List[BatchSearch]] = Field(default=None, description="List of batch search records.") __properties: ClassVar[List[str]] = ["@recordSetCount", "@nextLink", "value"] model_config = ConfigDict( diff --git a/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py b/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py index f6c83ae..1ea774c 100644 --- a/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/batch_search_participants202_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py b/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py index 0fc6b8d..503fa86 100644 --- a/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/conditional_for_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/consents.py b/Avalara/SDK/models/EInvoicing/V1/consents.py new file mode 100644 index 0000000..b5e8168 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/consents.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Consents(BaseModel): + """ + Consents + """ # noqa: E501 + list_in_avalara_directory: Optional[StrictBool] = Field(default=True, description="Indicates whether the trading partner consents to being listed in the directory. If not provided in the payload, its value will default to true.", alias="listInAvalaraDirectory") + __properties: ClassVar[List[str]] = ["listInAvalaraDirectory"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Consents from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Consents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "listInAvalaraDirectory": obj.get("listInAvalaraDirectory") if obj.get("listInAvalaraDirectory") is not None else True + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py new file mode 100644 index 0000000..a3eb634 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partner201_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateTradingPartner201Response(BaseModel): + """ + CreateTradingPartner201Response + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Avalara unique ID of the participant in the directory.") + status: Optional[StrictStr] = Field(default=None, description="The status of the create operation.") + message: Optional[StrictStr] = Field(default=None, description="A human-readable message providing additional context or feedback about the outcome of the operation.") + __properties: ClassVar[List[str]] = ["id", "status", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTradingPartner201Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTradingPartner201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "message": obj.get("message") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py new file mode 100644 index 0000000..e3dab8f --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch200_response_value_inner import CreateTradingPartnersBatch200ResponseValueInner +from typing import Optional, Set +from typing_extensions import Self + +class CreateTradingPartnersBatch200Response(BaseModel): + """ + CreateTradingPartnersBatch200Response + """ # noqa: E501 + status: Optional[StrictStr] = None + message: Optional[StrictStr] = Field(default=None, description="A message indicating the result of the batch operation.") + value: Optional[List[CreateTradingPartnersBatch200ResponseValueInner]] = Field(default=None, description="A list of trading partners successfully created.") + __properties: ClassVar[List[str]] = ["status", "message", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatch200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in value (list) + _items = [] + if self.value: + for _item in self.value: + if _item: + _items.append(_item.to_dict()) + _dict['value'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatch200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "value": [CreateTradingPartnersBatch200ResponseValueInner.from_dict(_item) for _item in obj["value"]] if obj.get("value") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py new file mode 100644 index 0000000..2436e7c --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch200_response_value_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateTradingPartnersBatch200ResponseValueInner(BaseModel): + """ + CreateTradingPartnersBatch200ResponseValueInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the created trading partner.") + index: Optional[StrictInt] = Field(default=None, description="Index number of the trading partner.") + message: Optional[StrictStr] = Field(default=None, description="A success message for the specific created record.") + __properties: ClassVar[List[str]] = ["id", "index", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatch200ResponseValueInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatch200ResponseValueInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "index": obj.get("index"), + "message": obj.get("message") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py new file mode 100644 index 0000000..8dcc986 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/create_trading_partners_batch_request.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.EInvoicing.V1.trading_partner import TradingPartner +from typing import Optional, Set +from typing_extensions import Self + +class CreateTradingPartnersBatchRequest(BaseModel): + """ + CreateTradingPartnersBatchRequest + """ # noqa: E501 + value: Optional[List[TradingPartner]] = None + __properties: ClassVar[List[str]] = ["value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatchRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in value (list) + _items = [] + if self.value: + for _item in self.value: + if _item: + _items.append(_item.to_dict()) + _dict['value'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTradingPartnersBatchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": [TradingPartner.from_dict(_item) for _item in obj["value"]] if obj.get("value") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field.py index ce2edb5..b12c302 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py index fca2b5f..9ba52f4 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_not_used_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py index 6acf674..dac5bfb 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_optional_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py b/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py index 942a3a3..1d81e2e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_field_required_for.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py b/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py index 265f55e..0ce51bb 100644 --- a/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/data_input_fields_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class DataInputFieldsResponse(BaseModel): """ - Response model providing a list of input fields required, optional, or conditional for different country mandates. + DataInputFieldsResponse """ # noqa: E501 recordset_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total count of results", alias="@recordsetCount") next_link: Optional[StrictStr] = Field(default=None, alias="@nextLink") diff --git a/Avalara/SDK/models/EInvoicing/V1/document_fetch.py b/Avalara/SDK/models/EInvoicing/V1/document_fetch.py index 1dc78da..246fe9d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_fetch.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_fetch.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class DocumentFetch(BaseModel): """ - An object of the inbound document + DocumentFetch """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique ID for this document that can be used for status checking and file downloads. This is a UID created by the Avalara E-Invoicing platform.") status: Optional[StrictStr] = Field(default=None, description="Status of the document") diff --git a/Avalara/SDK/models/EInvoicing/V1/document_list_response.py b/Avalara/SDK/models/EInvoicing/V1/document_list_response.py index 4bb933a..a18384a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_status_response.py b/Avalara/SDK/models/EInvoicing/V1/document_status_response.py index ced314b..74a4cd2 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_status_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_status_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py b/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py index 576789f..416127b 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_submission_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py b/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py index 05cc2c6..063e55a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_submit_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/document_summary.py b/Avalara/SDK/models/EInvoicing/V1/document_summary.py index 38508ec..4210514 100644 --- a/Avalara/SDK/models/EInvoicing/V1/document_summary.py +++ b/Avalara/SDK/models/EInvoicing/V1/document_summary.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/error_response.py b/Avalara/SDK/models/EInvoicing/V1/error_response.py index f1c837e..8193d8d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/error_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/error_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class ErrorResponse(BaseModel): """ - Structure for reporting errors encountered during API operations, including title, status, and detailed message. + Standard format for API error responses. """ # noqa: E501 title: Optional[StrictStr] = None status: Optional[StrictStr] = None diff --git a/Avalara/SDK/models/EInvoicing/V1/event_id.py b/Avalara/SDK/models/EInvoicing/V1/event_id.py index e6b53bf..db2cd18 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_id.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_id.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_message.py b/Avalara/SDK/models/EInvoicing/V1/event_message.py index 425b87e..8650650 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_message.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_message.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_payload.py b/Avalara/SDK/models/EInvoicing/V1/event_payload.py index 9104639..1f09383 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_payload.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_payload.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/event_subscription.py b/Avalara/SDK/models/EInvoicing/V1/event_subscription.py index 5edc360..bfac531 100644 --- a/Avalara/SDK/models/EInvoicing/V1/event_subscription.py +++ b/Avalara/SDK/models/EInvoicing/V1/event_subscription.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/extension.py b/Avalara/SDK/models/EInvoicing/V1/extension.py new file mode 100644 index 0000000..bb8fcac --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/extension.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Extension(BaseModel): + """ + Extension + """ # noqa: E501 + key: Annotated[str, Field(strict=True, max_length=250)] = Field(description="Name of the custom attribute.") + values: List[StrictStr] = Field(description="Array of string values associated with the custom attribute.") + __properties: ClassVar[List[str]] = ["key", "values"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Extension from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Extension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "values": obj.get("values") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py index 36c1aab..5abfee2 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py index 01785f9..7f04c2d 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_data_inner.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py index 5a1f266..ba0e623 100644 --- a/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py +++ b/Avalara/SDK/models/EInvoicing/V1/fetch_documents_request_metadata.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py b/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py index 642c478..a565949 100644 --- a/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/forbidden_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py b/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py index 72d23a8..8dbda26 100644 --- a/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/hmac_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py b/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py index 9147f8f..0b54daa 100644 --- a/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/hmac_signature_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class HmacSignatureValue(BaseModel): """ - Contains the HMAC algorithm and the resulting signature value used for verifying message integrity. + HmacSignatureValue """ # noqa: E501 algorithm: StrictStr = Field(description="The algorithm used to create the signature.") value: StrictStr = Field(description="Signature of the message.") diff --git a/Avalara/SDK/models/EInvoicing/V1/id.py b/Avalara/SDK/models/EInvoicing/V1/id.py index 012663a..0f64e73 100644 --- a/Avalara/SDK/models/EInvoicing/V1/id.py +++ b/Avalara/SDK/models/EInvoicing/V1/id.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/identifier.py b/Avalara/SDK/models/EInvoicing/V1/identifier.py new file mode 100644 index 0000000..8c85705 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/identifier.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Identifier(BaseModel): + """ + Identifier + """ # noqa: E501 + name: Annotated[str, Field(strict=True, max_length=250)] = Field(description="Identifier name (e.g., Peppol Participant ID).") + display_name: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="Display name of the identifier.", alias="displayName") + value: Annotated[str, Field(strict=True, max_length=250)] = Field(description="Value of the identifier.") + __properties: ClassVar[List[str]] = ["name", "displayName", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Identifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Identifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "displayName": obj.get("displayName"), + "value": obj.get("value") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py b/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py index d6408d7..5f5b401 100644 --- a/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py +++ b/Avalara/SDK/models/EInvoicing/V1/input_data_formats.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py b/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py index 1b65331..c33e264 100644 --- a/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/internal_server_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate.py b/Avalara/SDK/models/EInvoicing/V1/mandate.py index 28a2ec1..69c7ae8 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -43,7 +43,7 @@ class Mandate(BaseModel): """ - An object representing the country mandate + Mandate """ # noqa: E501 mandate_id: Optional[StrictStr] = Field(default=None, description="The `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). Keep in mind the following when specifying a `mandateId`. - A country can have multiple mandate types (B2C, B2B, B2G). - A entity/company can opt in for multiple mandates. - A `mandateId` is the combination of country + mandate type + network/regulation.", alias="mandateId") country_mandate: Optional[StrictStr] = Field(default=None, description="**[LEGACY]** This field is retained for backward compatibility. It is recommended to use `mandateId` instead. The `countryMandate` similar to the `mandateId` is comprised of the country code, mandate type, and the network or regulation type (for example, AU-B2G-PEPPOL). ", alias="countryMandate") diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py index 6b659e8..f9b54d8 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py index 15d81ce..7f60c02 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandate_data_input_field_namespace.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/mandates_response.py b/Avalara/SDK/models/EInvoicing/V1/mandates_response.py index 23377b3..b9520d9 100644 --- a/Avalara/SDK/models/EInvoicing/V1/mandates_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/mandates_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/not_found_error.py b/Avalara/SDK/models/EInvoicing/V1/not_found_error.py index 8d4e917..d425ae6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/not_found_error.py +++ b/Avalara/SDK/models/EInvoicing/V1/not_found_error.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py b/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py index 6d8970d..5b93ff3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/not_used_for_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py b/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py index be9c1c6..a4373f3 100644 --- a/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py +++ b/Avalara/SDK/models/EInvoicing/V1/output_data_formats.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/pagination.py b/Avalara/SDK/models/EInvoicing/V1/pagination.py index df74c35..f94bafc 100644 --- a/Avalara/SDK/models/EInvoicing/V1/pagination.py +++ b/Avalara/SDK/models/EInvoicing/V1/pagination.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class Pagination(BaseModel): """ - Pagination information for the dataset. + Pagination """ # noqa: E501 recordset_count: Optional[StrictInt] = Field(default=None, description="The total count of records in the dataset.", alias="recordsetCount") next_link: Optional[StrictStr] = Field(default=None, description="The URL to the next page of results.", alias="@nextLink") diff --git a/Avalara/SDK/models/EInvoicing/V1/required_when_field.py b/Avalara/SDK/models/EInvoicing/V1/required_when_field.py index 70b5a84..ae87bb7 100644 --- a/Avalara/SDK/models/EInvoicing/V1/required_when_field.py +++ b/Avalara/SDK/models/EInvoicing/V1/required_when_field.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class RequiredWhenField(BaseModel): """ - Mandates for which this field is required + RequiredWhenField """ # noqa: E501 scenario: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["scenario"] diff --git a/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py b/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py new file mode 100644 index 0000000..b468ecb --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/search_participants200_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.EInvoicing.V1.trading_partner import TradingPartner +from typing import Optional, Set +from typing_extensions import Self + +class SearchParticipants200Response(BaseModel): + """ + SearchParticipants200Response + """ # noqa: E501 + record_set_count: Optional[StrictInt] = Field(default=None, description="The count of records in the result set.", alias="@recordSetCount") + next_link: Optional[StrictStr] = Field(default=None, description="The next page link to get the next set of results.", alias="@nextLink") + value: Optional[List[TradingPartner]] = None + __properties: ClassVar[List[str]] = ["@recordSetCount", "@nextLink", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchParticipants200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in value (list) + _items = [] + if self.value: + for _item in self.value: + if _item: + _items.append(_item.to_dict()) + _dict['value'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchParticipants200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "@recordSetCount": obj.get("@recordSetCount"), + "@nextLink": obj.get("@nextLink"), + "value": [TradingPartner.from_dict(_item) for _item in obj["value"]] if obj.get("value") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/signature.py b/Avalara/SDK/models/EInvoicing/V1/signature.py index 1c4a616..2a0cca6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -41,7 +41,7 @@ class Signature(BaseModel): """ - Defines the signature configuration, specifying whether and how messages are signed for webhook delivery. + Signature """ # noqa: E501 signature: SignatureSignature __properties: ClassVar[List[str]] = ["signature"] diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_signature.py b/Avalara/SDK/models/EInvoicing/V1/signature_signature.py index cfad422..ee05155 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_value.py b/Avalara/SDK/models/EInvoicing/V1/signature_value.py index 2a1f48b..90e8a94 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_value.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_value.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -41,7 +41,7 @@ class SignatureValue(BaseModel): """ - Includes the actual signature applied to a webhook message along with the algorithm used. + SignatureValue """ # noqa: E501 signature: SignatureValueSignature __properties: ClassVar[List[str]] = ["signature"] diff --git a/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py b/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py index 175b0b7..3df2e92 100644 --- a/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py +++ b/Avalara/SDK/models/EInvoicing/V1/signature_value_signature.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/status_event.py b/Avalara/SDK/models/EInvoicing/V1/status_event.py index cd717d7..87acbe6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/status_event.py +++ b/Avalara/SDK/models/EInvoicing/V1/status_event.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py b/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py index 6e6e122..1712a43 100644 --- a/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py +++ b/Avalara/SDK/models/EInvoicing/V1/submit_document_metadata.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py b/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py index b2d091c..dbebfad 100644 --- a/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/submit_interop_document202_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_common.py b/Avalara/SDK/models/EInvoicing/V1/subscription_common.py index 233dda6..1bb8d6a 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_common.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_common.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class SubscriptionCommon(BaseModel): """ - Basic configuration for a webhook subscription, including description and target notification URL. + SubscriptionCommon """ # noqa: E501 description: Optional[StrictStr] = Field(default=None, description="Description of the subscription") notification_url: StrictStr = Field(description="The URL of the webhook endpoint to which event messages will be delivered", alias="notificationUrl") diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py b/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py index 4d03c49..bd035f6 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_detail.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py b/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py index 8c12c88..8c2f93f 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_list_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py b/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py index afa983e..51e7463 100644 --- a/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py +++ b/Avalara/SDK/models/EInvoicing/V1/subscription_registration.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/success_response.py b/Avalara/SDK/models/EInvoicing/V1/success_response.py index 3b4a2de..2c0e42e 100644 --- a/Avalara/SDK/models/EInvoicing/V1/success_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/success_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ class SuccessResponse(BaseModel): """ - Indicates a successful outcome of an API operation, including a generated ID and success message. + SuccessResponse """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the new or updated entity.") message: Optional[StrictStr] = Field(default=None, description="Success message") diff --git a/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py b/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py new file mode 100644 index 0000000..6d17c53 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/supported_document_types.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from Avalara.SDK.models.EInvoicing.V1.extension import Extension +from typing import Optional, Set +from typing_extensions import Self + +class SupportedDocumentTypes(BaseModel): + """ + SupportedDocumentTypes + """ # noqa: E501 + name: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="Document type name.") + value: Annotated[str, Field(strict=True, max_length=500)] = Field(description="Document type value.") + supported_by_trading_partner: StrictBool = Field(description="Does trading partner support receiving this document type.", alias="supportedByTradingPartner") + supported_by_avalara: Optional[StrictBool] = Field(default=None, description="Does avalara support exchanging this document type.", alias="supportedByAvalara") + extensions: Optional[List[Extension]] = Field(default=None, description="Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error.") + __properties: ClassVar[List[str]] = ["name", "value", "supportedByTradingPartner", "supportedByAvalara", "extensions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SupportedDocumentTypes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in extensions (list) + _items = [] + if self.extensions: + for _item in self.extensions: + if _item: + _items.append(_item.to_dict()) + _dict['extensions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SupportedDocumentTypes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "value": obj.get("value"), + "supportedByTradingPartner": obj.get("supportedByTradingPartner"), + "supportedByAvalara": obj.get("supportedByAvalara"), + "extensions": [Extension.from_dict(_item) for _item in obj["extensions"]] if obj.get("extensions") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py new file mode 100644 index 0000000..e2ee4d7 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TaxIdentifierRequest(BaseModel): + """ + Represents a request to validate company’s tax identifier. + """ # noqa: E501 + country_code: Annotated[str, Field(min_length=2, strict=True, max_length=2)] = Field(description="The two-letter ISO-3166 country code of the tax identifier.", alias="countryCode") + identifier_type: Annotated[str, Field(strict=True, max_length=100)] = Field(description="Type of the identifier.", alias="identifierType") + identifier: Annotated[str, Field(strict=True, max_length=100)] = Field(description="The tax identifier of the company.") + extensions: Optional[Dict[str, Any]] = Field(default=None, description="Optional field for adding additional details required by specific tax authorities. Refer to the GET /tax-identifiers/schema API endpoint for the full request structure for a given country.") + __properties: ClassVar[List[str]] = ["countryCode", "identifierType", "identifier", "extensions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaxIdentifierRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaxIdentifierRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryCode": obj.get("countryCode"), + "identifierType": obj.get("identifierType"), + "identifier": obj.get("identifier"), + "extensions": obj.get("extensions") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py new file mode 100644 index 0000000..8bff471 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_response_value import TaxIdentifierResponseValue +from typing import Optional, Set +from typing_extensions import Self + +class TaxIdentifierResponse(BaseModel): + """ + Represents the response for a tax identifier validation request. + """ # noqa: E501 + country_code: StrictStr = Field(description="The two-letter ISO-3166 country code of the tax identifier.", alias="countryCode") + value: Optional[TaxIdentifierResponseValue] = None + __properties: ClassVar[List[str]] = ["countryCode", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaxIdentifierResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of value + if self.value: + _dict['value'] = self.value.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaxIdentifierResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryCode": obj.get("countryCode"), + "value": TaxIdentifierResponseValue.from_dict(obj["value"]) if obj.get("value") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py new file mode 100644 index 0000000..c2c40d2 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_response_value.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TaxIdentifierResponseValue(BaseModel): + """ + TaxIdentifierResponseValue + """ # noqa: E501 + identifier_type: Optional[StrictStr] = Field(default=None, description="Type of the identifier.", alias="identifierType") + identifier: Optional[StrictStr] = Field(default=None, description="The tax identifier of the company.") + extensions: Optional[Dict[str, Any]] = Field(default=None, description="Optional field containing additional company-related information such as companyName, companyAddress, blockListed, tradeName, and taxPayerType. It may also include other details specific to the given tax authority. Refer to the GET /tax-identifiers/schema API endpoint for the full response structure for a given country.") + __properties: ClassVar[List[str]] = ["identifierType", "identifier", "extensions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaxIdentifierResponseValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaxIdentifierResponseValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifierType": obj.get("identifierType"), + "identifier": obj.get("identifier"), + "extensions": obj.get("extensions") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py new file mode 100644 index 0000000..7fc4bf5 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/tax_identifier_schema_by_country200_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TaxIdentifierSchemaByCountry200Response(BaseModel): + """ + TaxIdentifierSchemaByCountry200Response + """ # noqa: E501 + country_code: StrictStr = Field(description="The two-letter ISO-3166 country code of the tax identifier.", alias="countryCode") + var_schema: Dict[str, Any] = Field(description="The JSON Schema definition, following Draft-07 specification, used to validate tax identifier data.", alias="schema") + __properties: ClassVar[List[str]] = ["countryCode", "schema"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TaxIdentifierSchemaByCountry200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TaxIdentifierSchemaByCountry200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryCode": obj.get("countryCode"), + "schema": obj.get("schema") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/trading_partner.py b/Avalara/SDK/models/EInvoicing/V1/trading_partner.py new file mode 100644 index 0000000..49989f2 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/trading_partner.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from Avalara.SDK.models.EInvoicing.V1.address import Address +from Avalara.SDK.models.EInvoicing.V1.consents import Consents +from Avalara.SDK.models.EInvoicing.V1.extension import Extension +from Avalara.SDK.models.EInvoicing.V1.identifier import Identifier +from Avalara.SDK.models.EInvoicing.V1.supported_document_types import SupportedDocumentTypes +from typing import Optional, Set +from typing_extensions import Self + +class TradingPartner(BaseModel): + """ + Represents a participant in the Avalara directory. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Avalara unique ID of the participant in the directory.") + name: Annotated[str, Field(min_length=3, strict=True, max_length=250)] = Field(description="Name of the participant (typically, the name of the business entity).") + network: Optional[StrictStr] = Field(default=None, description="The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored.") + registration_date: Optional[StrictStr] = Field(default=None, description="Registration date of the participant if available.", alias="registrationDate") + identifiers: Annotated[List[Identifier], Field(min_length=1)] = Field(description="A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained.") + addresses: Annotated[List[Address], Field(min_length=1)] + supported_document_types: Annotated[List[SupportedDocumentTypes], Field(min_length=1)] = Field(description="A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored.", alias="supportedDocumentTypes") + consents: Optional[Consents] = None + extensions: Optional[List[Extension]] = Field(default=None, description="Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error.") + __properties: ClassVar[List[str]] = ["id", "name", "network", "registrationDate", "identifiers", "addresses", "supportedDocumentTypes", "consents", "extensions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TradingPartner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "network", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in identifiers (list) + _items = [] + if self.identifiers: + for _item in self.identifiers: + if _item: + _items.append(_item.to_dict()) + _dict['identifiers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in addresses (list) + _items = [] + if self.addresses: + for _item in self.addresses: + if _item: + _items.append(_item.to_dict()) + _dict['addresses'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in supported_document_types (list) + _items = [] + if self.supported_document_types: + for _item in self.supported_document_types: + if _item: + _items.append(_item.to_dict()) + _dict['supportedDocumentTypes'] = _items + # override the default output from pydantic by calling `to_dict()` of consents + if self.consents: + _dict['consents'] = self.consents.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in extensions (list) + _items = [] + if self.extensions: + for _item in self.extensions: + if _item: + _items.append(_item.to_dict()) + _dict['extensions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TradingPartner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "network": obj.get("network"), + "registrationDate": obj.get("registrationDate"), + "identifiers": [Identifier.from_dict(_item) for _item in obj["identifiers"]] if obj.get("identifiers") is not None else None, + "addresses": [Address.from_dict(_item) for _item in obj["addresses"]] if obj.get("addresses") is not None else None, + "supportedDocumentTypes": [SupportedDocumentTypes.from_dict(_item) for _item in obj["supportedDocumentTypes"]] if obj.get("supportedDocumentTypes") is not None else None, + "consents": Consents.from_dict(obj["consents"]) if obj.get("consents") is not None else None, + "extensions": [Extension.from_dict(_item) for _item in obj["extensions"]] if obj.get("extensions") is not None else None + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py b/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py new file mode 100644 index 0000000..1c79e82 --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/update_trading_partner200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateTradingPartner200Response(BaseModel): + """ + UpdateTradingPartner200Response + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Avalara unique ID of the participant in the directory.") + status: Optional[StrictStr] = Field(default=None, description="The status of the create operation.") + message: Optional[StrictStr] = Field(default=None, description="A human-readable message providing additional context or feedback about the outcome of the operation.") + __properties: ClassVar[List[str]] = ["id", "status", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateTradingPartner200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateTradingPartner200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "message": obj.get("message") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/validation_error.py b/Avalara/SDK/models/EInvoicing/V1/validation_error.py new file mode 100644 index 0000000..6c4dcdc --- /dev/null +++ b/Avalara/SDK/models/EInvoicing/V1/validation_error.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" +AvaTax Software Development Kit for Python. + + Copyright 2022 Avalara, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Avalara E-Invoicing API + An API that supports sending data for an E-Invoicing compliance use-case. + +@author Sachin Baijal +@author Jonathan Wenger +@copyright 2022 Avalara, Inc. +@license https://www.apache.org/licenses/LICENSE-2.0 +@version 25.8.0 +@link https://github.com/avadev/AvaTax-REST-V3-Python-SDK +""" + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + Represents a specific validation failure within a request. + """ # noqa: E501 + var_field: Optional[StrictStr] = Field(default=None, description="The name of the field that failed validation.", alias="field") + message: Optional[StrictStr] = Field(default=None, description="A human-readable explanation of the error for the specific field.") + __properties: ClassVar[List[str]] = ["field", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py b/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py index 5b878df..c7a80f7 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhook_invocation.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py index b2fca7e..d211d14 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_info.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py index ad225a7..2f1f5ae 100644 --- a/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py +++ b/Avalara/SDK/models/EInvoicing/V1/webhooks_error_response.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -41,7 +41,7 @@ class WebhooksErrorResponse(BaseModel): """ - Wrapper for errors occurring during webhook subscription or delivery processing. + WebhooksErrorResponse """ # noqa: E501 error: Optional[WebhooksErrorInfo] = None __properties: ClassVar[List[str]] = ["error"] diff --git a/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py b/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py index 1f8c9bc..b6676c7 100644 --- a/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py +++ b/Avalara/SDK/models/EInvoicing/V1/workflow_ids.py @@ -24,7 +24,7 @@ @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ diff --git a/README.md b/README.md index 44cc686..81620e6 100644 --- a/README.md +++ b/README.md @@ -159,39 +159,45 @@ Class | Method | HTTP request | Description *SubscriptionsApi* | [**delete_webhook_subscription**](docs/EInvoicing/V1/SubscriptionsApi.md#delete_webhook_subscription) | **DELETE** /webhooks/subscriptions/{subscription-id} | Unsubscribe from events *SubscriptionsApi* | [**get_webhook_subscription**](docs/EInvoicing/V1/SubscriptionsApi.md#get_webhook_subscription) | **GET** /webhooks/subscriptions/{subscription-id} | Get details of a subscription *SubscriptionsApi* | [**list_webhook_subscriptions**](docs/EInvoicing/V1/SubscriptionsApi.md#list_webhook_subscriptions) | **GET** /webhooks/subscriptions | List all subscriptions -*TradingPartnersApi* | [**batch_search_participants**](docs/EInvoicing/V1/TradingPartnersApi.md#batch_search_participants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. -*TradingPartnersApi* | [**download_batch_search_report**](docs/EInvoicing/V1/TradingPartnersApi.md#download_batch_search_report) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. -*TradingPartnersApi* | [**get_batch_search_detail**](docs/EInvoicing/V1/TradingPartnersApi.md#get_batch_search_detail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. -*TradingPartnersApi* | [**list_batch_searches**](docs/EInvoicing/V1/TradingPartnersApi.md#list_batch_searches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +*TaxIdentifiersApi* | [**tax_identifier_schema_by_country**](docs/EInvoicing/V1/TaxIdentifiersApi.md#tax_identifier_schema_by_country) | **GET** /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. +*TaxIdentifiersApi* | [**validate_tax_identifier**](docs/EInvoicing/V1/TaxIdentifiersApi.md#validate_tax_identifier) | **POST** /tax-identifiers/validate | Validates a tax identifier. +*TradingPartnersApi* | [**batch_search_participants**](docs/EInvoicing/V1/TradingPartnersApi.md#batch_search_participants) | **POST** /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. +*TradingPartnersApi* | [**create_trading_partner**](docs/EInvoicing/V1/TradingPartnersApi.md#create_trading_partner) | **POST** /trading-partners | Creates a new trading partner. +*TradingPartnersApi* | [**create_trading_partners_batch**](docs/EInvoicing/V1/TradingPartnersApi.md#create_trading_partners_batch) | **POST** /trading-partners/batch | Creates a batch of multiple trading partners. +*TradingPartnersApi* | [**delete_trading_partner**](docs/EInvoicing/V1/TradingPartnersApi.md#delete_trading_partner) | **DELETE** /trading-partners/{id} | Deletes a trading partner using ID. +*TradingPartnersApi* | [**download_batch_search_report**](docs/EInvoicing/V1/TradingPartnersApi.md#download_batch_search_report) | **GET** /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. +*TradingPartnersApi* | [**get_batch_search_detail**](docs/EInvoicing/V1/TradingPartnersApi.md#get_batch_search_detail) | **GET** /trading-partners/batch-searches/{id} | Returns the batch search details using ID. +*TradingPartnersApi* | [**list_batch_searches**](docs/EInvoicing/V1/TradingPartnersApi.md#list_batch_searches) | **GET** /trading-partners/batch-searches | Lists all batch searches that were previously submitted. *TradingPartnersApi* | [**search_participants**](docs/EInvoicing/V1/TradingPartnersApi.md#search_participants) | **GET** /trading-partners | Returns a list of participants matching the input query. +*TradingPartnersApi* | [**update_trading_partner**](docs/EInvoicing/V1/TradingPartnersApi.md#update_trading_partner) | **PUT** /trading-partners/{id} | Updates a trading partner using ID. ### A1099 V2 API Documentation Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CompaniesW9Api* | [**create_company**](docs/A1099/V2/CompaniesW9Api.md#create_company) | **POST** /w9/companies | Creates a new company -*CompaniesW9Api* | [**delete_company**](docs/A1099/V2/CompaniesW9Api.md#delete_company) | **DELETE** /w9/companies/{id} | Deletes a company +*CompaniesW9Api* | [**create_company**](docs/A1099/V2/CompaniesW9Api.md#create_company) | **POST** /w9/companies | Create a company +*CompaniesW9Api* | [**delete_company**](docs/A1099/V2/CompaniesW9Api.md#delete_company) | **DELETE** /w9/companies/{id} | Delete a company *CompaniesW9Api* | [**get_companies**](docs/A1099/V2/CompaniesW9Api.md#get_companies) | **GET** /w9/companies | List companies *CompaniesW9Api* | [**get_company**](docs/A1099/V2/CompaniesW9Api.md#get_company) | **GET** /w9/companies/{id} | Retrieve a company *CompaniesW9Api* | [**update_company**](docs/A1099/V2/CompaniesW9Api.md#update_company) | **PUT** /w9/companies/{id} | Update a company -*Forms1099Api* | [**bulk_upsert1099_forms**](docs/A1099/V2/Forms1099Api.md#bulk_upsert1099_forms) | **POST** /1099/forms/$bulk-upsert | Creates or updates multiple 1099 forms. -*Forms1099Api* | [**create1099_form**](docs/A1099/V2/Forms1099Api.md#create1099_form) | **POST** /1099/forms | Creates a 1099 form. -*Forms1099Api* | [**delete1099_form**](docs/A1099/V2/Forms1099Api.md#delete1099_form) | **DELETE** /1099/forms/{id} | Deletes a 1099 form. -*Forms1099Api* | [**get1099_form**](docs/A1099/V2/Forms1099Api.md#get1099_form) | **GET** /1099/forms/{id} | Retrieves a 1099 form. -*Forms1099Api* | [**get1099_form_pdf**](docs/A1099/V2/Forms1099Api.md#get1099_form_pdf) | **GET** /1099/forms/{id}/pdf | Retrieves the PDF file for a single 1099 by form id. -*Forms1099Api* | [**list1099_forms**](docs/A1099/V2/Forms1099Api.md#list1099_forms) | **GET** /1099/forms | Retrieves a list of 1099 forms based on query parameters. -*Forms1099Api* | [**update1099_form**](docs/A1099/V2/Forms1099Api.md#update1099_form) | **PUT** /1099/forms/{id} | Updates a 1099 form. +*Forms1099Api* | [**bulk_upsert1099_forms**](docs/A1099/V2/Forms1099Api.md#bulk_upsert1099_forms) | **POST** /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms +*Forms1099Api* | [**create1099_form**](docs/A1099/V2/Forms1099Api.md#create1099_form) | **POST** /1099/forms | Create a 1099/1095/W2/1042S form +*Forms1099Api* | [**delete1099_form**](docs/A1099/V2/Forms1099Api.md#delete1099_form) | **DELETE** /1099/forms/{id} | Delete a 1099/1095/W2/1042S form +*Forms1099Api* | [**get1099_form**](docs/A1099/V2/Forms1099Api.md#get1099_form) | **GET** /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form +*Forms1099Api* | [**get1099_form_pdf**](docs/A1099/V2/Forms1099Api.md#get1099_form_pdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form +*Forms1099Api* | [**list1099_forms**](docs/A1099/V2/Forms1099Api.md#list1099_forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms +*Forms1099Api* | [**update1099_form**](docs/A1099/V2/Forms1099Api.md#update1099_form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form *FormsW9Api* | [**create_w9_form**](docs/A1099/V2/FormsW9Api.md#create_w9_form) | **POST** /w9/forms | Create a W9/W4/W8 form -*FormsW9Api* | [**delete_w9_form**](docs/A1099/V2/FormsW9Api.md#delete_w9_form) | **DELETE** /w9/forms/{id} | Delete a form +*FormsW9Api* | [**delete_w9_form**](docs/A1099/V2/FormsW9Api.md#delete_w9_form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form *FormsW9Api* | [**get_w9_form**](docs/A1099/V2/FormsW9Api.md#get_w9_form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form -*FormsW9Api* | [**list_w9_forms**](docs/A1099/V2/FormsW9Api.md#list_w9_forms) | **GET** /w9/forms | List W9/W4/W8 forms. -*FormsW9Api* | [**send_w9_form_email**](docs/A1099/V2/FormsW9Api.md#send_w9_form_email) | **POST** /w9/forms/{id}/$send-email | Sends a W9 email request to a vendor/payee +*FormsW9Api* | [**list_w9_forms**](docs/A1099/V2/FormsW9Api.md#list_w9_forms) | **GET** /w9/forms | List W9/W4/W8 forms +*FormsW9Api* | [**send_w9_form_email**](docs/A1099/V2/FormsW9Api.md#send_w9_form_email) | **POST** /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form *FormsW9Api* | [**update_w9_form**](docs/A1099/V2/FormsW9Api.md#update_w9_form) | **PUT** /w9/forms/{id} | Update a W9/W4/W8 form -*FormsW9Api* | [**upload_w9_files**](docs/A1099/V2/FormsW9Api.md#upload_w9_files) | **PUT** /w9/forms/{id}/attachment | Upload files for a W9/W4/W8 form +*FormsW9Api* | [**upload_w9_files**](docs/A1099/V2/FormsW9Api.md#upload_w9_files) | **POST** /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form *Issuers1099Api* | [**create_issuer**](docs/A1099/V2/Issuers1099Api.md#create_issuer) | **POST** /1099/issuers | Create an issuer *Issuers1099Api* | [**delete_issuer**](docs/A1099/V2/Issuers1099Api.md#delete_issuer) | **DELETE** /1099/issuers/{id} | Delete an issuer -*Issuers1099Api* | [**get_issuer**](docs/A1099/V2/Issuers1099Api.md#get_issuer) | **GET** /1099/issuers/{id} | Get an issuer +*Issuers1099Api* | [**get_issuer**](docs/A1099/V2/Issuers1099Api.md#get_issuer) | **GET** /1099/issuers/{id} | Retrieve an issuer *Issuers1099Api* | [**get_issuers**](docs/A1099/V2/Issuers1099Api.md#get_issuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**update_issuer**](docs/A1099/V2/Issuers1099Api.md#update_issuer) | **PUT** /1099/issuers/{id} | Update an issuer *Jobs1099Api* | [**get_job**](docs/A1099/V2/Jobs1099Api.md#get_job) | **GET** /1099/jobs/{id} | Retrieves information about the job @@ -202,22 +208,24 @@ Class | Method | HTTP request | Description ### EInvoicing V1 Model Documentation + - [Avalara.SDK.models.EInvoicing.V1.Address](docs/EInvoicing/V1/Address.md) - [Avalara.SDK.models.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - [Avalara.SDK.models.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara.SDK.models.EInvoicing.V1.BatchErrorDetail](docs/EInvoicing/V1/BatchErrorDetail.md) - [Avalara.SDK.models.EInvoicing.V1.BatchSearch](docs/EInvoicing/V1/BatchSearch.md) - [Avalara.SDK.models.EInvoicing.V1.BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) - [Avalara.SDK.models.EInvoicing.V1.BatchSearchParticipants202Response](docs/EInvoicing/V1/BatchSearchParticipants202Response.md) - [Avalara.SDK.models.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara.SDK.models.EInvoicing.V1.Consents](docs/EInvoicing/V1/Consents.md) + - [Avalara.SDK.models.EInvoicing.V1.CreateTradingPartner201Response](docs/EInvoicing/V1/CreateTradingPartner201Response.md) + - [Avalara.SDK.models.EInvoicing.V1.CreateTradingPartnersBatch200Response](docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md) + - [Avalara.SDK.models.EInvoicing.V1.CreateTradingPartnersBatch200ResponseValueInner](docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md) + - [Avalara.SDK.models.EInvoicing.V1.CreateTradingPartnersBatchRequest](docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md) - [Avalara.SDK.models.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) - [Avalara.SDK.models.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - [Avalara.SDK.models.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - [Avalara.SDK.models.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - [Avalara.SDK.models.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara.SDK.models.EInvoicing.V1.DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) - - [Avalara.SDK.models.EInvoicing.V1.DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) - - [Avalara.SDK.models.EInvoicing.V1.DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) - - [Avalara.SDK.models.EInvoicing.V1.DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) - - [Avalara.SDK.models.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) - [Avalara.SDK.models.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - [Avalara.SDK.models.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - [Avalara.SDK.models.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) @@ -229,6 +237,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.EInvoicing.V1.EventMessage](docs/EInvoicing/V1/EventMessage.md) - [Avalara.SDK.models.EInvoicing.V1.EventPayload](docs/EInvoicing/V1/EventPayload.md) - [Avalara.SDK.models.EInvoicing.V1.EventSubscription](docs/EInvoicing/V1/EventSubscription.md) + - [Avalara.SDK.models.EInvoicing.V1.Extension](docs/EInvoicing/V1/Extension.md) - [Avalara.SDK.models.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - [Avalara.SDK.models.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - [Avalara.SDK.models.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) @@ -236,6 +245,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.EInvoicing.V1.HmacSignature](docs/EInvoicing/V1/HmacSignature.md) - [Avalara.SDK.models.EInvoicing.V1.HmacSignatureValue](docs/EInvoicing/V1/HmacSignatureValue.md) - [Avalara.SDK.models.EInvoicing.V1.Id](docs/EInvoicing/V1/Id.md) + - [Avalara.SDK.models.EInvoicing.V1.Identifier](docs/EInvoicing/V1/Identifier.md) - [Avalara.SDK.models.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - [Avalara.SDK.models.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - [Avalara.SDK.models.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) @@ -247,6 +257,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.EInvoicing.V1.OutputDataFormats](docs/EInvoicing/V1/OutputDataFormats.md) - [Avalara.SDK.models.EInvoicing.V1.Pagination](docs/EInvoicing/V1/Pagination.md) - [Avalara.SDK.models.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara.SDK.models.EInvoicing.V1.SearchParticipants200Response](docs/EInvoicing/V1/SearchParticipants200Response.md) - [Avalara.SDK.models.EInvoicing.V1.Signature](docs/EInvoicing/V1/Signature.md) - [Avalara.SDK.models.EInvoicing.V1.SignatureSignature](docs/EInvoicing/V1/SignatureSignature.md) - [Avalara.SDK.models.EInvoicing.V1.SignatureValue](docs/EInvoicing/V1/SignatureValue.md) @@ -259,6 +270,14 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.EInvoicing.V1.SubscriptionListResponse](docs/EInvoicing/V1/SubscriptionListResponse.md) - [Avalara.SDK.models.EInvoicing.V1.SubscriptionRegistration](docs/EInvoicing/V1/SubscriptionRegistration.md) - [Avalara.SDK.models.EInvoicing.V1.SuccessResponse](docs/EInvoicing/V1/SuccessResponse.md) + - [Avalara.SDK.models.EInvoicing.V1.SupportedDocumentTypes](docs/EInvoicing/V1/SupportedDocumentTypes.md) + - [Avalara.SDK.models.EInvoicing.V1.TaxIdentifierRequest](docs/EInvoicing/V1/TaxIdentifierRequest.md) + - [Avalara.SDK.models.EInvoicing.V1.TaxIdentifierResponse](docs/EInvoicing/V1/TaxIdentifierResponse.md) + - [Avalara.SDK.models.EInvoicing.V1.TaxIdentifierResponseValue](docs/EInvoicing/V1/TaxIdentifierResponseValue.md) + - [Avalara.SDK.models.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response](docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md) + - [Avalara.SDK.models.EInvoicing.V1.TradingPartner](docs/EInvoicing/V1/TradingPartner.md) + - [Avalara.SDK.models.EInvoicing.V1.UpdateTradingPartner200Response](docs/EInvoicing/V1/UpdateTradingPartner200Response.md) + - [Avalara.SDK.models.EInvoicing.V1.ValidationError](docs/EInvoicing/V1/ValidationError.md) - [Avalara.SDK.models.EInvoicing.V1.WebhookInvocation](docs/EInvoicing/V1/WebhookInvocation.md) - [Avalara.SDK.models.EInvoicing.V1.WebhooksErrorInfo](docs/EInvoicing/V1/WebhooksErrorInfo.md) - [Avalara.SDK.models.EInvoicing.V1.WebhooksErrorResponse](docs/EInvoicing/V1/WebhooksErrorResponse.md) @@ -278,44 +297,53 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.A1099.V2.CompanyModel](docs/A1099/V2/CompanyModel.md) - [Avalara.SDK.models.A1099.V2.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - [Avalara.SDK.models.A1099.V2.CompanyResponseModel](docs/A1099/V2/CompanyResponseModel.md) - - [Avalara.SDK.models.A1099.V2.CoveredIndividualReference](docs/A1099/V2/CoveredIndividualReference.md) + - [Avalara.SDK.models.A1099.V2.CoveredIndividualReferenceResponse](docs/A1099/V2/CoveredIndividualReferenceResponse.md) - [Avalara.SDK.models.A1099.V2.CoveredIndividualRequest](docs/A1099/V2/CoveredIndividualRequest.md) + - [Avalara.SDK.models.A1099.V2.Create1099Form201Response](docs/A1099/V2/Create1099Form201Response.md) + - [Avalara.SDK.models.A1099.V2.CreateW9Form201Response](docs/A1099/V2/CreateW9Form201Response.md) + - [Avalara.SDK.models.A1099.V2.CreateW9FormRequest](docs/A1099/V2/CreateW9FormRequest.md) - [Avalara.SDK.models.A1099.V2.Data](docs/A1099/V2/Data.md) - [Avalara.SDK.models.A1099.V2.ErrorModel](docs/A1099/V2/ErrorModel.md) - [Avalara.SDK.models.A1099.V2.ErrorResponse](docs/A1099/V2/ErrorResponse.md) - [Avalara.SDK.models.A1099.V2.ErrorResponseErrorsInner](docs/A1099/V2/ErrorResponseErrorsInner.md) - - [Avalara.SDK.models.A1099.V2.Form1095B](docs/A1099/V2/Form1095B.md) + - [Avalara.SDK.models.A1099.V2.Form1042SList](docs/A1099/V2/Form1042SList.md) + - [Avalara.SDK.models.A1099.V2.Form1042SListItem](docs/A1099/V2/Form1042SListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1042SListItemResponse](docs/A1099/V2/Form1042SListItemResponse.md) + - [Avalara.SDK.models.A1099.V2.Form1042SRequest](docs/A1099/V2/Form1042SRequest.md) + - [Avalara.SDK.models.A1099.V2.Form1042SResponse](docs/A1099/V2/Form1042SResponse.md) - [Avalara.SDK.models.A1099.V2.Form1095BList](docs/A1099/V2/Form1095BList.md) - [Avalara.SDK.models.A1099.V2.Form1095BListItem](docs/A1099/V2/Form1095BListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1095BListItemResponse](docs/A1099/V2/Form1095BListItemResponse.md) - [Avalara.SDK.models.A1099.V2.Form1095BRequest](docs/A1099/V2/Form1095BRequest.md) - - [Avalara.SDK.models.A1099.V2.Form1099Base](docs/A1099/V2/Form1099Base.md) + - [Avalara.SDK.models.A1099.V2.Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099DivList](docs/A1099/V2/Form1099DivList.md) - [Avalara.SDK.models.A1099.V2.Form1099DivListItem](docs/A1099/V2/Form1099DivListItem.md) - [Avalara.SDK.models.A1099.V2.Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - [Avalara.SDK.models.A1099.V2.Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.md) - - [Avalara.SDK.models.A1099.V2.Form1099K](docs/A1099/V2/Form1099K.md) - [Avalara.SDK.models.A1099.V2.Form1099KList](docs/A1099/V2/Form1099KList.md) - [Avalara.SDK.models.A1099.V2.Form1099KListItem](docs/A1099/V2/Form1099KListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1099KListItemResponse](docs/A1099/V2/Form1099KListItemResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099KRequest](docs/A1099/V2/Form1099KRequest.md) - - [Avalara.SDK.models.A1099.V2.Form1099List](docs/A1099/V2/Form1099List.md) - - [Avalara.SDK.models.A1099.V2.Form1099Misc](docs/A1099/V2/Form1099Misc.md) + - [Avalara.SDK.models.A1099.V2.Form1099ListResponse](docs/A1099/V2/Form1099ListResponse.md) + - [Avalara.SDK.models.A1099.V2.Form1099ListResponseValueInner](docs/A1099/V2/Form1099ListResponseValueInner.md) - [Avalara.SDK.models.A1099.V2.Form1099MiscList](docs/A1099/V2/Form1099MiscList.md) - [Avalara.SDK.models.A1099.V2.Form1099MiscListItem](docs/A1099/V2/Form1099MiscListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1099MiscListItemResponse](docs/A1099/V2/Form1099MiscListItemResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099MiscRequest](docs/A1099/V2/Form1099MiscRequest.md) - [Avalara.SDK.models.A1099.V2.Form1099MiscResponse](docs/A1099/V2/Form1099MiscResponse.md) - - [Avalara.SDK.models.A1099.V2.Form1099Nec](docs/A1099/V2/Form1099Nec.md) - [Avalara.SDK.models.A1099.V2.Form1099NecList](docs/A1099/V2/Form1099NecList.md) - [Avalara.SDK.models.A1099.V2.Form1099NecListItem](docs/A1099/V2/Form1099NecListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1099NecListItemResponse](docs/A1099/V2/Form1099NecListItemResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099NecRequest](docs/A1099/V2/Form1099NecRequest.md) - [Avalara.SDK.models.A1099.V2.Form1099NecResponse](docs/A1099/V2/Form1099NecResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099ProccessResult](docs/A1099/V2/Form1099ProccessResult.md) - - [Avalara.SDK.models.A1099.V2.Form1099R](docs/A1099/V2/Form1099R.md) - [Avalara.SDK.models.A1099.V2.Form1099RList](docs/A1099/V2/Form1099RList.md) - [Avalara.SDK.models.A1099.V2.Form1099RListItem](docs/A1099/V2/Form1099RListItem.md) + - [Avalara.SDK.models.A1099.V2.Form1099RListItemResponse](docs/A1099/V2/Form1099RListItemResponse.md) - [Avalara.SDK.models.A1099.V2.Form1099RRequest](docs/A1099/V2/Form1099RRequest.md) - - [Avalara.SDK.models.A1099.V2.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) + - [Avalara.SDK.models.A1099.V2.Form1099StatusDetailResponse](docs/A1099/V2/Form1099StatusDetailResponse.md) - [Avalara.SDK.models.A1099.V2.FormRequestBase](docs/A1099/V2/FormRequestBase.md) - - [Avalara.SDK.models.A1099.V2.FormRequestCsvBase](docs/A1099/V2/FormRequestCsvBase.md) + - [Avalara.SDK.models.A1099.V2.FormRequestListItemBase](docs/A1099/V2/FormRequestListItemBase.md) - [Avalara.SDK.models.A1099.V2.FormResponseBase](docs/A1099/V2/FormResponseBase.md) - [Avalara.SDK.models.A1099.V2.FormSingleRequestBase](docs/A1099/V2/FormSingleRequestBase.md) - [Avalara.SDK.models.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) @@ -323,7 +351,9 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.A1099.V2.ICreateForm1099Request](docs/A1099/V2/ICreateForm1099Request.md) - [Avalara.SDK.models.A1099.V2.IUpdateForm1099Request](docs/A1099/V2/IUpdateForm1099Request.md) - [Avalara.SDK.models.A1099.V2.IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) - - [Avalara.SDK.models.A1099.V2.IncludedBase](docs/A1099/V2/IncludedBase.md) + - [Avalara.SDK.models.A1099.V2.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) + - [Avalara.SDK.models.A1099.V2.IntermediaryOrFlowThroughRequest](docs/A1099/V2/IntermediaryOrFlowThroughRequest.md) + - [Avalara.SDK.models.A1099.V2.IntermediaryOrFlowThroughResponse](docs/A1099/V2/IntermediaryOrFlowThroughResponse.md) - [Avalara.SDK.models.A1099.V2.IssuerCommand](docs/A1099/V2/IssuerCommand.md) - [Avalara.SDK.models.A1099.V2.IssuerResponse](docs/A1099/V2/IssuerResponse.md) - [Avalara.SDK.models.A1099.V2.JobResult](docs/A1099/V2/JobResult.md) @@ -332,26 +362,33 @@ Class | Method | HTTP request | Description - [Avalara.SDK.models.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) - [Avalara.SDK.models.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - [Avalara.SDK.models.A1099.V2.PaginatedW9FormsModel](docs/A1099/V2/PaginatedW9FormsModel.md) + - [Avalara.SDK.models.A1099.V2.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) + - [Avalara.SDK.models.A1099.V2.PrimaryWithholdingAgentRequest](docs/A1099/V2/PrimaryWithholdingAgentRequest.md) + - [Avalara.SDK.models.A1099.V2.PrimaryWithholdingAgentResponse](docs/A1099/V2/PrimaryWithholdingAgentResponse.md) - [Avalara.SDK.models.A1099.V2.ProblemDetails](docs/A1099/V2/ProblemDetails.md) - - [Avalara.SDK.models.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [Avalara.SDK.models.A1099.V2.StateAndLocalWithholdingRequest](docs/A1099/V2/StateAndLocalWithholdingRequest.md) - [Avalara.SDK.models.A1099.V2.StateAndLocalWithholdingResponse](docs/A1099/V2/StateAndLocalWithholdingResponse.md) - - [Avalara.SDK.models.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - - [Avalara.SDK.models.A1099.V2.StateEfileStatusDetailApp](docs/A1099/V2/StateEfileStatusDetailApp.md) + - [Avalara.SDK.models.A1099.V2.StateEfileStatusDetailResponse](docs/A1099/V2/StateEfileStatusDetailResponse.md) - [Avalara.SDK.models.A1099.V2.StatusDetail](docs/A1099/V2/StatusDetail.md) + - [Avalara.SDK.models.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) - [Avalara.SDK.models.A1099.V2.SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) - [Avalara.SDK.models.A1099.V2.Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) - - [Avalara.SDK.models.A1099.V2.ValidationError](docs/A1099/V2/ValidationError.md) - - [Avalara.SDK.models.A1099.V2.ValidationErrorApp](docs/A1099/V2/ValidationErrorApp.md) + - [Avalara.SDK.models.A1099.V2.ValidationErrorResponse](docs/A1099/V2/ValidationErrorResponse.md) - [Avalara.SDK.models.A1099.V2.W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) + - [Avalara.SDK.models.A1099.V2.W4FormRequest](docs/A1099/V2/W4FormRequest.md) - [Avalara.SDK.models.A1099.V2.W4FormResponse](docs/A1099/V2/W4FormResponse.md) + - [Avalara.SDK.models.A1099.V2.W8BenEFormRequest](docs/A1099/V2/W8BenEFormRequest.md) - [Avalara.SDK.models.A1099.V2.W8BenEFormResponse](docs/A1099/V2/W8BenEFormResponse.md) - [Avalara.SDK.models.A1099.V2.W8BenESubstantialUsOwnerDataModel](docs/A1099/V2/W8BenESubstantialUsOwnerDataModel.md) - [Avalara.SDK.models.A1099.V2.W8BenFormDataModel](docs/A1099/V2/W8BenFormDataModel.md) + - [Avalara.SDK.models.A1099.V2.W8BenFormRequest](docs/A1099/V2/W8BenFormRequest.md) - [Avalara.SDK.models.A1099.V2.W8BenFormResponse](docs/A1099/V2/W8BenFormResponse.md) - [Avalara.SDK.models.A1099.V2.W8BeneFormDataModel](docs/A1099/V2/W8BeneFormDataModel.md) - [Avalara.SDK.models.A1099.V2.W8ImyFormDataModel](docs/A1099/V2/W8ImyFormDataModel.md) + - [Avalara.SDK.models.A1099.V2.W8ImyFormRequest](docs/A1099/V2/W8ImyFormRequest.md) - [Avalara.SDK.models.A1099.V2.W8ImyFormResponse](docs/A1099/V2/W8ImyFormResponse.md) + - [Avalara.SDK.models.A1099.V2.W9FormBaseRequest](docs/A1099/V2/W9FormBaseRequest.md) - [Avalara.SDK.models.A1099.V2.W9FormBaseResponse](docs/A1099/V2/W9FormBaseResponse.md) - [Avalara.SDK.models.A1099.V2.W9FormDataModel](docs/A1099/V2/W9FormDataModel.md) + - [Avalara.SDK.models.A1099.V2.W9FormRequest](docs/A1099/V2/W9FormRequest.md) - [Avalara.SDK.models.A1099.V2.W9FormResponse](docs/A1099/V2/W9FormResponse.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index cbad063..37c5fc6 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -4,8 +4,8 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_company**](CompaniesW9Api.md#create_company) | **POST** /w9/companies | Creates a new company -[**delete_company**](CompaniesW9Api.md#delete_company) | **DELETE** /w9/companies/{id} | Deletes a company +[**create_company**](CompaniesW9Api.md#create_company) | **POST** /w9/companies | Create a company +[**delete_company**](CompaniesW9Api.md#delete_company) | **DELETE** /w9/companies/{id} | Delete a company [**get_companies**](CompaniesW9Api.md#get_companies) | **GET** /w9/companies | List companies [**get_company**](CompaniesW9Api.md#get_company) | **GET** /w9/companies/{id} | Retrieve a company [**update_company**](CompaniesW9Api.md#update_company) | **PUT** /w9/companies/{id} | Update a company @@ -14,9 +14,9 @@ Method | HTTP request | Description # **create_company** > CompanyResponseModel create_company(avalara_version) -Creates a new company +Create a company -Creates a new company +Create a company. ### Example @@ -44,13 +44,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) - avalara_version = '2.0' # str | API version - x_correlation_id = 'd0e29cf5-55bc-44e6-9894-3e1cd2923e5a' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'fe0b2c61-3b02-476a-ab45-cffe1b04e41a' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) company_create_update_request_model = Avalara.SDK.CompanyCreateUpdateRequestModel() # CompanyCreateUpdateRequestModel | The company to create (optional) # example passing only required values which don't have defaults set try: - # Creates a new company + # Create a company api_response = api_instance.create_company(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -59,7 +59,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Creates a new company + # Create a company api_response = api_instance.create_company(avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, company_create_update_request_model=company_create_update_request_model) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -102,9 +102,9 @@ Name | Type | Description | Notes # **delete_company** > delete_company(id, avalara_version) -Deletes a company +Delete a company -Deletes a company +Delete a company. ### Example @@ -131,12 +131,12 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | The company to delete - avalara_version = '2.0' # str | API version - x_correlation_id = '713ec82b-b94e-4e2f-8b82-0cecc0abb124' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '250cdf61-a491-4fce-9544-33316d95a0a2' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Deletes a company + # Delete a company api_instance.delete_company(id, avalara_version) except Avalara.SDK.ApiException as e: print("Exception when calling CompaniesW9Api->delete_company: %s\n" % e) @@ -144,7 +144,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Deletes a company + # Delete a company api_instance.delete_company(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) except Avalara.SDK.ApiException as e: print("Exception when calling CompaniesW9Api->delete_company: %s\n" % e) @@ -217,14 +217,14 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) - avalara_version = '2.0' # str | API version + avalara_version = '2.0.0' # str | API version filter = 'filter_example' # str | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) top = 56 # int | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) skip = 56 # int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '38d61b75-2ccf-4a20-8fc0-6fc047805ec3' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '9bc362f8-548a-4a98-b44b-37da159b8126' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -289,7 +289,7 @@ Name | Type | Description | Notes Retrieve a company -Retrieve an existing company +Retrieve a company. ### Example @@ -317,8 +317,8 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | Id of the company - avalara_version = '2.0' # str | API version - x_correlation_id = 'dccf03ba-f1c1-4540-a0ab-3a642cb46223' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '1c9d767c-523c-42c5-bbcb-5158761b48a0' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -378,7 +378,7 @@ Name | Type | Description | Notes Update a company -Update a company +Update a company. ### Example @@ -407,8 +407,8 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = companies_w9_api.CompaniesW9Api(api_client) id = 'id_example' # str | The ID of the company to update - avalara_version = '2.0' # str | API version - x_correlation_id = 'e5197be7-4ab7-4f90-a190-c0a491ebb8e1' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '03774e95-4208-4f91-a5c8-e218fcb3c0a4' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) company_create_update_request_model = Avalara.SDK.CompanyCreateUpdateRequestModel() # CompanyCreateUpdateRequestModel | The updated company data (optional) # example passing only required values which don't have defaults set diff --git a/docs/A1099/V2/CoveredIndividualReferenceResponse.md b/docs/A1099/V2/CoveredIndividualReferenceResponse.md new file mode 100644 index 0000000..48da350 --- /dev/null +++ b/docs/A1099/V2/CoveredIndividualReferenceResponse.md @@ -0,0 +1,48 @@ +# CoveredIndividualReferenceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Covered individual ID | [optional] +**first_name** | **str** | Covered individual's first name | [optional] +**middle_name** | **str** | Covered individual's middle name | [optional] +**last_name** | **str** | Covered individual's last name | [optional] +**name_suffix** | **str** | Covered individual's name suffix | [optional] +**tin** | **str** | Covered individual's TIN (SSN or ITIN) | [optional] +**birth_date** | **datetime** | Covered individual's date of birth | [optional] +**covered_month0** | **bool** | Coverage indicator for all 12 months | [optional] +**covered_month1** | **bool** | Coverage indicator for January | [optional] +**covered_month2** | **bool** | Coverage indicator for February | [optional] +**covered_month3** | **bool** | Coverage indicator for March | [optional] +**covered_month4** | **bool** | Coverage indicator for April | [optional] +**covered_month5** | **bool** | Coverage indicator for May | [optional] +**covered_month6** | **bool** | Coverage indicator for June | [optional] +**covered_month7** | **bool** | Coverage indicator for July | [optional] +**covered_month8** | **bool** | Coverage indicator for August | [optional] +**covered_month9** | **bool** | Coverage indicator for September | [optional] +**covered_month10** | **bool** | Coverage indicator for October | [optional] +**covered_month11** | **bool** | Coverage indicator for November | [optional] +**covered_month12** | **bool** | Coverage indicator for December | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.covered_individual_reference_response import CoveredIndividualReferenceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CoveredIndividualReferenceResponse from a JSON string +covered_individual_reference_response_instance = CoveredIndividualReferenceResponse.from_json(json) +# print the JSON string representation of the object +print(CoveredIndividualReferenceResponse.to_json()) + +# convert the object into a dict +covered_individual_reference_response_dict = covered_individual_reference_response_instance.to_dict() +# create an instance of CoveredIndividualReferenceResponse from a dict +covered_individual_reference_response_from_dict = CoveredIndividualReferenceResponse.from_dict(covered_individual_reference_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/CoveredIndividualRequest.md b/docs/A1099/V2/CoveredIndividualRequest.md index 3c9cff1..4d9f201 100644 --- a/docs/A1099/V2/CoveredIndividualRequest.md +++ b/docs/A1099/V2/CoveredIndividualRequest.md @@ -5,25 +5,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**first_name** | **str** | | [optional] -**middle_name** | **str** | | [optional] -**last_name** | **str** | | [optional] -**name_suffix** | **str** | | [optional] -**tin** | **str** | | [optional] -**birth_date** | **datetime** | | [optional] -**covered_month_indicator0** | **bool** | | [optional] -**covered_month_indicator1** | **bool** | | [optional] -**covered_month_indicator2** | **bool** | | [optional] -**covered_month_indicator3** | **bool** | | [optional] -**covered_month_indicator4** | **bool** | | [optional] -**covered_month_indicator5** | **bool** | | [optional] -**covered_month_indicator6** | **bool** | | [optional] -**covered_month_indicator7** | **bool** | | [optional] -**covered_month_indicator8** | **bool** | | [optional] -**covered_month_indicator9** | **bool** | | [optional] -**covered_month_indicator10** | **bool** | | [optional] -**covered_month_indicator11** | **bool** | | [optional] -**covered_month_indicator12** | **bool** | | [optional] +**first_name** | **str** | Covered individual's first name | [optional] +**middle_name** | **str** | Covered individual's middle name | [optional] +**last_name** | **str** | Covered individual's last name | [optional] +**name_suffix** | **str** | Covered individual's name suffix | [optional] +**tin** | **str** | Covered individual's TIN (SSN or ITIN) | [optional] +**birth_date** | **datetime** | Covered individual's date of birth | [optional] +**covered_month_indicator0** | **bool** | Coverage indicator for all 12 months | [optional] +**covered_month_indicator1** | **bool** | Coverage indicator for January | [optional] +**covered_month_indicator2** | **bool** | Coverage indicator for February | [optional] +**covered_month_indicator3** | **bool** | Coverage indicator for March | [optional] +**covered_month_indicator4** | **bool** | Coverage indicator for April | [optional] +**covered_month_indicator5** | **bool** | Coverage indicator for May | [optional] +**covered_month_indicator6** | **bool** | Coverage indicator for June | [optional] +**covered_month_indicator7** | **bool** | Coverage indicator for July | [optional] +**covered_month_indicator8** | **bool** | Coverage indicator for August | [optional] +**covered_month_indicator9** | **bool** | Coverage indicator for September | [optional] +**covered_month_indicator10** | **bool** | Coverage indicator for October | [optional] +**covered_month_indicator11** | **bool** | Coverage indicator for November | [optional] +**covered_month_indicator12** | **bool** | Coverage indicator for December | [optional] ## Example diff --git a/docs/A1099/V2/Create1099Form201Response.md b/docs/A1099/V2/Create1099Form201Response.md new file mode 100644 index 0000000..5afa5bc --- /dev/null +++ b/docs/A1099/V2/Create1099Form201Response.md @@ -0,0 +1,140 @@ +# Create1099Form201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualReferenceResponse]**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] +**filer_type** | **str** | Filer type (PSE or EPF) | [optional] +**payment_type** | **str** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_and_health_care** | **float** | Medical and health care payments | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**excess_golden_parachute** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**gross_amount_paid_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**section409_a_income** | **float** | Nonqualified deferred compensation | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | [optional] +**gross_distributions** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_indicator** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**employee_contributions** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code_required** | **str** | Distribution code | [optional] +**distribution_code_optional** | **str** | Second distribution code | [optional] +**ira_sep_simple_indicator** | **bool** | IRA/SEP/SIMPLE | [optional] +**total_ira_sep_simple_distribution** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other** | **float** | Other amount | [optional] +**other_percent** | **str** | Other percentage | [optional] +**percentage_total_distribution** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_designated_roth_contrib** | **str** | First year of designated Roth contribution | [optional] +**fatca_requirement_indicator** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **str** | Date of payment | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.create1099_form201_response import Create1099Form201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Create1099Form201Response from a JSON string +create1099_form201_response_instance = Create1099Form201Response.from_json(json) +# print the JSON string representation of the object +print(Create1099Form201Response.to_json()) + +# convert the object into a dict +create1099_form201_response_dict = create1099_form201_response_instance.to_dict() +# create an instance of Create1099Form201Response from a dict +create1099_form201_response_from_dict = Create1099Form201Response.from_dict(create1099_form201_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md new file mode 100644 index 0000000..9f6fbc8 --- /dev/null +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -0,0 +1,207 @@ +# CreateW9Form201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_first_name** | **str** | The first name of the employee. | [optional] +**employee_middle_name** | **str** | The middle name of the employee. | [optional] +**employee_last_name** | **str** | The last name of the employee. | [optional] +**employee_name_suffix** | **str** | The name suffix of the employee. | [optional] +**tin_type** | **str** | The type of TIN provided. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**address** | **str** | The address of the individual or entity. | [optional] +**city** | **str** | The city of the address. | [optional] +**state** | **str** | The state of the address. | [optional] +**zip** | **str** | The ZIP code of the address. | [optional] +**marital_status** | **str** | The marital status of the employee. | [optional] +**last_name_differs** | **bool** | Indicates whether the last name differs from prior records. | [optional] +**num_allowances** | **int** | The number of allowances claimed by the employee. | [optional] +**other_dependents** | **int** | The number of dependents other than allowances. | [optional] +**non_job_income** | **float** | The amount of non-job income. | [optional] +**deductions** | **float** | The amount of deductions claimed. | [optional] +**additional_withheld** | **float** | The additional amount withheld. | [optional] +**exempt_from_withholding** | **bool** | Indicates whether the employee is exempt from withholding. | [optional] +**office_code** | **str** | The office code associated with the form. | [optional] +**id** | **str** | The unique identifier for the form. | [optional] +**type** | **str** | The form type. | [optional] +**entry_status** | **str** | The form status. | [optional] +**entry_status_date** | **datetime** | The timestamp for the latest status update. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**display_name** | **str** | The display name associated with the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**archived** | **bool** | Indicates whether the form is archived. | [optional] +**signature** | **str** | The signature of the form. | [optional] +**signed_date** | **datetime** | The date the form was signed. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**created_at** | **datetime** | The creation date of the form. | [optional] +**updated_at** | **datetime** | The last updated date of the form. | [optional] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**citizenship_country** | **str** | The country of citizenship. | [optional] +**disregarded_entity** | **str** | The name of the disregarded entity receiving the payment (if applicable). | [optional] +**entity_type** | **str** | The entity type. | [optional] +**making_treaty_claim** | **bool** | Indicates whether the entity is making a treaty claim. | [optional] +**fatca_status** | **str** | The FATCA status. | [optional] +**residence_address** | **str** | The residential address of the individual or entity. | [optional] +**residence_city** | **str** | The city of residence. | [optional] +**residence_state** | **str** | The state of residence. | [optional] +**residence_zip** | **str** | The ZIP code of the residence. | [optional] +**residence_country** | **str** | The country of residence. | [optional] +**residence_is_mailing** | **bool** | Indicates whether the residence address is also the mailing address. | [optional] +**mailing_address** | **str** | The mailing address. | [optional] +**mailing_city** | **str** | The city of the mailing address. | [optional] +**mailing_state** | **str** | The state of the mailing address. | [optional] +**mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] +**mailing_country** | **str** | The country of the mailing address. | [optional] +**giin** | **str** | The global intermediary identification number (GIIN). | [optional] +**foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] +**foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] +**reference_number** | **str** | A reference number for the form. | [optional] +**disregarded_entity_fatca_status** | **str** | The FATCA status of disregarded entity or branch receiving payment. | [optional] +**disregarded_address** | **str** | The address for disregarded entities. | [optional] +**disregarded_city** | **str** | The city for disregarded entities. | [optional] +**disregarded_state** | **str** | The state for disregarded entities. | [optional] +**disregarded_zip** | **str** | The ZIP code for disregarded entities. | [optional] +**disregarded_country** | **str** | The country for disregarded entities. | [optional] +**disregarded_entity_giin** | **str** | The GIIN for disregarded entities. | [optional] +**treaty_country_certification** | **bool** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] +**treaty_country** | **str** | The country for which the treaty applies. | [optional] +**benefit_limitation_certification** | **bool** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] +**benefit_limitation** | **str** | The benefit limitation for tax treaty claims. | [optional] +**qualified_resident_status_certification** | **bool** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] +**treaty_article** | **str** | The specific article of the treaty being claimed. | [optional] +**withholding_rate** | **str** | The withholding rate applied as per the treaty. | [optional] +**income_type** | **str** | The type of income covered by the treaty. | [optional] +**treaty_reasons** | **str** | The reasons for claiming treaty benefits. | [optional] +**ffi_sponsoring_entity** | **str** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] +**investment_entity_certification** | **bool** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] +**controlled_foreign_corporation_certification** | **bool** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] +**compliant_nonregistering_local_bank_certification** | **bool** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] +**compliant_ffi_low_value_accounts_certification** | **bool** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] +**sponsored_closely_held_entity_sponsoring_entity** | **str** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] +**sponsored_closely_held_investment_vehicle_certification** | **bool** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] +**compliant_limited_life_debt_entity_certification** | **bool** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] +**investment_entity_no_financial_accounts_certification** | **bool** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] +**owner_documented_ffi_certification** | **bool** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] +**owner_documented_ffi_reporting_statement_certification** | **bool** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] +**owner_documented_ffi_auditor_letter_certification** | **bool** | Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. | [optional] +**owner_documented_ffi_trust_beneficiaries_certification** | **bool** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] +**restricted_distributor_certification** | **bool** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] +**restricted_distributor_agreement_certification** | **bool** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] +**restricted_distributor_preexisting_sales_compliance_certification** | **bool** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] +**nonreporting_iga_ffi_certification** | **bool** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] +**iga_country** | **str** | The country for the applicable IGA with the United States. | [optional] +**iga_model** | **str** | The applicable IGA model. | [optional] +**iga_legal_status_treatment** | **str** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] +**iga_ffi_trustee_or_sponsor** | **str** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] +**iga_ffi_trustee_is_foreign** | **bool** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] +**non_commercial_financial_activity_certification** | **bool** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] +**internation_organization_certification** | **bool** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] +**intergovernmental_organization_certification** | **bool** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] +**treaty_qualified_pension_fund_certification** | **bool** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] +**qualified_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] +**narrow_participation_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] +**section401_a_equivalent_pension_plan_certification** | **bool** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] +**investment_entity_for_retirement_funds_certification** | **bool** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] +**exempt_beneficial_owner_sponsored_retirement_fund_certification** | **bool** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] +**exempt_beneficial_owner_owned_investment_entity_certification** | **bool** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] +**territory_financial_institution_certification** | **bool** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] +**excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] +**excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**section501_c_organization_certification** | **bool** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] +**determination_letter_date** | **date** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] +**nonprofit_organization_certification** | **bool** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] +**publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] +**publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] +**nffe_affiliate_of_publicly_traded_entity_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] +**publicly_traded_entity** | **str** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] +**nffe_affiliate_of_publicly_traded_entity_securities_market** | **str** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] +**excepted_territory_nffe_certification** | **bool** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] +**active_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] +**passive_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] +**passive_nffe_no_substantial_us_owners_certification** | **bool** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] +**passive_nffe_substantial_us_owners_provided_certification** | **bool** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] +**excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] +**sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] +**direct_reporting_nffe_sponsoring_entity** | **str** | The name of the entity that sponsors the direct reporting NFFE. | [optional] +**substantial_us_owners** | [**List[SubstantialUsOwnerResponse]**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**signer_name** | **str** | The name of the signer. | [optional] +**capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] +**birthday** | **date** | The birthday of the individual associated with the form. | [optional] +**signer_capacity** | **str** | The capacity in which the signer is signing the form. | [optional] +**qualified_intermediary_certification** | **bool** | Certifies that the entity is a Qualified Intermediary (QI) acting in accordance with its QI Agreement, providing required withholding statements and documentation for relevant tax withholding purposes. | [optional] +**qi_primary_withholding_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] +**qi_withholding_responsibility_for_ptp_sales_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] +**qi_nominee_withholding_responsibility_for_ptp_distributions_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] +**qi_securities_lender_substitute_dividend_withholding_certification** | **bool** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**qi_withholding_and1099_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] +**qi_form1099_or_fatca_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] +**qi_opt_out_of_form1099_reporting_certification** | **bool** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] +**qi_withholding_rate_pool_certification** | **bool** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] +**qi_intermediary_or_flow_through_entity_documentation_certification** | **bool** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] +**qualified_derivatives_dealer_certification** | **bool** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] +**qdd_corporation** | **bool** | Indicates QDD classification is Corporation. | [optional] +**qdd_partnership** | **bool** | Indicates QDD classification is Partnership. | [optional] +**qdd_disregarded_entity** | **bool** | Indicates QDD classification is Disregarded Entity. | [optional] +**nonqualified_intermediary_certification** | **bool** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] +**nqi_withholding_statement_transmission_certification** | **bool** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] +**nqi_withholding_rate_pool_compliance_certification** | **bool** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] +**nqi_qualified_securities_lender_certification** | **bool** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**nqi_alternative_withholding_statement_verification_certification** | **bool** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] +**tfi_treated_as_us_person_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] +**tfi_withholding_statement_transmission_certification** | **bool** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] +**tfi_treated_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] +**tfi_nominee_us_person_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] +**tfi_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] +**us_branch_non_effectively_connected_income_certification** | **bool** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] +**us_branch_agreement_to_be_treated_as_us_person_certification** | **bool** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] +**us_branch_withholding_statement_and_compliance_certification** | **bool** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] +**us_branch_acting_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] +**us_branch_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] +**us_branch_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] +**withholding_foreign_partnership_or_trust_certification** | **bool** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] +**nonwithholding_foreign_entity_withholding_statement_certification** | **bool** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] +**foreign_entity_partner_in_lower_tier_partnership_certification** | **bool** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] +**foreign_partnership_amount_realized_section1446_f_certification** | **bool** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] +**foreign_partnership_modified_amount_realized_certification** | **bool** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] +**foreign_grantor_trust_amount_realized_allocation_certification** | **bool** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] +**alternative_withholding_statement_reliance_certification** | **bool** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] +**np_ffi_with_exempt_beneficial_owners_certification** | **bool** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] +**foreign_central_bank_of_issue_certification** | **bool** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] +**business_name** | **str** | The name of the business associated with the form. | [optional] +**business_classification** | **str** | The classification of the business. | [optional] +**business_other** | **str** | The classification description when \"businessClassification\" is \"Other\". | [optional] +**foreign_partner_owner_or_beneficiary** | **bool** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] +**exempt_payee_code** | **str** | The exempt payee code. | [optional] +**exempt_fatca_code** | **str** | The exemption from FATCA reporting code. | [optional] +**foreign_country_indicator** | **bool** | Indicates whether the individual or entity is in a foreign country. | [optional] +**foreign_address** | **str** | The foreign address of the individual or entity. | [optional] +**account_number** | **str** | The account number associated with the form. | [optional] +**backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] +**is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.create_w9_form201_response import CreateW9Form201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateW9Form201Response from a JSON string +create_w9_form201_response_instance = CreateW9Form201Response.from_json(json) +# print the JSON string representation of the object +print(CreateW9Form201Response.to_json()) + +# convert the object into a dict +create_w9_form201_response_dict = create_w9_form201_response_instance.to_dict() +# create an instance of CreateW9Form201Response from a dict +create_w9_form201_response_from_dict = CreateW9Form201Response.from_dict(create_w9_form201_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md new file mode 100644 index 0000000..ba63f79 --- /dev/null +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -0,0 +1,198 @@ +# CreateW9FormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type. | [optional] [readonly] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**business_name** | **str** | The name of the business associated with the form. | [optional] +**business_classification** | **str** | The classification of the business. | [optional] +**business_other** | **str** | The classification description when \"businessClassification\" is \"Other\". | [optional] +**foreign_partner_owner_or_beneficiary** | **bool** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] +**exempt_payee_code** | **str** | The exempt payee code. | [optional] +**exempt_fatca_code** | **str** | The exemption from FATCA reporting code. | [optional] +**foreign_country_indicator** | **bool** | Indicates whether the individual or entity is in a foreign country. | [optional] +**address** | **str** | The address of the employee. | [optional] +**foreign_address** | **str** | The foreign address of the individual or entity. | [optional] +**city** | **str** | The city of residence of the employee. | [optional] +**state** | **str** | The state of residence of the employee. | [optional] +**zip** | **str** | The ZIP code of residence of the employee. | [optional] +**account_number** | **str** | The account number associated with the form. | [optional] +**tin_type** | **str** | The type of TIN provided. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] +**is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] +**citizenship_country** | **str** | The country of citizenship. | [optional] +**disregarded_entity** | **str** | The name of the disregarded entity receiving the payment (if applicable). | [optional] +**entity_type** | **str** | The entity type. | [optional] +**fatca_status** | **str** | The FATCA status. | [optional] +**residence_address** | **str** | The residential address of the individual or entity. | [optional] +**residence_city** | **str** | The city of residence. | [optional] +**residence_state** | **str** | The state of residence. | [optional] +**residence_zip** | **str** | The ZIP code of the residence. | [optional] +**residence_country** | **str** | The country of residence. | [optional] +**residence_is_mailing** | **bool** | Indicates whether the residence address is the mailing address. | [optional] +**mailing_address** | **str** | The mailing address. | [optional] +**mailing_city** | **str** | The city of the mailing address. | [optional] +**mailing_state** | **str** | The state of the mailing address. | [optional] +**mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] +**mailing_country** | **str** | The country of the mailing address. | [optional] +**giin** | **str** | The global intermediary identification number (GIIN). | [optional] +**foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] +**reference_number** | **str** | A reference number for the form. | [optional] +**disregarded_entity_fatca_status** | **str** | The FATCA status of disregarded entity or branch receiving payment. | [optional] +**disregarded_address** | **str** | The address for disregarded entities. | [optional] +**disregarded_city** | **str** | The city for disregarded entities. | [optional] +**disregarded_state** | **str** | The state for disregarded entities. | [optional] +**disregarded_zip** | **str** | The ZIP code for disregarded entities. | [optional] +**disregarded_country** | **str** | The country for disregarded entities. | [optional] +**disregarded_entity_giin** | **str** | The GIIN for disregarded entities. | [optional] +**qualified_intermediary_certification** | **bool** | Certifies that the entity is a Qualified Intermediary (QI) acting in accordance with its QI Agreement, providing required withholding statements and documentation for relevant tax withholding purposes. | [optional] +**qi_primary_withholding_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] +**qi_withholding_responsibility_for_ptp_sales_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] +**qi_nominee_withholding_responsibility_for_ptp_distributions_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] +**qi_securities_lender_substitute_dividend_withholding_certification** | **bool** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**qi_withholding_and1099_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] +**qi_form1099_or_fatca_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] +**qi_opt_out_of_form1099_reporting_certification** | **bool** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] +**qi_withholding_rate_pool_certification** | **bool** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] +**qi_intermediary_or_flow_through_entity_documentation_certification** | **bool** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] +**qualified_derivatives_dealer_certification** | **bool** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] +**qdd_corporation** | **bool** | Indicates QDD classification is Corporation. | [optional] +**qdd_partnership** | **bool** | Indicates QDD classification is Partnership. | [optional] +**qdd_disregarded_entity** | **bool** | Indicates QDD classification is Disregarded Entity. | [optional] +**nonqualified_intermediary_certification** | **bool** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] +**nqi_withholding_statement_transmission_certification** | **bool** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] +**nqi_withholding_rate_pool_compliance_certification** | **bool** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] +**nqi_qualified_securities_lender_certification** | **bool** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**nqi_alternative_withholding_statement_verification_certification** | **bool** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] +**territory_financial_institution_certification** | **bool** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] +**tfi_treated_as_us_person_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] +**tfi_withholding_statement_transmission_certification** | **bool** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] +**tfi_treated_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] +**tfi_nominee_us_person_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] +**tfi_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] +**us_branch_non_effectively_connected_income_certification** | **bool** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] +**us_branch_agreement_to_be_treated_as_us_person_certification** | **bool** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] +**us_branch_withholding_statement_and_compliance_certification** | **bool** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] +**us_branch_acting_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] +**us_branch_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] +**us_branch_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] +**withholding_foreign_partnership_or_trust_certification** | **bool** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] +**nonwithholding_foreign_entity_withholding_statement_certification** | **bool** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] +**foreign_entity_partner_in_lower_tier_partnership_certification** | **bool** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] +**foreign_partnership_amount_realized_section1446_f_certification** | **bool** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] +**foreign_partnership_modified_amount_realized_certification** | **bool** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] +**foreign_grantor_trust_amount_realized_allocation_certification** | **bool** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] +**alternative_withholding_statement_reliance_certification** | **bool** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] +**np_ffi_with_exempt_beneficial_owners_certification** | **bool** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] +**ffi_sponsoring_entity** | **str** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] +**investment_entity_certification** | **bool** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] +**controlled_foreign_corporation_certification** | **bool** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] +**owner_documented_ffi_certification** | **bool** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] +**owner_documented_ffi_reporting_statement_certification** | **bool** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] +**owner_documented_ffi_auditor_letter_certification** | **bool** | Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI. | [optional] +**compliant_nonregistering_local_bank_certification** | **bool** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] +**compliant_ffi_low_value_accounts_certification** | **bool** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] +**sponsored_closely_held_entity_sponsoring_entity** | **str** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] +**sponsored_closely_held_investment_vehicle_certification** | **bool** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] +**compliant_limited_life_debt_entity_certification** | **bool** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] +**investment_entity_no_financial_accounts_certification** | **bool** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] +**restricted_distributor_certification** | **bool** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] +**restricted_distributor_agreement_certification** | **bool** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] +**restricted_distributor_preexisting_sales_compliance_certification** | **bool** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] +**foreign_central_bank_of_issue_certification** | **bool** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] +**nonreporting_iga_ffi_certification** | **bool** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] +**iga_country** | **str** | The country for the applicable IGA with the United States. | [optional] +**iga_model** | **str** | The applicable IGA model. | [optional] +**iga_legal_status_treatment** | **str** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] +**iga_ffi_trustee_or_sponsor** | **str** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] +**iga_ffi_trustee_is_foreign** | **bool** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] +**treaty_qualified_pension_fund_certification** | **bool** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] +**qualified_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] +**narrow_participation_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] +**section401_a_equivalent_pension_plan_certification** | **bool** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] +**investment_entity_for_retirement_funds_certification** | **bool** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] +**exempt_beneficial_owner_sponsored_retirement_fund_certification** | **bool** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] +**excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] +**excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] +**publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] +**nffe_affiliate_of_publicly_traded_entity_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] +**publicly_traded_entity** | **str** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] +**nffe_affiliate_of_publicly_traded_entity_securities_market** | **str** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] +**excepted_territory_nffe_certification** | **bool** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] +**active_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] +**passive_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] +**sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] +**direct_reporting_nffe_sponsoring_entity** | **str** | The name of the entity that sponsors the direct reporting NFFE. | [optional] +**signer_name** | **str** | The name of the signer of the form. | [optional] +**making_treaty_claim** | **bool** | Indicates whether the entity is making a treaty claim. | [optional] +**foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not legally required. | [optional] +**treaty_country_certification** | **bool** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] +**treaty_country** | **str** | The country for which the treaty applies. | [optional] +**benefit_limitation_certification** | **bool** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] +**benefit_limitation** | **str** | The benefit limitation for tax treaty claims. | [optional] +**qualified_resident_status_certification** | **bool** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] +**treaty_article** | **str** | The specific article of the treaty being claimed. | [optional] +**withholding_rate** | **str** | The withholding rate applied as per the treaty. | [optional] +**income_type** | **str** | The type of income covered by the treaty. | [optional] +**treaty_reasons** | **str** | The reasons for claiming treaty benefits. | [optional] +**owner_documented_ffi_trust_beneficiaries_certification** | **bool** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] +**non_commercial_financial_activity_certification** | **bool** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] +**internation_organization_certification** | **bool** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] +**intergovernmental_organization_certification** | **bool** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] +**exempt_beneficial_owner_owned_investment_entity_certification** | **bool** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] +**section501_c_organization_certification** | **bool** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] +**determination_letter_date** | **date** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] +**nonprofit_organization_certification** | **bool** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] +**passive_nffe_no_substantial_us_owners_certification** | **bool** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] +**passive_nffe_substantial_us_owners_provided_certification** | **bool** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] +**excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] +**substantial_us_owners** | [**List[SubstantialUsOwnerRequest]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] +**birthday** | **date** | The birthday of the individual associated with the form. | [optional] +**employee_first_name** | **str** | The first name of the employee. | [optional] +**employee_middle_name** | **str** | The middle name of the employee. | [optional] +**employee_last_name** | **str** | The last name of the employee. | [optional] +**employee_name_suffix** | **str** | The name suffix of the employee. | [optional] +**marital_status** | **str** | The marital status of the employee. | [optional] +**last_name_differs** | **bool** | Indicates whether the last name differs from prior records. | [optional] +**num_allowances** | **int** | The number of allowances claimed by the employee. | [optional] +**other_dependents** | **int** | The number of dependents other than allowances. | [optional] +**non_job_income** | **float** | The amount of non-job income. | [optional] +**deductions** | **float** | The amount of deductions claimed. | [optional] +**additional_withheld** | **float** | The additional amount withheld. | [optional] +**exempt_from_withholding** | **bool** | Indicates whether the employee is exempt from withholding. | [optional] +**office_code** | **str** | The office code associated with the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.create_w9_form_request import CreateW9FormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateW9FormRequest from a JSON string +create_w9_form_request_instance = CreateW9FormRequest.from_json(json) +# print the JSON string representation of the object +print(CreateW9FormRequest.to_json()) + +# convert the object into a dict +create_w9_form_request_dict = create_w9_form_request_instance.to_dict() +# create an instance of CreateW9FormRequest from a dict +create_w9_form_request_from_dict = CreateW9FormRequest.from_dict(create_w9_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1042SList.md b/docs/A1099/V2/Form1042SList.md new file mode 100644 index 0000000..9b97fa3 --- /dev/null +++ b/docs/A1099/V2/Form1042SList.md @@ -0,0 +1,30 @@ +# Form1042SList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**forms** | [**List[Form1042SListItem]**](Form1042SListItem.md) | | [optional] +**form_type** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1042_s_list import Form1042SList + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1042SList from a JSON string +form1042_s_list_instance = Form1042SList.from_json(json) +# print the JSON string representation of the object +print(Form1042SList.to_json()) + +# convert the object into a dict +form1042_s_list_dict = form1042_s_list_instance.to_dict() +# create an instance of Form1042SList from a dict +form1042_s_list_from_dict = Form1042SList.from_dict(form1042_s_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1042SListItem.md b/docs/A1099/V2/Form1042SListItem.md new file mode 100644 index 0000000..0257f2e --- /dev/null +++ b/docs/A1099/V2/Form1042SListItem.md @@ -0,0 +1,74 @@ +# Form1042SListItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1042_s_list_item import Form1042SListItem + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1042SListItem from a JSON string +form1042_s_list_item_instance = Form1042SListItem.from_json(json) +# print the JSON string representation of the object +print(Form1042SListItem.to_json()) + +# convert the object into a dict +form1042_s_list_item_dict = form1042_s_list_item_instance.to_dict() +# create an instance of Form1042SListItem from a dict +form1042_s_list_item_from_dict = Form1042SListItem.from_dict(form1042_s_list_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1042SListItemResponse.md b/docs/A1099/V2/Form1042SListItemResponse.md new file mode 100644 index 0000000..54f5edc --- /dev/null +++ b/docs/A1099/V2/Form1042SListItemResponse.md @@ -0,0 +1,85 @@ +# Form1042SListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1042_s_list_item_response import Form1042SListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1042SListItemResponse from a JSON string +form1042_s_list_item_response_instance = Form1042SListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1042SListItemResponse.to_json()) + +# convert the object into a dict +form1042_s_list_item_response_dict = form1042_s_list_item_response_instance.to_dict() +# create an instance of Form1042SListItemResponse from a dict +form1042_s_list_item_response_from_dict = Form1042SListItemResponse.from_dict(form1042_s_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1042SRequest.md b/docs/A1099/V2/Form1042SRequest.md new file mode 100644 index 0000000..b47974f --- /dev/null +++ b/docs/A1099/V2/Form1042SRequest.md @@ -0,0 +1,75 @@ +# Form1042SRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgentRequest**](PrimaryWithholdingAgentRequest.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThroughRequest**](IntermediaryOrFlowThroughRequest.md) | Intermediary or flow-through entity information | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1042_s_request import Form1042SRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1042SRequest from a JSON string +form1042_s_request_instance = Form1042SRequest.from_json(json) +# print the JSON string representation of the object +print(Form1042SRequest.to_json()) + +# convert the object into a dict +form1042_s_request_dict = form1042_s_request_instance.to_dict() +# create an instance of Form1042SRequest from a dict +form1042_s_request_from_dict = Form1042SRequest.from_dict(form1042_s_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1042SResponse.md b/docs/A1099/V2/Form1042SResponse.md new file mode 100644 index 0000000..9368d70 --- /dev/null +++ b/docs/A1099/V2/Form1042SResponse.md @@ -0,0 +1,64 @@ +# Form1042SResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] [readonly] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] +**user_id** | **str** | | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] +**tin_type** | **str** | | [optional] +**id** | **str** | | [optional] +**issuer_id** | **str** | | [optional] +**issuer_reference_id** | **str** | | [optional] +**issuer_tin** | **str** | | [optional] +**tax_year** | **int** | | [optional] +**reference_id** | **str** | | [optional] +**recipient_name** | **str** | | [optional] +**recipient_tin** | **str** | | [optional] +**recipient_second_name** | **str** | | [optional] +**address** | **str** | | [optional] +**address2** | **str** | | [optional] +**city** | **str** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] +**recipient_email** | **str** | | [optional] +**account_number** | **str** | | [optional] +**office_code** | **str** | | [optional] +**recipient_non_us_province** | **str** | | [optional] +**country_code** | **str** | | [optional] +**federal_e_file** | **bool** | | [optional] +**postal_mail** | **bool** | | [optional] +**state_e_file** | **bool** | | [optional] +**tin_match** | **bool** | | [optional] +**address_verification** | **bool** | | [optional] +**federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] +**postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] +**tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] +**address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1042_s_response import Form1042SResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1042SResponse from a JSON string +form1042_s_response_instance = Form1042SResponse.from_json(json) +# print the JSON string representation of the object +print(Form1042SResponse.to_json()) + +# convert the object into a dict +form1042_s_response_dict = form1042_s_response_instance.to_dict() +# create an instance of Form1042SResponse from a dict +form1042_s_response_from_dict = Form1042SResponse.from_dict(form1042_s_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1095BListItem.md b/docs/A1099/V2/Form1095BListItem.md index a76a89f..faa5732 100644 --- a/docs/A1099/V2/Form1095BListItem.md +++ b/docs/A1099/V2/Form1095BListItem.md @@ -5,35 +5,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee_first_name** | **str** | | [optional] -**employee_middle_name** | **str** | | [optional] -**employee_last_name** | **str** | | [optional] -**employee_name_suffix** | **str** | | [optional] -**employee_date_of_birth** | **datetime** | | [optional] -**origin_of_health_coverage_code** | **str** | | [optional] -**covered_individuals** | [**List[CoveredIndividualRequest]**](CoveredIndividualRequest.md) | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**employee_first_name** | **str** | Employee's first name | [optional] +**employee_middle_name** | **str** | Employee's middle name | [optional] +**employee_last_name** | **str** | Employee's last name | [optional] +**employee_name_suffix** | **str** | Employee's name suffix | [optional] +**employee_date_of_birth** | **datetime** | Employee's date of birth | [optional] +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualRequest]**](CoveredIndividualRequest.md) | Covered individuals information | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1095BListItemResponse.md b/docs/A1099/V2/Form1095BListItemResponse.md new file mode 100644 index 0000000..2eea151 --- /dev/null +++ b/docs/A1099/V2/Form1095BListItemResponse.md @@ -0,0 +1,63 @@ +# Form1095BListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualReferenceResponse]**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1095_b_list_item_response import Form1095BListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1095BListItemResponse from a JSON string +form1095_b_list_item_response_instance = Form1095BListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1095BListItemResponse.to_json()) + +# convert the object into a dict +form1095_b_list_item_response_dict = form1095_b_list_item_response_instance.to_dict() +# create an instance of Form1095BListItemResponse from a dict +form1095_b_list_item_response_from_dict = Form1095BListItemResponse.from_dict(form1095_b_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1095BRequest.md b/docs/A1099/V2/Form1095BRequest.md index 859cacb..567704e 100644 --- a/docs/A1099/V2/Form1095BRequest.md +++ b/docs/A1099/V2/Form1095BRequest.md @@ -5,36 +5,36 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**employee_first_name** | **str** | | [optional] -**employee_middle_name** | **str** | | [optional] -**employee_last_name** | **str** | | [optional] -**employee_name_suffix** | **str** | | [optional] -**employee_date_of_birth** | **datetime** | | [optional] -**origin_of_health_coverage_code** | **str** | | [optional] -**covered_individuals** | [**List[CoveredIndividualRequest]**](CoveredIndividualRequest.md) | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**employee_first_name** | **str** | Employee's first name | [optional] +**employee_middle_name** | **str** | Employee's middle name | [optional] +**employee_last_name** | **str** | Employee's last name | [optional] +**employee_name_suffix** | **str** | Employee's name suffix | [optional] +**employee_date_of_birth** | **datetime** | Employee's date of birth | [optional] +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualRequest]**](CoveredIndividualRequest.md) | Covered individuals information | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099BaseResponse.md b/docs/A1099/V2/Form1099BaseResponse.md new file mode 100644 index 0000000..7a7ded8 --- /dev/null +++ b/docs/A1099/V2/Form1099BaseResponse.md @@ -0,0 +1,61 @@ +# Form1099BaseResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_base_response import Form1099BaseResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099BaseResponse from a JSON string +form1099_base_response_instance = Form1099BaseResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099BaseResponse.to_json()) + +# convert the object into a dict +form1099_base_response_dict = form1099_base_response_instance.to_dict() +# create an instance of Form1099BaseResponse from a dict +form1099_base_response_from_dict = Form1099BaseResponse.from_dict(form1099_base_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099DivListItem.md b/docs/A1099/V2/Form1099DivListItem.md index 0d4bced..37b3b6c 100644 --- a/docs/A1099/V2/Form1099DivListItem.md +++ b/docs/A1099/V2/Form1099DivListItem.md @@ -5,50 +5,50 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_ordinary_dividends** | **str** | | [optional] -**qualified_dividends** | **str** | | [optional] -**total_capital_gain_distr** | **str** | | [optional] -**unrecap_sec1250_gain** | **str** | | [optional] -**section1202_gain** | **str** | | [optional] -**collectibles_gain** | **str** | | [optional] -**section897_ordinary_dividends** | **str** | | [optional] -**section897_capital_gain** | **str** | | [optional] -**nondividend_distributions** | **str** | | [optional] -**federal_income_tax_withheld** | **str** | | [optional] -**section199_a_dividends** | **str** | | [optional] -**investment_expenses** | **str** | | [optional] -**foreign_tax_paid** | **str** | | [optional] -**foreign_country_or_us_possession** | **str** | | [optional] -**cash_liquidation_distributions** | **str** | | [optional] -**noncash_liquidation_distributions** | **str** | | [optional] -**exempt_interest_dividends** | **str** | | [optional] -**specified_private_activity_bond_interest_dividends** | **str** | | [optional] -**fatca_filing_requirement** | **str** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**total_ordinary_dividends** | **str** | Total ordinary dividends | [optional] +**qualified_dividends** | **str** | Qualified dividends | [optional] +**total_capital_gain_distr** | **str** | Total capital gain distributions | [optional] +**unrecap_sec1250_gain** | **str** | Unrecaptured Section 1250 gain | [optional] +**section1202_gain** | **str** | Section 1202 gain | [optional] +**collectibles_gain** | **str** | Collectibles (28%) gain | [optional] +**section897_ordinary_dividends** | **str** | Section 897 ordinary dividends | [optional] +**section897_capital_gain** | **str** | Section 897 capital gain | [optional] +**nondividend_distributions** | **str** | Nondividend distributions | [optional] +**federal_income_tax_withheld** | **str** | Federal income tax withheld | [optional] +**section199_a_dividends** | **str** | Section 199A dividends | [optional] +**investment_expenses** | **str** | Investment expenses | [optional] +**foreign_tax_paid** | **str** | Foreign tax paid | [optional] +**foreign_country_or_us_possession** | **str** | Foreign country or U.S. possession | [optional] +**cash_liquidation_distributions** | **str** | Cash liquidation distributions | [optional] +**noncash_liquidation_distributions** | **str** | Noncash liquidation distributions | [optional] +**exempt_interest_dividends** | **str** | Exempt-interest dividends | [optional] +**specified_private_activity_bond_interest_dividends** | **str** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **str** | FATCA filing requirement | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099DivRequest.md b/docs/A1099/V2/Form1099DivRequest.md index 417bab8..07a5f12 100644 --- a/docs/A1099/V2/Form1099DivRequest.md +++ b/docs/A1099/V2/Form1099DivRequest.md @@ -5,48 +5,48 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_ordinary_dividends** | **str** | | [optional] -**qualified_dividends** | **str** | | [optional] -**total_capital_gain_distr** | **str** | | [optional] -**unrecap_sec1250_gain** | **str** | | [optional] -**section1202_gain** | **str** | | [optional] -**collectibles_gain** | **str** | | [optional] -**section897_ordinary_dividends** | **str** | | [optional] -**section897_capital_gain** | **str** | | [optional] -**nondividend_distributions** | **str** | | [optional] -**federal_income_tax_withheld** | **str** | | [optional] -**section199_a_dividends** | **str** | | [optional] -**investment_expenses** | **str** | | [optional] -**foreign_tax_paid** | **str** | | [optional] -**foreign_country_or_us_possession** | **str** | | [optional] -**cash_liquidation_distributions** | **str** | | [optional] -**noncash_liquidation_distributions** | **str** | | [optional] -**exempt_interest_dividends** | **str** | | [optional] -**specified_private_activity_bond_interest_dividends** | **str** | | [optional] -**fatca_filing_requirement** | **str** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**total_ordinary_dividends** | **str** | Total ordinary dividends | [optional] +**qualified_dividends** | **str** | Qualified dividends | [optional] +**total_capital_gain_distr** | **str** | Total capital gain distributions | [optional] +**unrecap_sec1250_gain** | **str** | Unrecaptured Section 1250 gain | [optional] +**section1202_gain** | **str** | Section 1202 gain | [optional] +**collectibles_gain** | **str** | Collectibles (28%) gain | [optional] +**section897_ordinary_dividends** | **str** | Section 897 ordinary dividends | [optional] +**section897_capital_gain** | **str** | Section 897 capital gain | [optional] +**nondividend_distributions** | **str** | Nondividend distributions | [optional] +**federal_income_tax_withheld** | **str** | Federal income tax withheld | [optional] +**section199_a_dividends** | **str** | Section 199A dividends | [optional] +**investment_expenses** | **str** | Investment expenses | [optional] +**foreign_tax_paid** | **str** | Foreign tax paid | [optional] +**foreign_country_or_us_possession** | **str** | Foreign country or U.S. possession | [optional] +**cash_liquidation_distributions** | **str** | Cash liquidation distributions | [optional] +**noncash_liquidation_distributions** | **str** | Noncash liquidation distributions | [optional] +**exempt_interest_dividends** | **str** | Exempt-interest dividends | [optional] +**specified_private_activity_bond_interest_dividends** | **str** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **str** | FATCA filing requirement | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099DivResponse.md b/docs/A1099/V2/Form1099DivResponse.md index 91df913..0748601 100644 --- a/docs/A1099/V2/Form1099DivResponse.md +++ b/docs/A1099/V2/Form1099DivResponse.md @@ -36,11 +36,11 @@ Name | Type | Description | Notes **tin_match** | **bool** | | [optional] **address_verification** | **bool** | | [optional] **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetailApp]**](StateEfileStatusDetailApp.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**validation_errors** | [**List[ValidationErrorApp]**](ValidationErrorApp.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] ## Example diff --git a/docs/A1099/V2/Form1099KListItem.md b/docs/A1099/V2/Form1099KListItem.md index 8e0c8d1..d341f96 100644 --- a/docs/A1099/V2/Form1099KListItem.md +++ b/docs/A1099/V2/Form1099KListItem.md @@ -5,51 +5,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**filer_type** | **str** | | [optional] -**payment_type** | **str** | | [optional] -**payment_settlement_entity_name_phone_number** | **str** | | [optional] -**gross_amount_payment_card** | **float** | | [optional] -**card_not_present_transactions** | **float** | | [optional] -**merchant_category_code** | **str** | | [optional] -**payment_transaction_number** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**january** | **float** | | [optional] -**february** | **float** | | [optional] -**march** | **float** | | [optional] -**april** | **float** | | [optional] -**may** | **float** | | [optional] -**june** | **float** | | [optional] -**july** | **float** | | [optional] -**august** | **float** | | [optional] -**sept** | **float** | | [optional] -**october** | **float** | | [optional] -**november** | **float** | | [optional] -**december** | **float** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**filer_type** | **str** | Filer type (PSE or EPF) | [optional] +**payment_type** | **str** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099KListItemResponse.md b/docs/A1099/V2/Form1099KListItemResponse.md new file mode 100644 index 0000000..088bcd2 --- /dev/null +++ b/docs/A1099/V2/Form1099KListItemResponse.md @@ -0,0 +1,81 @@ +# Form1099KListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filer_type** | **str** | Filer type (PSE or EPF) | [optional] +**payment_type** | **str** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_k_list_item_response import Form1099KListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099KListItemResponse from a JSON string +form1099_k_list_item_response_instance = Form1099KListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099KListItemResponse.to_json()) + +# convert the object into a dict +form1099_k_list_item_response_dict = form1099_k_list_item_response_instance.to_dict() +# create an instance of Form1099KListItemResponse from a dict +form1099_k_list_item_response_from_dict = Form1099KListItemResponse.from_dict(form1099_k_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099KRequest.md b/docs/A1099/V2/Form1099KRequest.md index 2401a55..a10d50d 100644 --- a/docs/A1099/V2/Form1099KRequest.md +++ b/docs/A1099/V2/Form1099KRequest.md @@ -5,49 +5,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**filer_type** | **int** | | [optional] -**payment_type** | **int** | | [optional] -**payment_settlement_entity_name_phone_number** | **str** | | [optional] -**gross_amount_payment_card** | **float** | | [optional] -**card_not_present_transactions** | **float** | | [optional] -**merchant_category_code** | **str** | | [optional] -**payment_transaction_number** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**january** | **float** | | [optional] -**february** | **float** | | [optional] -**march** | **float** | | [optional] -**april** | **float** | | [optional] -**may** | **float** | | [optional] -**june** | **float** | | [optional] -**july** | **float** | | [optional] -**august** | **float** | | [optional] -**sept** | **float** | | [optional] -**october** | **float** | | [optional] -**november** | **float** | | [optional] -**december** | **float** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**filer_type** | **int** | Filer type (PSE or EPF) | [optional] +**payment_type** | **int** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099ListResponse.md b/docs/A1099/V2/Form1099ListResponse.md new file mode 100644 index 0000000..96f0b8a --- /dev/null +++ b/docs/A1099/V2/Form1099ListResponse.md @@ -0,0 +1,29 @@ +# Form1099ListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**List[Form1099ListResponseValueInner]**](Form1099ListResponseValueInner.md) | List of Form 1099 responses | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_list_response import Form1099ListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099ListResponse from a JSON string +form1099_list_response_instance = Form1099ListResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099ListResponse.to_json()) + +# convert the object into a dict +form1099_list_response_dict = form1099_list_response_instance.to_dict() +# create an instance of Form1099ListResponse from a dict +form1099_list_response_from_dict = Form1099ListResponse.from_dict(form1099_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099ListResponseValueInner.md b/docs/A1099/V2/Form1099ListResponseValueInner.md new file mode 100644 index 0000000..fe4104e --- /dev/null +++ b/docs/A1099/V2/Form1099ListResponseValueInner.md @@ -0,0 +1,140 @@ +# Form1099ListResponseValueInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualReferenceResponse]**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] +**filer_type** | **str** | Filer type (PSE or EPF) | [optional] +**payment_type** | **str** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_and_health_care** | **float** | Medical and health care payments | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**excess_golden_parachute** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**gross_amount_paid_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**section409_a_income** | **float** | Nonqualified deferred compensation | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | [optional] +**gross_distributions** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_indicator** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**employee_contributions** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code_required** | **str** | Distribution code | [optional] +**distribution_code_optional** | **str** | Second distribution code | [optional] +**ira_sep_simple_indicator** | **bool** | IRA/SEP/SIMPLE | [optional] +**total_ira_sep_simple_distribution** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other** | **float** | Other amount | [optional] +**other_percent** | **str** | Other percentage | [optional] +**percentage_total_distribution** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_designated_roth_contrib** | **str** | First year of designated Roth contribution | [optional] +**fatca_requirement_indicator** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **str** | Date of payment | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_list_response_value_inner import Form1099ListResponseValueInner + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099ListResponseValueInner from a JSON string +form1099_list_response_value_inner_instance = Form1099ListResponseValueInner.from_json(json) +# print the JSON string representation of the object +print(Form1099ListResponseValueInner.to_json()) + +# convert the object into a dict +form1099_list_response_value_inner_dict = form1099_list_response_value_inner_instance.to_dict() +# create an instance of Form1099ListResponseValueInner from a dict +form1099_list_response_value_inner_from_dict = Form1099ListResponseValueInner.from_dict(form1099_list_response_value_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099MiscListItem.md b/docs/A1099/V2/Form1099MiscListItem.md index 3b7ddfd..48b101e 100644 --- a/docs/A1099/V2/Form1099MiscListItem.md +++ b/docs/A1099/V2/Form1099MiscListItem.md @@ -5,47 +5,47 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**second_tin_notice** | **bool** | | [optional] -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**substitute_payments** | **float** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**gross_proceeds_paid_to_attorney** | **float** | | [optional] -**fish_purchased_for_resale** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**excess_golden_parachute_payments** | **float** | | [optional] -**nonqualified_deferred_compensation** | **float** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_health_care_payments** | **float** | Medical and health care payments | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099MiscListItemResponse.md b/docs/A1099/V2/Form1099MiscListItemResponse.md new file mode 100644 index 0000000..423942d --- /dev/null +++ b/docs/A1099/V2/Form1099MiscListItemResponse.md @@ -0,0 +1,74 @@ +# Form1099MiscListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_and_health_care** | **float** | Medical and health care payments | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**excess_golden_parachute** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**gross_amount_paid_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**section409_a_income** | **float** | Nonqualified deferred compensation | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_misc_list_item_response import Form1099MiscListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099MiscListItemResponse from a JSON string +form1099_misc_list_item_response_instance = Form1099MiscListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099MiscListItemResponse.to_json()) + +# convert the object into a dict +form1099_misc_list_item_response_dict = form1099_misc_list_item_response_instance.to_dict() +# create an instance of Form1099MiscListItemResponse from a dict +form1099_misc_list_item_response_from_dict = Form1099MiscListItemResponse.from_dict(form1099_misc_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099MiscRequest.md b/docs/A1099/V2/Form1099MiscRequest.md index b322ed4..2502540 100644 --- a/docs/A1099/V2/Form1099MiscRequest.md +++ b/docs/A1099/V2/Form1099MiscRequest.md @@ -5,45 +5,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**second_tin_notice** | **bool** | | [optional] -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**substitute_payments** | **float** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**gross_proceeds_paid_to_attorney** | **float** | | [optional] -**fish_purchased_for_resale** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**excess_golden_parachute_payments** | **float** | | [optional] -**nonqualified_deferred_compensation** | **float** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_health_care_payments** | **float** | Medical and health care payments | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099MiscResponse.md b/docs/A1099/V2/Form1099MiscResponse.md index 9355baf..fb6073a 100644 --- a/docs/A1099/V2/Form1099MiscResponse.md +++ b/docs/A1099/V2/Form1099MiscResponse.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **fed_income_tax_withheld** | **float** | | [optional] **fishing_boat_proceeds** | **float** | | [optional] **medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] +**direct_sales_indicator** | **bool** | | [optional] **substitute_payments** | **float** | | [optional] **crop_insurance_proceeds** | **float** | | [optional] **gross_proceeds_paid_to_attorney** | **float** | | [optional] @@ -52,11 +52,11 @@ Name | Type | Description | Notes **tin_match** | **bool** | | [optional] **address_verification** | **bool** | | [optional] **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetailApp]**](StateEfileStatusDetailApp.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**validation_errors** | [**List[ValidationErrorApp]**](ValidationErrorApp.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] ## Example diff --git a/docs/A1099/V2/Form1099NecListItem.md b/docs/A1099/V2/Form1099NecListItem.md index 2030c19..9bdb4cf 100644 --- a/docs/A1099/V2/Form1099NecListItem.md +++ b/docs/A1099/V2/Form1099NecListItem.md @@ -1,39 +1,40 @@ # Form1099NecListItem +1099-NEC - Nonemployee compensation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**second_tin_notice** | **bool** | | [optional] -**nonemployee_compensation** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099NecListItemResponse.md b/docs/A1099/V2/Form1099NecListItemResponse.md new file mode 100644 index 0000000..6d41ba0 --- /dev/null +++ b/docs/A1099/V2/Form1099NecListItemResponse.md @@ -0,0 +1,64 @@ +# Form1099NecListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nonemployee_compensation** | **float** | Nonemployee compensation | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_nec_list_item_response import Form1099NecListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099NecListItemResponse from a JSON string +form1099_nec_list_item_response_instance = Form1099NecListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099NecListItemResponse.to_json()) + +# convert the object into a dict +form1099_nec_list_item_response_dict = form1099_nec_list_item_response_instance.to_dict() +# create an instance of Form1099NecListItemResponse from a dict +form1099_nec_list_item_response_from_dict = Form1099NecListItemResponse.from_dict(form1099_nec_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099NecRequest.md b/docs/A1099/V2/Form1099NecRequest.md index 9ee878e..56aa2ba 100644 --- a/docs/A1099/V2/Form1099NecRequest.md +++ b/docs/A1099/V2/Form1099NecRequest.md @@ -5,33 +5,33 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**second_tin_notice** | **bool** | | [optional] -**nonemployee_compensation** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099NecResponse.md b/docs/A1099/V2/Form1099NecResponse.md index 4b458d2..586024b 100644 --- a/docs/A1099/V2/Form1099NecResponse.md +++ b/docs/A1099/V2/Form1099NecResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **second_tin_notice** | **bool** | | [optional] **nonemployee_compensation** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] +**direct_sales_indicator** | **bool** | | [optional] **federal_income_tax_withheld** | **float** | | [optional] **type** | **str** | | [optional] [readonly] **created_at** | **datetime** | | [optional] @@ -40,11 +40,11 @@ Name | Type | Description | Notes **tin_match** | **bool** | | [optional] **address_verification** | **bool** | | [optional] **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetailApp]**](StateEfileStatusDetailApp.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**validation_errors** | [**List[ValidationErrorApp]**](ValidationErrorApp.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] ## Example diff --git a/docs/A1099/V2/Form1099RListItem.md b/docs/A1099/V2/Form1099RListItem.md index fed03ff..3243ed3 100644 --- a/docs/A1099/V2/Form1099RListItem.md +++ b/docs/A1099/V2/Form1099RListItem.md @@ -5,51 +5,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gross_distribution** | **float** | | [optional] -**taxable_amount** | **float** | | [optional] -**taxable_amount_not_determined** | **bool** | | [optional] -**total_distribution_determined** | **bool** | | [optional] -**capital_gain** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | | [optional] -**net_unrealized_appreciation_in_employer_securities** | **float** | | [optional] -**distribution_code** | **str** | | [optional] -**second_distribution_code** | **str** | | [optional] -**ira_sep_simple** | **bool** | | [optional] -**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | | [optional] -**other_amount** | **float** | | [optional] -**other_percentage** | **str** | | [optional] -**total_distribution_percentage** | **str** | | [optional] -**total_employee_contributions** | **float** | | [optional] -**amount_allocable_to_irr_within5_years** | **float** | | [optional] -**first_year_of_designated_roth_contribution** | **int** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**date_of_payment** | **datetime** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**gross_distribution** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_determined** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation_in_employer_securities** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code** | **str** | Distribution code | [optional] +**second_distribution_code** | **str** | Second distribution code | [optional] +**ira_sep_simple** | **bool** | IRA/SEP/SIMPLE | [optional] +**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other_amount** | **float** | Other amount | [optional] +**other_percentage** | **str** | Other percentage | [optional] +**total_distribution_percentage** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr_within5_years** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_of_designated_roth_contribution** | **int** | First year of designated Roth contribution | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **datetime** | Date of payment | [optional] +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099RListItemResponse.md b/docs/A1099/V2/Form1099RListItemResponse.md new file mode 100644 index 0000000..683ba1d --- /dev/null +++ b/docs/A1099/V2/Form1099RListItemResponse.md @@ -0,0 +1,81 @@ +# Form1099RListItemResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gross_distributions** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_indicator** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**employee_contributions** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code_required** | **str** | Distribution code | [optional] +**distribution_code_optional** | **str** | Second distribution code | [optional] +**ira_sep_simple_indicator** | **bool** | IRA/SEP/SIMPLE | [optional] +**total_ira_sep_simple_distribution** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other** | **float** | Other amount | [optional] +**other_percent** | **str** | Other percentage | [optional] +**percentage_total_distribution** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_designated_roth_contrib** | **str** | First year of designated Roth contribution | [optional] +**fatca_requirement_indicator** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **str** | Date of payment | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_r_list_item_response import Form1099RListItemResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099RListItemResponse from a JSON string +form1099_r_list_item_response_instance = Form1099RListItemResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099RListItemResponse.to_json()) + +# convert the object into a dict +form1099_r_list_item_response_dict = form1099_r_list_item_response_instance.to_dict() +# create an instance of Form1099RListItemResponse from a dict +form1099_r_list_item_response_from_dict = Form1099RListItemResponse.from_dict(form1099_r_list_item_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Form1099RRequest.md b/docs/A1099/V2/Form1099RRequest.md index 0c160fb..b09ac8c 100644 --- a/docs/A1099/V2/Form1099RRequest.md +++ b/docs/A1099/V2/Form1099RRequest.md @@ -5,49 +5,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gross_distribution** | **float** | | [optional] -**taxable_amount** | **float** | | [optional] -**taxable_amount_not_determined** | **bool** | | [optional] -**total_distribution_determined** | **bool** | | [optional] -**capital_gain** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | | [optional] -**net_unrealized_appreciation_in_employer_securities** | **float** | | [optional] -**distribution_code** | **str** | | [optional] -**second_distribution_code** | **str** | | [optional] -**ira_sep_simple** | **bool** | | [optional] -**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | | [optional] -**other_amount** | **float** | | [optional] -**other_percentage** | **str** | | [optional] -**total_distribution_percentage** | **str** | | [optional] -**total_employee_contributions** | **float** | | [optional] -**amount_allocable_to_irr_within5_years** | **float** | | [optional] -**first_year_of_designated_roth_contribution** | **str** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**date_of_payment** | **datetime** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**gross_distribution** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_determined** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation_in_employer_securities** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code** | **str** | Distribution code | [optional] +**second_distribution_code** | **str** | Second distribution code | [optional] +**ira_sep_simple** | **bool** | IRA/SEP/SIMPLE | [optional] +**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other_amount** | **float** | Other amount | [optional] +**other_percentage** | **str** | Other percentage | [optional] +**total_distribution_percentage** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr_within5_years** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_of_designated_roth_contribution** | **str** | First year of designated Roth contribution | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **datetime** | Date of payment | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Form1099StatusDetailResponse.md b/docs/A1099/V2/Form1099StatusDetailResponse.md new file mode 100644 index 0000000..676727e --- /dev/null +++ b/docs/A1099/V2/Form1099StatusDetailResponse.md @@ -0,0 +1,30 @@ +# Form1099StatusDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **str** | The date the form is scheduled for or the time the status last changed | [optional] +**status** | **str** | The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form1099_status_detail_response import Form1099StatusDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Form1099StatusDetailResponse from a JSON string +form1099_status_detail_response_instance = Form1099StatusDetailResponse.from_json(json) +# print the JSON string representation of the object +print(Form1099StatusDetailResponse.to_json()) + +# convert the object into a dict +form1099_status_detail_response_dict = form1099_status_detail_response_instance.to_dict() +# create an instance of Form1099StatusDetailResponse from a dict +form1099_status_detail_response_from_dict = Form1099StatusDetailResponse.from_dict(form1099_status_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/FormRequestBase.md b/docs/A1099/V2/FormRequestBase.md index acf9ef3..661a2e3 100644 --- a/docs/A1099/V2/FormRequestBase.md +++ b/docs/A1099/V2/FormRequestBase.md @@ -5,28 +5,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/FormRequestListItemBase.md b/docs/A1099/V2/FormRequestListItemBase.md new file mode 100644 index 0000000..efa265f --- /dev/null +++ b/docs/A1099/V2/FormRequestListItemBase.md @@ -0,0 +1,53 @@ +# FormRequestListItemBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**issuer_reference_id** | **str** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**issuer_tin** | **str** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] +**tax_year** | **int** | Tax year | +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.form_request_list_item_base import FormRequestListItemBase + +# TODO update the JSON string below +json = "{}" +# create an instance of FormRequestListItemBase from a JSON string +form_request_list_item_base_instance = FormRequestListItemBase.from_json(json) +# print the JSON string representation of the object +print(FormRequestListItemBase.to_json()) + +# convert the object into a dict +form_request_list_item_base_dict = form_request_list_item_base_instance.to_dict() +# create an instance of FormRequestListItemBase from a dict +form_request_list_item_base_from_dict = FormRequestListItemBase.from_dict(form_request_list_item_base_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/FormResponseBase.md b/docs/A1099/V2/FormResponseBase.md index afd2d2e..078282b 100644 --- a/docs/A1099/V2/FormResponseBase.md +++ b/docs/A1099/V2/FormResponseBase.md @@ -36,11 +36,11 @@ Name | Type | Description | Notes **tin_match** | **bool** | | [optional] **address_verification** | **bool** | | [optional] **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetailApp]**](StateEfileStatusDetailApp.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**validation_errors** | [**List[ValidationErrorApp]**](ValidationErrorApp.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] ## Example diff --git a/docs/A1099/V2/FormSingleRequestBase.md b/docs/A1099/V2/FormSingleRequestBase.md index ad4494f..d166613 100644 --- a/docs/A1099/V2/FormSingleRequestBase.md +++ b/docs/A1099/V2/FormSingleRequestBase.md @@ -5,29 +5,29 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] ## Example diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index 40ba126..fbde3b7 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- -[**bulk_upsert1099_forms**](Forms1099Api.md#bulk_upsert1099_forms) | **POST** /1099/forms/$bulk-upsert | Creates or updates multiple 1099 forms. -[**create1099_form**](Forms1099Api.md#create1099_form) | **POST** /1099/forms | Creates a 1099 form. -[**delete1099_form**](Forms1099Api.md#delete1099_form) | **DELETE** /1099/forms/{id} | Deletes a 1099 form. -[**get1099_form**](Forms1099Api.md#get1099_form) | **GET** /1099/forms/{id} | Retrieves a 1099 form. -[**get1099_form_pdf**](Forms1099Api.md#get1099_form_pdf) | **GET** /1099/forms/{id}/pdf | Retrieves the PDF file for a single 1099 by form id. -[**list1099_forms**](Forms1099Api.md#list1099_forms) | **GET** /1099/forms | Retrieves a list of 1099 forms based on query parameters. -[**update1099_form**](Forms1099Api.md#update1099_form) | **PUT** /1099/forms/{id} | Updates a 1099 form. +[**bulk_upsert1099_forms**](Forms1099Api.md#bulk_upsert1099_forms) | **POST** /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms +[**create1099_form**](Forms1099Api.md#create1099_form) | **POST** /1099/forms | Create a 1099/1095/W2/1042S form +[**delete1099_form**](Forms1099Api.md#delete1099_form) | **DELETE** /1099/forms/{id} | Delete a 1099/1095/W2/1042S form +[**get1099_form**](Forms1099Api.md#get1099_form) | **GET** /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form +[**get1099_form_pdf**](Forms1099Api.md#get1099_form_pdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form +[**list1099_forms**](Forms1099Api.md#list1099_forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms +[**update1099_form**](Forms1099Api.md#update1099_form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form # **bulk_upsert1099_forms** > Form1099ProccessResult bulk_upsert1099_forms(avalara_version) -Creates or updates multiple 1099 forms. +Create or update multiple 1099/1095/W2/1042S forms -This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. +This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. ### Example @@ -46,14 +46,14 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) - avalara_version = '2.0' # str | API version + avalara_version = '2.0.0' # str | API version dry_run = False # bool | (optional) if omitted the server will use the default value of False - x_correlation_id = 'e5719e20-8805-4ccc-b626-013045304315' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '2887c820-8999-462b-a6d0-a806ff098c1d' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) bulk_upsert1099_forms_request = Avalara.SDK.BulkUpsert1099FormsRequest() # BulkUpsert1099FormsRequest | (optional) # example passing only required values which don't have defaults set try: - # Creates or updates multiple 1099 forms. + # Create or update multiple 1099/1095/W2/1042S forms api_response = api_instance.bulk_upsert1099_forms(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -62,7 +62,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Creates or updates multiple 1099 forms. + # Create or update multiple 1099/1095/W2/1042S forms api_response = api_instance.bulk_upsert1099_forms(avalara_version, dry_run=dry_run, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, bulk_upsert1099_forms_request=bulk_upsert1099_forms_request) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -106,9 +106,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **create1099_form** -> Get1099Form200Response create1099_form(avalara_version) +> Create1099Form201Response create1099_form(avalara_version) -Creates a 1099 form. +Create a 1099/1095/W2/1042S form + +Create a 1099/1095/W2/1042S form. ### Example @@ -118,7 +120,7 @@ Creates a 1099 form. import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms1099_api -Get1099Form200Response +Create1099Form201Response ErrorResponse ICreateForm1099Request from pprint import pprint @@ -136,13 +138,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) - avalara_version = '2.0' # str | API version - x_correlation_id = '6095f693-4fb2-48c8-b6e5-c7ab4611f673' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'd0cd754d-adf8-41e6-be0a-b4d205e24e61' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) i_create_form1099_request = Avalara.SDK.ICreateForm1099Request() # ICreateForm1099Request | (optional) # example passing only required values which don't have defaults set try: - # Creates a 1099 form. + # Create a 1099/1095/W2/1042S form api_response = api_instance.create1099_form(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -151,7 +153,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Creates a 1099 form. + # Create a 1099/1095/W2/1042S form api_response = api_instance.create1099_form(avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, i_create_form1099_request=i_create_form1099_request) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -169,7 +171,7 @@ Name | Type | Description | Notes ### Return type -[**Get1099Form200Response**](Get1099Form200Response.md) +[**Create1099Form201Response**](Create1099Form201Response.md) ### Authorization @@ -195,7 +197,9 @@ Name | Type | Description | Notes # **delete1099_form** > delete1099_form(id, avalara_version) -Deletes a 1099 form. +Delete a 1099/1095/W2/1042S form + +Delete a 1099/1095/W2/1042S form. ### Example @@ -222,12 +226,12 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | The unique identifier of the desired form to delete. - avalara_version = '2.0' # str | API version - x_correlation_id = '15d84d4b-81ef-4d59-af08-94e94dc49322' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'addfa5c3-a255-432d-97a0-51af301447b2' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Deletes a 1099 form. + # Delete a 1099/1095/W2/1042S form api_instance.delete1099_form(id, avalara_version) except Avalara.SDK.ApiException as e: print("Exception when calling Forms1099Api->delete1099_form: %s\n" % e) @@ -235,7 +239,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Deletes a 1099 form. + # Delete a 1099/1095/W2/1042S form api_instance.delete1099_form(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) except Avalara.SDK.ApiException as e: print("Exception when calling Forms1099Api->delete1099_form: %s\n" % e) @@ -280,7 +284,9 @@ void (empty response body) # **get1099_form** > Get1099Form200Response get1099_form(id, avalara_version) -Retrieves a 1099 form. +Retrieve a 1099/1095/W2/1042S form + +Retrieve a 1099/1095/W2/1042S form. ### Example @@ -308,12 +314,12 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | - avalara_version = '2.0' # str | API version - x_correlation_id = '72e6716a-27d0-4cd0-8a93-a9aaef422691' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'd24d3112-03b3-42d3-8118-9654a4ed92c1' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Retrieves a 1099 form. + # Retrieve a 1099/1095/W2/1042S form api_response = api_instance.get1099_form(id, avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -322,7 +328,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Retrieves a 1099 form. + # Retrieve a 1099/1095/W2/1042S form api_response = api_instance.get1099_form(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -365,9 +371,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **get1099_form_pdf** -> Update1099Form200Response get1099_form_pdf(id, avalara_version) +> bytearray get1099_form_pdf(id, avalara_version) + +Retrieve the PDF file for a 1099/1095/W2/1042S form -Retrieves the PDF file for a single 1099 by form id. +Retrieve the PDF file for a 1099/1095/W2/1042S form. ### Example @@ -377,7 +385,6 @@ Retrieves the PDF file for a single 1099 by form id. import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms1099_api -Update1099Form200Response ErrorResponse from pprint import pprint @@ -394,14 +401,14 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) - id = 'id_example' # str | - avalara_version = '2.0' # str | API version - mark_edelivered = True # bool | The parameter for marked e-delivered (optional) - x_correlation_id = '782ecb31-ec05-4880-a431-bd7a890e63e6' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | The ID of the form + avalara_version = '2.0.0' # str | API version + mark_edelivered = True # bool | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered (optional) + x_correlation_id = '84d9cf56-2aee-4be1-a89f-de5be5369993' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Retrieves the PDF file for a single 1099 by form id. + # Retrieve the PDF file for a 1099/1095/W2/1042S form api_response = api_instance.get1099_form_pdf(id, avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -410,7 +417,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Retrieves the PDF file for a single 1099 by form id. + # Retrieve the PDF file for a 1099/1095/W2/1042S form api_response = api_instance.get1099_form_pdf(id, avalara_version, mark_edelivered=mark_edelivered, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -421,15 +428,15 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| | + **id** | **str**| The ID of the form | **avalara_version** | **str**| API version | - **mark_edelivered** | **bool**| The parameter for marked e-delivered | [optional] + **mark_edelivered** | **bool**| Optional boolean that if set indicates that the form should be marked as having been successfully edelivered | [optional] **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] ### Return type -[**Update1099Form200Response**](Update1099Form200Response.md) +**bytearray** ### Authorization @@ -438,7 +445,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: application/pdf, application/json ### HTTP response details @@ -454,9 +461,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **list1099_forms** -> Form1099List list1099_forms(avalara_version) +> Form1099ListResponse list1099_forms(avalara_version) + +List 1099/1095/W2/1042S forms -Retrieves a list of 1099 forms based on query parameters. +List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. ### Example @@ -466,7 +475,7 @@ Retrieves a list of 1099 forms based on query parameters. import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms1099_api -Form1099List +Form1099ListResponse ErrorResponse from pprint import pprint @@ -483,16 +492,16 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) - avalara_version = '2.0' # str | API version + avalara_version = '2.0.0' # str | API version filter = 'filter_example' # str | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false (optional) top = 10 # int | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) if omitted the server will use the default value of 10 skip = 0 # int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) if omitted the server will use the default value of 0 order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt (optional) - x_correlation_id = '3023fd6b-afc3-488f-ad85-1dd9f72d9f64' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'edd69041-acfd-4252-8f4f-a0a3f009bda6' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Retrieves a list of 1099 forms based on query parameters. + # List 1099/1095/W2/1042S forms api_response = api_instance.list1099_forms(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -501,7 +510,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Retrieves a list of 1099 forms based on query parameters. + # List 1099/1095/W2/1042S forms api_response = api_instance.list1099_forms(avalara_version, filter=filter, top=top, skip=skip, order_by=order_by, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -522,7 +531,7 @@ Name | Type | Description | Notes ### Return type -[**Form1099List**](Form1099List.md) +[**Form1099ListResponse**](Form1099ListResponse.md) ### Authorization @@ -549,7 +558,9 @@ Name | Type | Description | Notes # **update1099_form** > Update1099Form200Response update1099_form(id, avalara_version) -Updates a 1099 form. +Update a 1099/1095/W2/1042S form + +Update a 1099/1095/W2/1042S form. ### Example @@ -578,13 +589,13 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms1099_api.Forms1099Api(api_client) id = 'id_example' # str | - avalara_version = '2.0' # str | API version - x_correlation_id = '6a610d02-ab2b-4ef8-9554-5149445333f1' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '860f5511-f0d8-45a4-ac62-6d2733e3028d' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) i_update_form1099_request = Avalara.SDK.IUpdateForm1099Request() # IUpdateForm1099Request | (optional) # example passing only required values which don't have defaults set try: - # Updates a 1099 form. + # Update a 1099/1095/W2/1042S form api_response = api_instance.update1099_form(id, avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -593,7 +604,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Updates a 1099 form. + # Update a 1099/1095/W2/1042S form api_response = api_instance.update1099_form(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, i_update_form1099_request=i_update_form1099_request) pprint(api_response) except Avalara.SDK.ApiException as e: diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 386ed96..3b1837d 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -5,19 +5,21 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- [**create_w9_form**](FormsW9Api.md#create_w9_form) | **POST** /w9/forms | Create a W9/W4/W8 form -[**delete_w9_form**](FormsW9Api.md#delete_w9_form) | **DELETE** /w9/forms/{id} | Delete a form +[**delete_w9_form**](FormsW9Api.md#delete_w9_form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form [**get_w9_form**](FormsW9Api.md#get_w9_form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form -[**list_w9_forms**](FormsW9Api.md#list_w9_forms) | **GET** /w9/forms | List W9/W4/W8 forms. -[**send_w9_form_email**](FormsW9Api.md#send_w9_form_email) | **POST** /w9/forms/{id}/$send-email | Sends a W9 email request to a vendor/payee +[**list_w9_forms**](FormsW9Api.md#list_w9_forms) | **GET** /w9/forms | List W9/W4/W8 forms +[**send_w9_form_email**](FormsW9Api.md#send_w9_form_email) | **POST** /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form [**update_w9_form**](FormsW9Api.md#update_w9_form) | **PUT** /w9/forms/{id} | Update a W9/W4/W8 form -[**upload_w9_files**](FormsW9Api.md#upload_w9_files) | **PUT** /w9/forms/{id}/attachment | Upload files for a W9/W4/W8 form +[**upload_w9_files**](FormsW9Api.md#upload_w9_files) | **POST** /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form # **create_w9_form** -> IW9FormDataModelsOneOf create_w9_form(avalara_version) +> CreateW9Form201Response create_w9_form(avalara_version) Create a W9/W4/W8 form +Create a W9/W4/W8 form. + ### Example * Bearer Authentication (bearer): @@ -26,8 +28,9 @@ Create a W9/W4/W8 form import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms_w9_api -IW9FormDataModelsOneOf -ErrorModel +CreateW9FormRequest +CreateW9Form201Response +ErrorResponse from pprint import pprint # Define configuration object with parameters specified to your application. @@ -43,10 +46,10 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) - avalara_version = '2.0' # str | API version - x_correlation_id = '5003c014-1aa4-48a4-91c5-3176fcf2bf73' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'a80d4171-c58b-440c-8cc7-4093fd542b00' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - iw9_form_data_models_one_of = Avalara.SDK.IW9FormDataModelsOneOf() # IW9FormDataModelsOneOf | Form to be created (optional) + create_w9_form_request = {"type":"W9","name":"John Doe","businessName":"Acme Inc.","businessClassification":"Individual","businessOther":null,"foreignPartnerOwnerOrBeneficiary":false,"exemptPayeeCode":null,"exemptFatcaCode":null,"foreignCountryIndicator":false,"address":"123 Main St.","foreignAddress":null,"city":"Anytown","state":"CA","zip":"12345","accountNumber":null,"tinType":"SSN","tin":"543456789","backupWithholding":false,"is1099able":true,"companyId":"32553266","referenceId":null,"email":null,"eDeliveryConsentedAt":null,"signature":null} # CreateW9FormRequest | Form to be created (optional) # example passing only required values which don't have defaults set try: # Create a W9/W4/W8 form @@ -59,7 +62,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # and optional values try: # Create a W9/W4/W8 form - api_response = api_instance.create_w9_form(avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, iw9_form_data_models_one_of=iw9_form_data_models_one_of) + api_response = api_instance.create_w9_form(avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, create_w9_form_request=create_w9_form_request) pprint(api_response) except Avalara.SDK.ApiException as e: print("Exception when calling FormsW9Api->create_w9_form: %s\n" % e) @@ -72,11 +75,11 @@ Name | Type | Description | Notes **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **iw9_form_data_models_one_of** | [**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md)| Form to be created | [optional] + **create_w9_form_request** | [**CreateW9FormRequest**](CreateW9FormRequest.md)| Form to be created | [optional] ### Return type -[**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md) +[**CreateW9Form201Response**](CreateW9Form201Response.md) ### Authorization @@ -92,7 +95,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The created W9/W4/W8 form | - | +**201** | The created W9/W4/W8 form | - | **400** | Bad request (e.g., invalid sort key) | - | **401** | Authentication failed | - | @@ -101,9 +104,9 @@ Name | Type | Description | Notes # **delete_w9_form** > delete_w9_form(id, avalara_version) -Delete a form +Delete a W9/W4/W8 form -Delete a form +Delete a W9/W4/W8 form. ### Example @@ -129,13 +132,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) - id = 'id_example' # str | Id of the form to delete - avalara_version = '2.0' # str | API version - x_correlation_id = '949a3535-39c5-4928-8214-2dc8c4224670' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | ID of the form to delete + avalara_version = '2.0.0' # str | API version + x_correlation_id = '458bae89-b373-4297-b5eb-0e7a18838af3' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Delete a form + # Delete a W9/W4/W8 form api_instance.delete_w9_form(id, avalara_version) except Avalara.SDK.ApiException as e: print("Exception when calling FormsW9Api->delete_w9_form: %s\n" % e) @@ -143,7 +146,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Delete a form + # Delete a W9/W4/W8 form api_instance.delete_w9_form(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) except Avalara.SDK.ApiException as e: print("Exception when calling FormsW9Api->delete_w9_form: %s\n" % e) @@ -153,7 +156,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Id of the form to delete | + **id** | **str**| ID of the form to delete | **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] @@ -183,11 +186,11 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **get_w9_form** -> IW9FormDataModelsOneOf get_w9_form(id, avalara_version) +> CreateW9Form201Response get_w9_form(id, avalara_version) Retrieve a W9/W4/W8 form -Retrieve a W9/W4/W8 form +Retrieve a W9/W4/W8 form. ### Example @@ -197,7 +200,7 @@ Retrieve a W9/W4/W8 form import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms_w9_api -IW9FormDataModelsOneOf +CreateW9Form201Response ErrorResponse from pprint import pprint @@ -214,9 +217,9 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) - id = 'id_example' # str | Id of the form - avalara_version = '2.0' # str | API version - x_correlation_id = '5a0f7713-ffaf-49f0-be47-96783364c87d' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | ID of the form + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'fcd3a4fb-da5b-4195-a470-97567434f46c' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -240,14 +243,14 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Id of the form | + **id** | **str**| ID of the form | **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] ### Return type -[**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md) +[**CreateW9Form201Response**](CreateW9Form201Response.md) ### Authorization @@ -272,7 +275,7 @@ Name | Type | Description | Notes # **list_w9_forms** > PaginatedW9FormsModel list_w9_forms(avalara_version) -List W9/W4/W8 forms. +List W9/W4/W8 forms List W9/W4/W8 forms. @@ -301,17 +304,17 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) - avalara_version = '2.0' # str | API version + avalara_version = '2.0.0' # str | API version filter = 'filter_example' # str | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) top = 10 # int | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) if omitted the server will use the default value of 10 skip = 0 # int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) if omitted the server will use the default value of 0 order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | When true, returns a @recordSetCount in the result set (optional) - x_correlation_id = 'ee2ba593-ca8c-41f1-b96e-5cec3fc8e068' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = 'a4990941-fbe5-45f9-8495-43ed73f8334e' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # List W9/W4/W8 forms. + # List W9/W4/W8 forms api_response = api_instance.list_w9_forms(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -320,7 +323,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # List W9/W4/W8 forms. + # List W9/W4/W8 forms api_response = api_instance.list_w9_forms(avalara_version, filter=filter, top=top, skip=skip, order_by=order_by, count=count, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -367,7 +370,9 @@ Name | Type | Description | Notes # **send_w9_form_email** > IW9FormDataModelsOneOf send_w9_form_email(id, avalara_version) -Sends a W9 email request to a vendor/payee +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. ### Example @@ -395,12 +400,12 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | The ID of the W9/W4/W8 form. - avalara_version = '2.0' # str | API version - x_correlation_id = '6503b7f4-7f28-42c1-8a3c-d158c4b5aa76' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '72cf9106-878e-4643-9b5a-440f89a7b20d' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Sends a W9 email request to a vendor/payee + # Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form api_response = api_instance.send_w9_form_email(id, avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -409,7 +414,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Sends a W9 email request to a vendor/payee + # Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form api_response = api_instance.send_w9_form_email(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -454,6 +459,8 @@ Name | Type | Description | Notes Update a W9/W4/W8 form +Update a W9/W4/W8 form. + ### Example * Bearer Authentication (bearer): @@ -479,9 +486,9 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) - id = 'id_example' # str | Id of the form to update - avalara_version = '2.0' # str | API version - x_correlation_id = 'a40ce0b3-6438-4890-ba0a-ad7be75fb3e1' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | ID of the form to update + avalara_version = '2.0.0' # str | API version + x_correlation_id = '38f0a02f-83cf-4142-b6ed-6b29474177df' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) iw9_form_data_models_one_of = Avalara.SDK.IW9FormDataModelsOneOf() # IW9FormDataModelsOneOf | Form to be updated (optional) # example passing only required values which don't have defaults set @@ -506,7 +513,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Id of the form to update | + **id** | **str**| ID of the form to update | **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] @@ -537,11 +544,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **upload_w9_files** -> str upload_w9_files(id, avalara_version) +> upload_w9_files(id, avalara_version) -Upload files for a W9/W4/W8 form +Replace the PDF file for a W9/W4/W8 form -Upload files for a W9/W4/W8 form +Replaces the PDF file for a W9/W4/W8 form. ### Example @@ -551,7 +558,7 @@ Upload files for a W9/W4/W8 form import time import Avalara.SDK from Avalara.SDK.api.A1099.V2 import forms_w9_api -ErrorModel +ErrorResponse from pprint import pprint # Define configuration object with parameters specified to your application. @@ -568,24 +575,22 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = forms_w9_api.FormsW9Api(api_client) id = 'id_example' # str | Id of the form - avalara_version = '2.0' # str | API version - x_correlation_id = 'fe4f3600-70a9-4fa1-a8a8-28bcf27e678c' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '4fee6fea-2e64-4911-bb75-0931dd2875be' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) file = None # bytearray | (optional) # example passing only required values which don't have defaults set try: - # Upload files for a W9/W4/W8 form - api_response = api_instance.upload_w9_files(id, avalara_version) - pprint(api_response) + # Replace the PDF file for a W9/W4/W8 form + api_instance.upload_w9_files(id, avalara_version) except Avalara.SDK.ApiException as e: print("Exception when calling FormsW9Api->upload_w9_files: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: - # Upload files for a W9/W4/W8 form - api_response = api_instance.upload_w9_files(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, file=file) - pprint(api_response) + # Replace the PDF file for a W9/W4/W8 form + api_instance.upload_w9_files(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client, file=file) except Avalara.SDK.ApiException as e: print("Exception when calling FormsW9Api->upload_w9_files: %s\n" % e) ``` @@ -602,7 +607,7 @@ Name | Type | Description | Notes ### Return type -**str** +void (empty response body) ### Authorization @@ -618,8 +623,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | W9/W4/W8 form with id | - | -**400** | Bad request (e.g., invalid sort key) | - | +**200** | | - | +**400** | Bad request (e.g., Only .pdf files are allowed.) | - | **401** | Authentication failed | - | **404** | Not Found | - | diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 990bd80..2897ce8 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -5,94 +5,118 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**origin_of_health_coverage_code** | **str** | | [optional] -**covered_individuals** | [**List[CoveredIndividualReference]**](CoveredIndividualReference.md) | | [optional] -**id** | **str** | | [optional] -**type** | **str** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **str** | | [optional] -**issuer_tin** | **str** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetail]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **str** | | [optional] -**email** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**tin** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**foreign_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**validation_errors** | [**List[ValidationError]**](ValidationError.md) | | [optional] -**created_at** | **datetime** | | [optional] -**updated_at** | **datetime** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] -**filer_type** | **str** | | [optional] -**payment_type** | **str** | | [optional] -**payment_settlement_entity_name_phone_number** | **str** | | [optional] -**gross_amount_payment_card** | **float** | | [optional] -**card_not_present_transactions** | **float** | | [optional] -**merchant_category_code** | **str** | | [optional] -**payment_transaction_number** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**january** | **float** | | [optional] -**february** | **float** | | [optional] -**march** | **float** | | [optional] -**april** | **float** | | [optional] -**may** | **float** | | [optional] -**june** | **float** | | [optional] -**july** | **float** | | [optional] -**august** | **float** | | [optional] -**sept** | **float** | | [optional] -**october** | **float** | | [optional] -**november** | **float** | | [optional] -**december** | **float** | | [optional] -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_and_health_care** | **float** | | [optional] -**nonemployee_compensation** | **float** | | [optional] -**substitute_payments** | **float** | | [optional] -**direct_sales_indicator** | **bool** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**excess_golden_parachute** | **float** | | [optional] -**gross_amount_paid_attorney** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**section409_a_income** | **float** | | [optional] -**gross_distributions** | **float** | | [optional] -**taxable_amount** | **float** | | [optional] -**taxable_amount_not_determined** | **bool** | | [optional] -**total_distribution_indicator** | **bool** | | [optional] -**capital_gain** | **float** | | [optional] -**employee_contributions** | **float** | | [optional] -**net_unrealized_appreciation** | **float** | | [optional] -**distribution_code_required** | **str** | | [optional] -**distribution_code_optional** | **str** | | [optional] -**ira_sep_simple_indicator** | **bool** | | [optional] -**total_ira_sep_simple_distribution** | **float** | | [optional] -**other** | **float** | | [optional] -**other_percent** | **str** | | [optional] -**percentage_total_distribution** | **str** | | [optional] -**total_employee_contributions** | **float** | | [optional] -**amount_allocable_to_irr** | **float** | | [optional] -**first_year_designated_roth_contrib** | **str** | | [optional] -**fatca_requirement_indicator** | **bool** | | [optional] -**date_of_payment** | **str** | | [optional] +**id** | **str** | ID of the form | [readonly] +**type** | **str** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | +**issuer_id** | **int** | Issuer ID | +**issuer_reference_id** | **str** | Issuer Reference ID | [optional] +**issuer_tin** | **str** | Issuer TIN | [optional] +**tax_year** | **int** | Tax year | [optional] +**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | +**federal_efile_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Federal e-file status | [optional] [readonly] +**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | +**postal_mail_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | +**tin_match_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] +**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | +**address_verification_status** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification status | [optional] [readonly] +**reference_id** | **str** | Reference ID | [optional] +**email** | **str** | Recipient email address | [optional] +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | [optional] +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | US state | [optional] +**zip** | **str** | Zip/postal code | [optional] +**foreign_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] +**created_at** | **datetime** | Creation time | [optional] [readonly] +**updated_at** | **datetime** | Update time | [optional] [readonly] +**state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] +**unique_form_id** | **str** | Unique form identifier | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**recipient_date_of_birth** | **datetime** | Recipient's date of birth | [optional] +**recipient_giin** | **str** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] +**recipient_foreign_tin** | **str** | Recipient's foreign TIN | [optional] +**lob_code** | **str** | Limitation on benefits code | [optional] +**income_code** | **str** | Income code | [optional] +**gross_income** | **float** | Gross income | [optional] +**withholding_indicator** | **str** | Withholding indicator | [optional] +**tax_country_code** | **str** | Country code | [optional] +**exemption_code_chap3** | **str** | Exemption code (Chapter 3) | [optional] +**exemption_code_chap4** | **str** | Exemption code (Chapter 4) | [optional] +**tax_rate_chap3** | **str** | Tax rate (Chapter 3) | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **str** | Chapter 3 status code | [optional] +**chap4_status_code** | **str** | Chapter 4 status code | [optional] +**primary_withholding_agent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] +**origin_of_health_coverage_code** | **str** | Origin of health coverage code | [optional] +**covered_individuals** | [**List[CoveredIndividualReferenceResponse]**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] +**filer_type** | **str** | Filer type (PSE or EPF) | [optional] +**payment_type** | **str** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **str** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **str** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**sept** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_and_health_care** | **float** | Medical and health care payments | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**excess_golden_parachute** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**gross_amount_paid_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**section409_a_income** | **float** | Nonqualified deferred compensation | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | [optional] +**gross_distributions** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_indicator** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**employee_contributions** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code_required** | **str** | Distribution code | [optional] +**distribution_code_optional** | **str** | Second distribution code | [optional] +**ira_sep_simple_indicator** | **bool** | IRA/SEP/SIMPLE | [optional] +**total_ira_sep_simple_distribution** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other** | **float** | Other amount | [optional] +**other_percent** | **str** | Other percentage | [optional] +**percentage_total_distribution** | **str** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_designated_roth_contrib** | **str** | First year of designated Roth contribution | [optional] +**fatca_requirement_indicator** | **bool** | FATCA filing requirement | [optional] +**date_of_payment** | **str** | Date of payment | [optional] ## Example diff --git a/docs/A1099/V2/ICreateForm1099Request.md b/docs/A1099/V2/ICreateForm1099Request.md index 6041f9f..2f9f876 100644 --- a/docs/A1099/V2/ICreateForm1099Request.md +++ b/docs/A1099/V2/ICreateForm1099Request.md @@ -5,64 +5,64 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_ordinary_dividends** | **str** | | [optional] -**qualified_dividends** | **str** | | [optional] -**total_capital_gain_distr** | **str** | | [optional] -**unrecap_sec1250_gain** | **str** | | [optional] -**section1202_gain** | **str** | | [optional] -**collectibles_gain** | **str** | | [optional] -**section897_ordinary_dividends** | **str** | | [optional] -**section897_capital_gain** | **str** | | [optional] -**nondividend_distributions** | **str** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**section199_a_dividends** | **str** | | [optional] -**investment_expenses** | **str** | | [optional] -**foreign_tax_paid** | **str** | | [optional] -**foreign_country_or_us_possession** | **str** | | [optional] -**cash_liquidation_distributions** | **str** | | [optional] -**noncash_liquidation_distributions** | **str** | | [optional] -**exempt_interest_dividends** | **str** | | [optional] -**specified_private_activity_bond_interest_dividends** | **str** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] -**second_tin_notice** | **bool** | | [optional] -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**substitute_payments** | **float** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**gross_proceeds_paid_to_attorney** | **float** | | [optional] -**fish_purchased_for_resale** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**excess_golden_parachute_payments** | **float** | | [optional] -**nonqualified_deferred_compensation** | **float** | | [optional] -**nonemployee_compensation** | **float** | | [optional] +**total_ordinary_dividends** | **str** | Total ordinary dividends | [optional] +**qualified_dividends** | **str** | Qualified dividends | [optional] +**total_capital_gain_distr** | **str** | Total capital gain distributions | [optional] +**unrecap_sec1250_gain** | **str** | Unrecaptured Section 1250 gain | [optional] +**section1202_gain** | **str** | Section 1202 gain | [optional] +**collectibles_gain** | **str** | Collectibles (28%) gain | [optional] +**section897_ordinary_dividends** | **str** | Section 897 ordinary dividends | [optional] +**section897_capital_gain** | **str** | Section 897 capital gain | [optional] +**nondividend_distributions** | **str** | Nondividend distributions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**section199_a_dividends** | **str** | Section 199A dividends | [optional] +**investment_expenses** | **str** | Investment expenses | [optional] +**foreign_tax_paid** | **str** | Foreign tax paid | [optional] +**foreign_country_or_us_possession** | **str** | Foreign country or U.S. possession | [optional] +**cash_liquidation_distributions** | **str** | Cash liquidation distributions | [optional] +**noncash_liquidation_distributions** | **str** | Noncash liquidation distributions | [optional] +**exempt_interest_dividends** | **str** | Exempt-interest dividends | [optional] +**specified_private_activity_bond_interest_dividends** | **str** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_health_care_payments** | **float** | Medical and health care payments | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | ## Example diff --git a/docs/A1099/V2/IUpdateForm1099Request.md b/docs/A1099/V2/IUpdateForm1099Request.md index 539cf5d..2a42b49 100644 --- a/docs/A1099/V2/IUpdateForm1099Request.md +++ b/docs/A1099/V2/IUpdateForm1099Request.md @@ -5,64 +5,64 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_ordinary_dividends** | **str** | | [optional] -**qualified_dividends** | **str** | | [optional] -**total_capital_gain_distr** | **str** | | [optional] -**unrecap_sec1250_gain** | **str** | | [optional] -**section1202_gain** | **str** | | [optional] -**collectibles_gain** | **str** | | [optional] -**section897_ordinary_dividends** | **str** | | [optional] -**section897_capital_gain** | **str** | | [optional] -**nondividend_distributions** | **str** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**section199_a_dividends** | **str** | | [optional] -**investment_expenses** | **str** | | [optional] -**foreign_tax_paid** | **str** | | [optional] -**foreign_country_or_us_possession** | **str** | | [optional] -**cash_liquidation_distributions** | **str** | | [optional] -**noncash_liquidation_distributions** | **str** | | [optional] -**exempt_interest_dividends** | **str** | | [optional] -**specified_private_activity_bond_interest_dividends** | **str** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**type** | **str** | | [optional] [readonly] -**issuer_id** | **str** | | [optional] -**reference_id** | **str** | | [optional] -**recipient_name** | **str** | | [optional] -**recipient_tin** | **str** | | [optional] -**tin_type** | **str** | | [optional] -**recipient_second_name** | **str** | | [optional] -**address** | **str** | | [optional] -**address2** | **str** | | [optional] -**city** | **str** | | [optional] -**state** | **str** | | [optional] -**zip** | **str** | | [optional] -**recipient_email** | **str** | | [optional] -**account_number** | **str** | | [optional] -**office_code** | **str** | | [optional] -**recipient_non_us_province** | **str** | | [optional] -**country_code** | **str** | | [optional] -**federal_e_file** | **bool** | | [optional] -**postal_mail** | **bool** | | [optional] -**state_e_file** | **bool** | | [optional] -**tin_match** | **bool** | | [optional] -**address_verification** | **bool** | | [optional] -**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] -**second_tin_notice** | **bool** | | [optional] -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] -**substitute_payments** | **float** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**gross_proceeds_paid_to_attorney** | **float** | | [optional] -**fish_purchased_for_resale** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**excess_golden_parachute_payments** | **float** | | [optional] -**nonqualified_deferred_compensation** | **float** | | [optional] -**nonemployee_compensation** | **float** | | [optional] +**total_ordinary_dividends** | **str** | Total ordinary dividends | [optional] +**qualified_dividends** | **str** | Qualified dividends | [optional] +**total_capital_gain_distr** | **str** | Total capital gain distributions | [optional] +**unrecap_sec1250_gain** | **str** | Unrecaptured Section 1250 gain | [optional] +**section1202_gain** | **str** | Section 1202 gain | [optional] +**collectibles_gain** | **str** | Collectibles (28%) gain | [optional] +**section897_ordinary_dividends** | **str** | Section 897 ordinary dividends | [optional] +**section897_capital_gain** | **str** | Section 897 capital gain | [optional] +**nondividend_distributions** | **str** | Nondividend distributions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**section199_a_dividends** | **str** | Section 199A dividends | [optional] +**investment_expenses** | **str** | Investment expenses | [optional] +**foreign_tax_paid** | **str** | Foreign tax paid | [optional] +**foreign_country_or_us_possession** | **str** | Foreign country or U.S. possession | [optional] +**cash_liquidation_distributions** | **str** | Cash liquidation distributions | [optional] +**noncash_liquidation_distributions** | **str** | Noncash liquidation distributions | [optional] +**exempt_interest_dividends** | **str** | Exempt-interest dividends | [optional] +**specified_private_activity_bond_interest_dividends** | **str** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **str** | | [optional] +**issuer_id** | **str** | Issuer ID | [optional] +**reference_id** | **str** | Reference ID | [optional] +**recipient_tin** | **str** | Recipient Tax ID Number | [optional] +**recipient_name** | **str** | Recipient name | +**tin_type** | **str** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] +**recipient_second_name** | **str** | Recipient second name | [optional] +**address** | **str** | Address | +**address2** | **str** | Address line 2 | [optional] +**city** | **str** | City | +**state** | **str** | US state. Required if CountryCode is \"US\". | [optional] +**zip** | **str** | Zip/postal code | [optional] +**recipient_email** | **str** | Recipient email address | [optional] +**account_number** | **str** | Account number | [optional] +**office_code** | **str** | Office code | [optional] +**recipient_non_us_province** | **str** | Foreign province | [optional] +**country_code** | **str** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | +**federal_e_file** | **bool** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_e_file** | **bool** | Boolean indicating that state e-filing should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_health_care_payments** | **float** | Medical and health care payments | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | ## Example diff --git a/docs/A1099/V2/IW9FormDataModelsOneOf.md b/docs/A1099/V2/IW9FormDataModelsOneOf.md index 8b9a867..9a72ec1 100644 --- a/docs/A1099/V2/IW9FormDataModelsOneOf.md +++ b/docs/A1099/V2/IW9FormDataModelsOneOf.md @@ -122,9 +122,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **str** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] @@ -203,8 +203,8 @@ Name | Type | Description | Notes **certify_box40** | **bool** | Indicates certification for box 40. | [optional] **box41_sponsoring_entity** | **str** | The sponsoring entity information for box 41. | [optional] **certify_box42** | **bool** | Indicates certification for box 42. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] **tin_match_status** | **str** | The status of the TIN match. | [optional] **signature** | **str** | The signature itself | [optional] **business_classification** | **str** | The classification of the business. | [optional] diff --git a/docs/A1099/V2/IntermediaryOrFlowThrough.md b/docs/A1099/V2/IntermediaryOrFlowThrough.md new file mode 100644 index 0000000..0f6ee3b --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThrough.md @@ -0,0 +1,39 @@ +# IntermediaryOrFlowThrough + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ein** | **str** | | [optional] +**chap3_status_code** | **str** | | [optional] +**chap4_status_code** | **str** | | [optional] +**name** | **str** | | [optional] +**giin** | **str** | | [optional] +**country_code** | **str** | | [optional] +**foreign_tin** | **str** | | [optional] +**address** | **str** | | [optional] +**city** | **str** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through import IntermediaryOrFlowThrough + +# TODO update the JSON string below +json = "{}" +# create an instance of IntermediaryOrFlowThrough from a JSON string +intermediary_or_flow_through_instance = IntermediaryOrFlowThrough.from_json(json) +# print the JSON string representation of the object +print(IntermediaryOrFlowThrough.to_json()) + +# convert the object into a dict +intermediary_or_flow_through_dict = intermediary_or_flow_through_instance.to_dict() +# create an instance of IntermediaryOrFlowThrough from a dict +intermediary_or_flow_through_from_dict = IntermediaryOrFlowThrough.from_dict(intermediary_or_flow_through_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md b/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md new file mode 100644 index 0000000..828c8e8 --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md @@ -0,0 +1,39 @@ +# IntermediaryOrFlowThroughRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ein** | **str** | | [optional] +**chap3_status_code** | **str** | | [optional] +**chap4_status_code** | **str** | | [optional] +**name** | **str** | | [optional] +**giin** | **str** | | [optional] +**country_code** | **str** | | [optional] +**foreign_tin** | **str** | | [optional] +**address** | **str** | | [optional] +**city** | **str** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through_request import IntermediaryOrFlowThroughRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of IntermediaryOrFlowThroughRequest from a JSON string +intermediary_or_flow_through_request_instance = IntermediaryOrFlowThroughRequest.from_json(json) +# print the JSON string representation of the object +print(IntermediaryOrFlowThroughRequest.to_json()) + +# convert the object into a dict +intermediary_or_flow_through_request_dict = intermediary_or_flow_through_request_instance.to_dict() +# create an instance of IntermediaryOrFlowThroughRequest from a dict +intermediary_or_flow_through_request_from_dict = IntermediaryOrFlowThroughRequest.from_dict(intermediary_or_flow_through_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md b/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md new file mode 100644 index 0000000..879b49f --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md @@ -0,0 +1,39 @@ +# IntermediaryOrFlowThroughResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ein** | **str** | | [optional] +**chap3_status_code** | **str** | | [optional] +**chap4_status_code** | **str** | | [optional] +**name** | **str** | | [optional] +**giin** | **str** | | [optional] +**country_code** | **str** | | [optional] +**foreign_tin** | **str** | | [optional] +**address** | **str** | | [optional] +**city** | **str** | | [optional] +**state** | **str** | | [optional] +**zip** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.intermediary_or_flow_through_response import IntermediaryOrFlowThroughResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IntermediaryOrFlowThroughResponse from a JSON string +intermediary_or_flow_through_response_instance = IntermediaryOrFlowThroughResponse.from_json(json) +# print the JSON string representation of the object +print(IntermediaryOrFlowThroughResponse.to_json()) + +# convert the object into a dict +intermediary_or_flow_through_response_dict = intermediary_or_flow_through_response_instance.to_dict() +# create an instance of IntermediaryOrFlowThroughResponse from a dict +intermediary_or_flow_through_response_from_dict = IntermediaryOrFlowThroughResponse.from_dict(intermediary_or_flow_through_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 4851225..6bc37bc 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_issuer**](Issuers1099Api.md#create_issuer) | **POST** /1099/issuers | Create an issuer [**delete_issuer**](Issuers1099Api.md#delete_issuer) | **DELETE** /1099/issuers/{id} | Delete an issuer -[**get_issuer**](Issuers1099Api.md#get_issuer) | **GET** /1099/issuers/{id} | Get an issuer +[**get_issuer**](Issuers1099Api.md#get_issuer) | **GET** /1099/issuers/{id} | Retrieve an issuer [**get_issuers**](Issuers1099Api.md#get_issuers) | **GET** /1099/issuers | List issuers [**update_issuer**](Issuers1099Api.md#update_issuer) | **PUT** /1099/issuers/{id} | Update an issuer @@ -16,7 +16,7 @@ Method | HTTP request | Description Create an issuer -Create a new issuer +Create an issuer (also known as a Payer). ### Example @@ -44,8 +44,8 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) - avalara_version = '2.0' # str | API version - x_correlation_id = 'fa8cab77-a162-404b-8bd9-a580287c744f' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '790d12c4-e473-4e06-8104-e1391469363d' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) issuer_command = Avalara.SDK.IssuerCommand() # IssuerCommand | The issuer to create (optional) # example passing only required values which don't have defaults set @@ -104,7 +104,7 @@ Name | Type | Description | Notes Delete an issuer -Delete an issuer +Delete an issuer (also known as a Payer). ### Example @@ -131,8 +131,8 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) id = 'id_example' # str | Id of the issuer to delete - avalara_version = '2.0' # str | API version - x_correlation_id = 'b341ad72-1306-4af4-9c02-a742c55d8d97' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = 'f4fbae4e-795e-458a-aec2-5e5232efb33b' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -186,9 +186,9 @@ void (empty response body) # **get_issuer** > IssuerResponse get_issuer(id, avalara_version) -Get an issuer +Retrieve an issuer -Get an issuer +Retrieve an issuer (also known as a Payer). ### Example @@ -215,13 +215,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) - id = 'id_example' # str | - avalara_version = '2.0' # str | API version - x_correlation_id = '7d676bbe-e39a-4d59-a548-f9a8e026beed' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | Id of the issuer to retrieve + avalara_version = '2.0.0' # str | API version + x_correlation_id = '826bf1b5-f556-485c-be41-e57e14e5cae9' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: - # Get an issuer + # Retrieve an issuer api_response = api_instance.get_issuer(id, avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -230,7 +230,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Get an issuer + # Retrieve an issuer api_response = api_instance.get_issuer(id, avalara_version, x_correlation_id=x_correlation_id, x_avalara_client=x_avalara_client) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -241,7 +241,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| | + **id** | **str**| Id of the issuer to retrieve | **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] @@ -275,7 +275,7 @@ Name | Type | Description | Notes List issuers -List issuers for a given tax year. Filterable fields are name, referenceId and taxYear +List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. ### Example @@ -302,14 +302,14 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) - avalara_version = '2.0' # str | API version + avalara_version = '2.0.0' # str | API version filter = 'filter_example' # str | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) top = 56 # int | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) skip = 56 # int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) order_by = 'order_by_example' # str | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) count = True # bool | If true, return the global count of elements in the collection. (optional) count_only = True # bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - x_correlation_id = '84029679-b1eb-4ebf-8c73-2612f83c1981' # str | Unique correlation Id in a GUID format (optional) + x_correlation_id = '12264f5a-c0c1-4cb2-8ab1-e5434d55b73f' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: @@ -374,7 +374,7 @@ Name | Type | Description | Notes Update an issuer -Update an existing issuer +Update an issuer (also known as a Payer). ### Example @@ -401,9 +401,9 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = issuers1099_api.Issuers1099Api(api_client) - id = 'id_example' # str | Id of the issuer to Update - avalara_version = '2.0' # str | API version - x_correlation_id = '5eac330a-bb0c-4122-9f83-ec27fc871b05' # str | Unique correlation Id in a GUID format (optional) + id = 'id_example' # str | Id of the issuer to update + avalara_version = '2.0.0' # str | API version + x_correlation_id = '73758ef3-adb6-4b4b-ab1b-96f87332b71d' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) issuer_command = Avalara.SDK.IssuerCommand() # IssuerCommand | The issuer to update (optional) # example passing only required values which don't have defaults set @@ -426,7 +426,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Id of the issuer to Update | + **id** | **str**| Id of the issuer to update | **avalara_version** | **str**| API version | **x_correlation_id** | **str**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **str**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] diff --git a/docs/A1099/V2/JobResult.md b/docs/A1099/V2/JobResult.md index 2fa1858..eaf803a 100644 --- a/docs/A1099/V2/JobResult.md +++ b/docs/A1099/V2/JobResult.md @@ -7,22 +7,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] **type** | **str** | | [optional] -**dry_run** | **bool** | | [optional] -**upsert** | **bool** | | [optional] -**status** | **str** | | [optional] +**dry_run** | **bool** | Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. | [optional] +**upsert** | **bool** | Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year | [optional] +**status** | **str** | Status of the job | [optional] **error_message** | **str** | | [optional] -**total_processed** | **int** | | [optional] -**total_rows** | **int** | | [optional] -**updated_valid** | **int** | | [optional] -**updated_no_email** | **int** | | [optional] -**updated_invalid** | **int** | | [optional] -**skipped_duplicate** | **int** | | [optional] -**skipped_invalid** | **int** | | [optional] -**skipped_multiple_matches** | **int** | | [optional] -**not_found** | **int** | | [optional] -**created_invalid** | **int** | | [optional] -**created_no_email** | **int** | | [optional] -**created_valid** | **int** | | [optional] +**total_processed** | **int** | Total number of forms processed | [optional] +**total_rows** | **int** | Total number of forms in the request | [optional] +**updated_valid** | **int** | Number of forms updated and valid for e-filing and e-delivery | [optional] +**updated_no_email** | **int** | Number of forms updated and valid for e-filing but missing email or email is undeliverable | [optional] +**updated_invalid** | **int** | Number of forms updated but invalid for e-filing | [optional] +**skipped_duplicate** | **int** | Number of forms skipped because they would have updated a record already updated once in the request | [optional] +**skipped_invalid** | **int** | Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing | [optional] +**skipped_multiple_matches** | **int** | Number of forms skipped because they matched multiple forms | [optional] +**not_found** | **int** | Number of forms skipped because no matching form or issuer could be found | [optional] +**created_invalid** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - with errors | [optional] +**created_no_email** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable | [optional] +**created_valid** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery | [optional] ## Example diff --git a/docs/A1099/V2/Jobs1099Api.md b/docs/A1099/V2/Jobs1099Api.md index 8126c6c..4512841 100644 --- a/docs/A1099/V2/Jobs1099Api.md +++ b/docs/A1099/V2/Jobs1099Api.md @@ -40,8 +40,8 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = jobs1099_api.Jobs1099Api(api_client) id = 'id_example' # str | Job id obtained from other API responses, like `/1099/bulk-upsert`. - avalara_version = '2.0' # str | API version - x_correlation_id = '3473f78f-f1bd-48ce-8cad-ad651630addb' # str | Unique correlation Id in a GUID format (optional) + avalara_version = '2.0.0' # str | API version + x_correlation_id = '08e85997-7532-4dd7-96fa-f7a029bb399f' # str | Unique correlation Id in a GUID format (optional) x_avalara_client = 'Swagger UI; 22.1.0' # str | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) # example passing only required values which don't have defaults set try: diff --git a/docs/A1099/V2/PrimaryWithholdingAgent.md b/docs/A1099/V2/PrimaryWithholdingAgent.md new file mode 100644 index 0000000..d107519 --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgent.md @@ -0,0 +1,30 @@ +# PrimaryWithholdingAgent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_withholding_agent_name** | **str** | | [optional] +**primary_withholding_agent_ein** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.primary_withholding_agent import PrimaryWithholdingAgent + +# TODO update the JSON string below +json = "{}" +# create an instance of PrimaryWithholdingAgent from a JSON string +primary_withholding_agent_instance = PrimaryWithholdingAgent.from_json(json) +# print the JSON string representation of the object +print(PrimaryWithholdingAgent.to_json()) + +# convert the object into a dict +primary_withholding_agent_dict = primary_withholding_agent_instance.to_dict() +# create an instance of PrimaryWithholdingAgent from a dict +primary_withholding_agent_from_dict = PrimaryWithholdingAgent.from_dict(primary_withholding_agent_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/PrimaryWithholdingAgentRequest.md b/docs/A1099/V2/PrimaryWithholdingAgentRequest.md new file mode 100644 index 0000000..f7c755d --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgentRequest.md @@ -0,0 +1,30 @@ +# PrimaryWithholdingAgentRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_withholding_agent_name** | **str** | | [optional] +**primary_withholding_agent_ein** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.primary_withholding_agent_request import PrimaryWithholdingAgentRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PrimaryWithholdingAgentRequest from a JSON string +primary_withholding_agent_request_instance = PrimaryWithholdingAgentRequest.from_json(json) +# print the JSON string representation of the object +print(PrimaryWithholdingAgentRequest.to_json()) + +# convert the object into a dict +primary_withholding_agent_request_dict = primary_withholding_agent_request_instance.to_dict() +# create an instance of PrimaryWithholdingAgentRequest from a dict +primary_withholding_agent_request_from_dict = PrimaryWithholdingAgentRequest.from_dict(primary_withholding_agent_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/PrimaryWithholdingAgentResponse.md b/docs/A1099/V2/PrimaryWithholdingAgentResponse.md new file mode 100644 index 0000000..cd56195 --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgentResponse.md @@ -0,0 +1,30 @@ +# PrimaryWithholdingAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_withholding_agent_name** | **str** | | [optional] +**primary_withholding_agent_ein** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.primary_withholding_agent_response import PrimaryWithholdingAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PrimaryWithholdingAgentResponse from a JSON string +primary_withholding_agent_response_instance = PrimaryWithholdingAgentResponse.from_json(json) +# print the JSON string representation of the object +print(PrimaryWithholdingAgentResponse.to_json()) + +# convert the object into a dict +primary_withholding_agent_response_dict = primary_withholding_agent_response_instance.to_dict() +# create an instance of PrimaryWithholdingAgentResponse from a dict +primary_withholding_agent_response_from_dict = PrimaryWithholdingAgentResponse.from_dict(primary_withholding_agent_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/StateAndLocalWithholdingResponse.md b/docs/A1099/V2/StateAndLocalWithholdingResponse.md index ea73325..6472d0d 100644 --- a/docs/A1099/V2/StateAndLocalWithholdingResponse.md +++ b/docs/A1099/V2/StateAndLocalWithholdingResponse.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state_tax_withheld** | **float** | | [optional] -**state** | **str** | | [optional] -**state_id_number** | **str** | | [optional] -**state_income** | **float** | | [optional] -**local_tax_withheld** | **float** | | [optional] -**locality** | **str** | | [optional] -**locality_id_number** | **str** | | [optional] -**local_income** | **float** | | [optional] +**state_tax_withheld** | **float** | Amount of state tax that was withheld | [optional] +**state** | **str** | US state | [optional] +**state_id_number** | **str** | State ID number of the entity issuing the form | [optional] +**state_income** | **float** | Amount of state income | [optional] +**local_tax_withheld** | **float** | Amount of local tax that was withheld | [optional] +**locality** | **str** | Locality name | [optional] +**locality_id_number** | **str** | Locality ID number of the entity issuing the form | [optional] +**local_income** | **float** | Amount of local income | [optional] ## Example diff --git a/docs/A1099/V2/StateEfileStatusDetailResponse.md b/docs/A1099/V2/StateEfileStatusDetailResponse.md new file mode 100644 index 0000000..b94ac23 --- /dev/null +++ b/docs/A1099/V2/StateEfileStatusDetailResponse.md @@ -0,0 +1,31 @@ +# StateEfileStatusDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | [optional] +**time** | **str** | | [optional] +**jurisdiction** | **str** | | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.state_efile_status_detail_response import StateEfileStatusDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StateEfileStatusDetailResponse from a JSON string +state_efile_status_detail_response_instance = StateEfileStatusDetailResponse.from_json(json) +# print the JSON string representation of the object +print(StateEfileStatusDetailResponse.to_json()) + +# convert the object into a dict +state_efile_status_detail_response_dict = state_efile_status_detail_response_instance.to_dict() +# create an instance of StateEfileStatusDetailResponse from a dict +state_efile_status_detail_response_from_dict = StateEfileStatusDetailResponse.from_dict(state_efile_status_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/SubstantialUsOwnerRequest.md b/docs/A1099/V2/SubstantialUsOwnerRequest.md new file mode 100644 index 0000000..620509b --- /dev/null +++ b/docs/A1099/V2/SubstantialUsOwnerRequest.md @@ -0,0 +1,31 @@ +# SubstantialUsOwnerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the substantial U.S. owner of the NFFE. | [optional] +**address** | **str** | The address of the substantial U.S. owner of the NFFE. | [optional] +**tin** | **str** | The taxpayer identification number (TIN) of the substantial U.S. owner of the NFFE. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.substantial_us_owner_request import SubstantialUsOwnerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SubstantialUsOwnerRequest from a JSON string +substantial_us_owner_request_instance = SubstantialUsOwnerRequest.from_json(json) +# print the JSON string representation of the object +print(SubstantialUsOwnerRequest.to_json()) + +# convert the object into a dict +substantial_us_owner_request_dict = substantial_us_owner_request_instance.to_dict() +# create an instance of SubstantialUsOwnerRequest from a dict +substantial_us_owner_request_from_dict = SubstantialUsOwnerRequest.from_dict(substantial_us_owner_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/Update1099Form200Response.md b/docs/A1099/V2/Update1099Form200Response.md index 51434f8..5062f77 100644 --- a/docs/A1099/V2/Update1099Form200Response.md +++ b/docs/A1099/V2/Update1099Form200Response.md @@ -36,11 +36,11 @@ Name | Type | Description | Notes **tin_match** | **bool** | | [optional] **address_verification** | **bool** | | [optional] **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**state_efile_status** | [**List[StateEfileStatusDetailApp]**](StateEfileStatusDetailApp.md) | | [optional] +**state_efile_status** | [**List[StateEfileStatusDetailResponse]**](StateEfileStatusDetailResponse.md) | | [optional] **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] -**validation_errors** | [**List[ValidationErrorApp]**](ValidationErrorApp.md) | | [optional] +**validation_errors** | [**List[ValidationErrorResponse]**](ValidationErrorResponse.md) | | [optional] **second_tin_notice** | **bool** | | [optional] **rents** | **float** | | [optional] **royalties** | **float** | | [optional] @@ -48,7 +48,7 @@ Name | Type | Description | Notes **fed_income_tax_withheld** | **float** | | [optional] **fishing_boat_proceeds** | **float** | | [optional] **medical_health_care_payments** | **float** | | [optional] -**payer_made_direct_sales** | **bool** | | [optional] +**direct_sales_indicator** | **bool** | | [optional] **substitute_payments** | **float** | | [optional] **crop_insurance_proceeds** | **float** | | [optional] **gross_proceeds_paid_to_attorney** | **float** | | [optional] diff --git a/docs/A1099/V2/ValidationErrorResponse.md b/docs/A1099/V2/ValidationErrorResponse.md new file mode 100644 index 0000000..0f31753 --- /dev/null +++ b/docs/A1099/V2/ValidationErrorResponse.md @@ -0,0 +1,30 @@ +# ValidationErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_field** | **str** | The field containing the error | [optional] +**errors** | **List[str]** | The list of error messages | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.validation_error_response import ValidationErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorResponse from a JSON string +validation_error_response_instance = ValidationErrorResponse.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorResponse.to_json()) + +# convert the object into a dict +validation_error_response_dict = validation_error_response_instance.to_dict() +# create an instance of ValidationErrorResponse from a dict +validation_error_response_from_dict = ValidationErrorResponse.from_dict(validation_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W4FormDataModel.md b/docs/A1099/V2/W4FormDataModel.md index 224ca54..f534898 100644 --- a/docs/A1099/V2/W4FormDataModel.md +++ b/docs/A1099/V2/W4FormDataModel.md @@ -122,9 +122,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **str** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] @@ -203,8 +203,8 @@ Name | Type | Description | Notes **certify_box40** | **bool** | Indicates certification for box 40. | [optional] **box41_sponsoring_entity** | **str** | The sponsoring entity information for box 41. | [optional] **certify_box42** | **bool** | Indicates certification for box 42. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] **tin_match_status** | **str** | The status of the TIN match. | [optional] **signature** | **str** | The signature itself | [optional] **business_classification** | **str** | The classification of the business. | [optional] diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md new file mode 100644 index 0000000..b90a0f2 --- /dev/null +++ b/docs/A1099/V2/W4FormRequest.md @@ -0,0 +1,53 @@ +# W4FormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type (always \"w4\" for this model). | [optional] [readonly] +**employee_first_name** | **str** | The first name of the employee. | [optional] +**employee_middle_name** | **str** | The middle name of the employee. | [optional] +**employee_last_name** | **str** | The last name of the employee. | [optional] +**employee_name_suffix** | **str** | The name suffix of the employee. | [optional] +**tin_type** | **str** | The type of TIN provided. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**address** | **str** | The address of the employee. | [optional] +**city** | **str** | The city of residence of the employee. | [optional] +**state** | **str** | The state of residence of the employee. | [optional] +**zip** | **str** | The ZIP code of residence of the employee. | [optional] +**marital_status** | **str** | The marital status of the employee. | [optional] +**last_name_differs** | **bool** | Indicates whether the last name differs from prior records. | [optional] +**num_allowances** | **int** | The number of allowances claimed by the employee. | [optional] +**other_dependents** | **int** | The number of dependents other than allowances. | [optional] +**non_job_income** | **float** | The amount of non-job income. | [optional] +**deductions** | **float** | The amount of deductions claimed. | [optional] +**additional_withheld** | **float** | The additional amount withheld. | [optional] +**exempt_from_withholding** | **bool** | Indicates whether the employee is exempt from withholding. | [optional] +**office_code** | **str** | The office code associated with the form. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w4_form_request import W4FormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W4FormRequest from a JSON string +w4_form_request_instance = W4FormRequest.from_json(json) +# print the JSON string representation of the object +print(W4FormRequest.to_json()) + +# convert the object into a dict +w4_form_request_dict = w4_form_request_instance.to_dict() +# create an instance of W4FormRequest from a dict +w4_form_request_from_dict = W4FormRequest.from_dict(w4_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md new file mode 100644 index 0000000..60e686a --- /dev/null +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -0,0 +1,129 @@ +# W8BenEFormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type (always \"w8bene\" for this model). | [optional] [readonly] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**citizenship_country** | **str** | The country of citizenship. | [optional] +**disregarded_entity** | **str** | The name of the disregarded entity receiving the payment (if applicable). | [optional] +**entity_type** | **str** | The entity type. | [optional] +**making_treaty_claim** | **bool** | Indicates whether the entity is making a treaty claim. | [optional] +**fatca_status** | **str** | The FATCA status. | [optional] +**residence_address** | **str** | The residential address of the individual or entity. | [optional] +**residence_city** | **str** | The city of residence. | [optional] +**residence_state** | **str** | The state of residence. | [optional] +**residence_zip** | **str** | The ZIP code of the residence. | [optional] +**residence_country** | **str** | The country of residence. | [optional] +**residence_is_mailing** | **bool** | Indicates whether the residence address is also the mailing address. | [optional] +**mailing_address** | **str** | The mailing address. | [optional] +**mailing_city** | **str** | The city of the mailing address. | [optional] +**mailing_state** | **str** | The state of the mailing address. | [optional] +**mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] +**mailing_country** | **str** | The country of the mailing address. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**giin** | **str** | The global intermediary identification number (GIIN). | [optional] +**foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] +**foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] +**reference_number** | **str** | A reference number for the form. | [optional] +**disregarded_entity_fatca_status** | **str** | The FATCA status of disregarded entity or branch receiving payment. | [optional] +**disregarded_address** | **str** | The address for disregarded entities. | [optional] +**disregarded_city** | **str** | The city for disregarded entities. | [optional] +**disregarded_state** | **str** | The state for disregarded entities. | [optional] +**disregarded_zip** | **str** | The ZIP code for disregarded entities. | [optional] +**disregarded_country** | **str** | The country for disregarded entities. | [optional] +**disregarded_entity_giin** | **str** | The GIIN for disregarded entities. | [optional] +**treaty_country_certification** | **bool** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] +**treaty_country** | **str** | The treaty country of the beneficial owner. | [optional] +**benefit_limitation_certification** | **bool** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] +**benefit_limitation** | **str** | The benefit limitation for tax treaty claims. | [optional] +**qualified_resident_status_certification** | **bool** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] +**treaty_article** | **str** | Indicates the specific article and paragraph of the tax treaty under which the beneficial owner is claiming benefits. | [optional] +**withholding_rate** | **str** | Specifies the reduced withholding rate claimed under the applicable tax treaty. | [optional] +**income_type** | **str** | Specifies the type of income for which the reduced treaty withholding rate is being claimed. | [optional] +**treaty_reasons** | **str** | The additional conditions in the article the beneficial owner meets to be eligible for the rate of withholding. | [optional] +**ffi_sponsoring_entity** | **str** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] +**investment_entity_certification** | **bool** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] +**controlled_foreign_corporation_certification** | **bool** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] +**compliant_nonregistering_local_bank_certification** | **bool** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] +**compliant_ffi_low_value_accounts_certification** | **bool** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] +**sponsored_closely_held_entity_sponsoring_entity** | **str** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] +**sponsored_closely_held_investment_vehicle_certification** | **bool** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] +**compliant_limited_life_debt_entity_certification** | **bool** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] +**investment_entity_no_financial_accounts_certification** | **bool** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] +**owner_documented_ffi_certification** | **bool** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] +**owner_documented_ffi_reporting_statement_certification** | **bool** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] +**owner_documented_ffi_auditor_letter_certification** | **bool** | Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI. | [optional] +**owner_documented_ffi_trust_beneficiaries_certification** | **bool** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] +**restricted_distributor_certification** | **bool** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] +**restricted_distributor_agreement_certification** | **bool** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] +**restricted_distributor_preexisting_sales_compliance_certification** | **bool** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] +**nonreporting_iga_ffi_certification** | **bool** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] +**iga_country** | **str** | The country for the applicable IGA with the United States. | [optional] +**iga_model** | **str** | The applicable IGA model. | [optional] +**iga_legal_status_treatment** | **str** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] +**iga_ffi_trustee_or_sponsor** | **str** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] +**iga_ffi_trustee_is_foreign** | **bool** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] +**non_commercial_financial_activity_certification** | **bool** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] +**internation_organization_certification** | **bool** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] +**intergovernmental_organization_certification** | **bool** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] +**treaty_qualified_pension_fund_certification** | **bool** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] +**qualified_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] +**narrow_participation_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] +**section401_a_equivalent_pension_plan_certification** | **bool** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] +**investment_entity_for_retirement_funds_certification** | **bool** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] +**exempt_beneficial_owner_sponsored_retirement_fund_certification** | **bool** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] +**exempt_beneficial_owner_owned_investment_entity_certification** | **bool** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] +**territory_financial_institution_certification** | **bool** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] +**excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] +**excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**section501_c_organization_certification** | **bool** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] +**determination_letter_date** | **date** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] +**nonprofit_organization_certification** | **bool** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] +**publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] +**publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] +**nffe_affiliate_of_publicly_traded_entity_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] +**publicly_traded_entity** | **str** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] +**nffe_affiliate_of_publicly_traded_entity_securities_market** | **str** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] +**excepted_territory_nffe_certification** | **bool** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] +**active_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] +**passive_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] +**passive_nffe_no_substantial_us_owners_certification** | **bool** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] +**passive_nffe_substantial_us_owners_provided_certification** | **bool** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] +**excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] +**sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] +**direct_reporting_nffe_sponsoring_entity** | **str** | The name of the entity that sponsors the direct reporting NFFE. | [optional] +**substantial_us_owners** | [**List[SubstantialUsOwnerRequest]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**signer_name** | **str** | The name of the signer. | [optional] +**capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w8_ben_e_form_request import W8BenEFormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W8BenEFormRequest from a JSON string +w8_ben_e_form_request_instance = W8BenEFormRequest.from_json(json) +# print the JSON string representation of the object +print(W8BenEFormRequest.to_json()) + +# convert the object into a dict +w8_ben_e_form_request_dict = w8_ben_e_form_request_instance.to_dict() +# create an instance of W8BenEFormRequest from a dict +w8_ben_e_form_request_from_dict = W8BenEFormRequest.from_dict(w8_ben_e_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index 0b751ac..c91a505 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -79,11 +79,11 @@ Name | Type | Description | Notes **territory_financial_institution_certification** | **bool** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] **excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] **excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] -**startup_formation_or_resolution_date** | **datetime** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] **excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] -**nonfinancial_entity_filing_date** | **datetime** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] **section501_c_organization_certification** | **bool** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] -**determination_letter_date** | **datetime** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] +**determination_letter_date** | **date** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] **nonprofit_organization_certification** | **bool** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] **publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] **publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] diff --git a/docs/A1099/V2/W8BenFormDataModel.md b/docs/A1099/V2/W8BenFormDataModel.md index 7dce16c..90a2723 100644 --- a/docs/A1099/V2/W8BenFormDataModel.md +++ b/docs/A1099/V2/W8BenFormDataModel.md @@ -131,9 +131,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **ein** | **str** | The employer identification number (EIN). | [optional] **ein_type** | **str** | The type of employer identification number (EIN). | [optional] @@ -203,8 +203,8 @@ Name | Type | Description | Notes **certify_box40** | **bool** | Indicates certification for box 40. | [optional] **box41_sponsoring_entity** | **str** | The sponsoring entity information for box 41. | [optional] **certify_box42** | **bool** | Indicates certification for box 42. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] **tin_match_status** | **str** | The status of the TIN match. | [optional] **signature** | **str** | The signature itself | [optional] **business_classification** | **str** | The classification of the business. | [optional] diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md new file mode 100644 index 0000000..e022140 --- /dev/null +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -0,0 +1,58 @@ +# W8BenFormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type (always \"w8ben\" for this model). | [optional] [readonly] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**citizenship_country** | **str** | The country of citizenship. | [optional] +**residence_address** | **str** | The residential address of the individual or entity. | [optional] +**residence_city** | **str** | The city of residence. | [optional] +**residence_state** | **str** | The state of residence. | [optional] +**residence_zip** | **str** | The ZIP code of the residence. | [optional] +**residence_country** | **str** | The country of residence. | [optional] +**residence_is_mailing** | **bool** | Indicates whether the residence address is the mailing address. | [optional] +**mailing_address** | **str** | The mailing address. | [optional] +**mailing_city** | **str** | The city of the mailing address. | [optional] +**mailing_state** | **str** | The state of the mailing address. | [optional] +**mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] +**mailing_country** | **str** | The country of the mailing address. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not legally required. | [optional] +**foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] +**reference_number** | **str** | A reference number for the form. | [optional] +**birthday** | **date** | The birthday of the individual associated with the form. | [optional] +**treaty_country** | **str** | The country for which the treaty applies. | [optional] +**treaty_article** | **str** | The specific article of the treaty being claimed. | [optional] +**treaty_reasons** | **str** | The reasons for claiming treaty benefits. | [optional] +**withholding_rate** | **str** | The withholding rate applied as per the treaty. | [optional] +**income_type** | **str** | The type of income covered by the treaty. | [optional] +**signer_name** | **str** | The name of the signer of the form. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w8_ben_form_request import W8BenFormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W8BenFormRequest from a JSON string +w8_ben_form_request_instance = W8BenFormRequest.from_json(json) +# print the JSON string representation of the object +print(W8BenFormRequest.to_json()) + +# convert the object into a dict +w8_ben_form_request_dict = w8_ben_form_request_instance.to_dict() +# create an instance of W8BenFormRequest from a dict +w8_ben_form_request_from_dict = W8BenFormRequest.from_dict(w8_ben_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W8BeneFormDataModel.md b/docs/A1099/V2/W8BeneFormDataModel.md index 7b17d89..f7499d0 100644 --- a/docs/A1099/V2/W8BeneFormDataModel.md +++ b/docs/A1099/V2/W8BeneFormDataModel.md @@ -105,9 +105,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **employee_first_name** | **str** | The first name of the employee. | [optional] **employee_middle_name** | **str** | The middle name of the employee. | [optional] @@ -203,8 +203,8 @@ Name | Type | Description | Notes **certify_box40** | **bool** | Indicates certification for box 40. | [optional] **box41_sponsoring_entity** | **str** | The sponsoring entity information for box 41. | [optional] **certify_box42** | **bool** | Indicates certification for box 42. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] **tin_match_status** | **str** | The status of the TIN match. | [optional] **signature** | **str** | The signature itself | [optional] **business_classification** | **str** | The classification of the business. | [optional] diff --git a/docs/A1099/V2/W8ImyFormDataModel.md b/docs/A1099/V2/W8ImyFormDataModel.md index 8fe1dc8..45a8b48 100644 --- a/docs/A1099/V2/W8ImyFormDataModel.md +++ b/docs/A1099/V2/W8ImyFormDataModel.md @@ -124,8 +124,8 @@ Name | Type | Description | Notes **certify_box42** | **bool** | Indicates certification for box 42. | [optional] **signer_name** | **str** | The name of the signer of the form. | [optional] **e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] **employee_first_name** | **str** | The first name of the employee. | [optional] **employee_middle_name** | **str** | The middle name of the employee. | [optional] **employee_last_name** | **str** | The last name of the employee. | [optional] @@ -195,9 +195,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **str** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md new file mode 100644 index 0000000..6619097 --- /dev/null +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -0,0 +1,145 @@ +# W8ImyFormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type (always \"w8imy\" for this model). | [optional] [readonly] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**citizenship_country** | **str** | The country of citizenship. | [optional] +**disregarded_entity** | **str** | The name of the disregarded entity receiving the payment (if applicable). | [optional] +**entity_type** | **str** | The entity type. | [optional] +**fatca_status** | **str** | The FATCA status. | [optional] +**residence_address** | **str** | The residential address of the individual or entity. | [optional] +**residence_city** | **str** | The city of residence. | [optional] +**residence_state** | **str** | The state of residence. | [optional] +**residence_zip** | **str** | The ZIP code of the residence. | [optional] +**residence_country** | **str** | The country of residence. | [optional] +**residence_is_mailing** | **bool** | Indicates whether the residence address is also the mailing address. | [optional] +**mailing_address** | **str** | The mailing address. | [optional] +**mailing_city** | **str** | The city of the mailing address. | [optional] +**mailing_state** | **str** | The state of the mailing address. | [optional] +**mailing_zip** | **str** | The ZIP code of the mailing address. | [optional] +**mailing_country** | **str** | The country of the mailing address. | [optional] +**tin_type** | **str** | The type of TIN provided. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**giin** | **str** | The global intermediary identification number (GIIN). | [optional] +**foreign_tin** | **str** | The foreign taxpayer identification number (TIN). | [optional] +**reference_number** | **str** | A reference number for the form. | [optional] +**disregarded_entity_fatca_status** | **str** | The FATCA status of disregarded entity or branch receiving payment. | [optional] +**disregarded_address** | **str** | The address for disregarded entities. | [optional] +**disregarded_city** | **str** | The city for disregarded entities. | [optional] +**disregarded_state** | **str** | The state for disregarded entities. | [optional] +**disregarded_zip** | **str** | The ZIP code for disregarded entities. | [optional] +**disregarded_country** | **str** | The country for disregarded entities. | [optional] +**disregarded_entity_giin** | **str** | The GIIN for disregarded entities. | [optional] +**qualified_intermediary_certification** | **bool** | Certifies that the entity is a Qualified Intermediary (QI) acting in accordance with its QI Agreement, providing required withholding statements and documentation for relevant tax withholding purposes. | [optional] +**qi_primary_withholding_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] +**qi_withholding_responsibility_for_ptp_sales_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] +**qi_nominee_withholding_responsibility_for_ptp_distributions_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] +**qi_securities_lender_substitute_dividend_withholding_certification** | **bool** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**qi_withholding_and1099_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] +**qi_form1099_or_fatca_reporting_responsibility_certification** | **bool** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] +**qi_opt_out_of_form1099_reporting_certification** | **bool** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] +**qi_withholding_rate_pool_certification** | **bool** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] +**qi_intermediary_or_flow_through_entity_documentation_certification** | **bool** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] +**qualified_derivatives_dealer_certification** | **bool** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] +**qdd_corporation** | **bool** | Indicates QDD classification is Corporation. | [optional] +**qdd_partnership** | **bool** | Indicates QDD classification is Partnership. | [optional] +**qdd_disregarded_entity** | **bool** | Indicates QDD classification is Disregarded Entity. | [optional] +**nonqualified_intermediary_certification** | **bool** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] +**nqi_withholding_statement_transmission_certification** | **bool** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] +**nqi_withholding_rate_pool_compliance_certification** | **bool** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] +**nqi_qualified_securities_lender_certification** | **bool** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] +**nqi_alternative_withholding_statement_verification_certification** | **bool** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] +**territory_financial_institution_certification** | **bool** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] +**tfi_treated_as_us_person_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] +**tfi_withholding_statement_transmission_certification** | **bool** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] +**tfi_treated_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] +**tfi_nominee_us_person_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] +**tfi_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] +**us_branch_non_effectively_connected_income_certification** | **bool** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] +**us_branch_agreement_to_be_treated_as_us_person_certification** | **bool** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] +**us_branch_withholding_statement_and_compliance_certification** | **bool** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] +**us_branch_acting_as_us_person_for_ptp_sales_certification** | **bool** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] +**us_branch_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] +**us_branch_not_nominee_for_ptp_distributions_certification** | **bool** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] +**withholding_foreign_partnership_or_trust_certification** | **bool** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] +**nonwithholding_foreign_entity_withholding_statement_certification** | **bool** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] +**foreign_entity_partner_in_lower_tier_partnership_certification** | **bool** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] +**foreign_partnership_amount_realized_section1446_f_certification** | **bool** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] +**foreign_partnership_modified_amount_realized_certification** | **bool** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] +**foreign_grantor_trust_amount_realized_allocation_certification** | **bool** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] +**alternative_withholding_statement_reliance_certification** | **bool** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] +**np_ffi_with_exempt_beneficial_owners_certification** | **bool** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] +**ffi_sponsoring_entity** | **str** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] +**investment_entity_certification** | **bool** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] +**controlled_foreign_corporation_certification** | **bool** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] +**owner_documented_ffi_certification** | **bool** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] +**owner_documented_ffi_reporting_statement_certification** | **bool** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] +**owner_documented_ffi_auditor_letter_certification** | **bool** | Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. | [optional] +**compliant_nonregistering_local_bank_certification** | **bool** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] +**compliant_ffi_low_value_accounts_certification** | **bool** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] +**sponsored_closely_held_entity_sponsoring_entity** | **str** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] +**sponsored_closely_held_investment_vehicle_certification** | **bool** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] +**compliant_limited_life_debt_entity_certification** | **bool** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] +**investment_entity_no_financial_accounts_certification** | **bool** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] +**restricted_distributor_certification** | **bool** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] +**restricted_distributor_agreement_certification** | **bool** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] +**restricted_distributor_preexisting_sales_compliance_certification** | **bool** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] +**foreign_central_bank_of_issue_certification** | **bool** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] +**nonreporting_iga_ffi_certification** | **bool** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] +**iga_country** | **str** | The country for the applicable IGA with the United States. | [optional] +**iga_model** | **str** | The applicable IGA model. | [optional] +**iga_legal_status_treatment** | **str** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] +**iga_ffi_trustee_or_sponsor** | **str** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] +**iga_ffi_trustee_is_foreign** | **bool** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] +**treaty_qualified_pension_fund_certification** | **bool** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] +**qualified_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] +**narrow_participation_retirement_fund_certification** | **bool** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] +**section401_a_equivalent_pension_plan_certification** | **bool** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] +**investment_entity_for_retirement_funds_certification** | **bool** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] +**exempt_beneficial_owner_sponsored_retirement_fund_certification** | **bool** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] +**excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] +**excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] +**publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] +**nffe_affiliate_of_publicly_traded_entity_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] +**publicly_traded_entity** | **str** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] +**nffe_affiliate_of_publicly_traded_entity_securities_market** | **str** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] +**excepted_territory_nffe_certification** | **bool** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] +**active_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] +**passive_nffe_certification** | **bool** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] +**sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] +**direct_reporting_nffe_sponsoring_entity** | **str** | The name of the entity that sponsors the direct reporting NFFE. | [optional] +**signer_name** | **str** | The name of the signer. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w8_imy_form_request import W8ImyFormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W8ImyFormRequest from a JSON string +w8_imy_form_request_instance = W8ImyFormRequest.from_json(json) +# print the JSON string representation of the object +print(W8ImyFormRequest.to_json()) + +# convert the object into a dict +w8_imy_form_request_dict = w8_imy_form_request_instance.to_dict() +# create an instance of W8ImyFormRequest from a dict +w8_imy_form_request_from_dict = W8ImyFormRequest.from_dict(w8_imy_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index d592353..feffe09 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -102,9 +102,9 @@ Name | Type | Description | Notes **exempt_beneficial_owner_sponsored_retirement_fund_certification** | **bool** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] **excepted_nonfinancial_group_entity_certification** | **bool** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] **excepted_nonfinancial_start_up_certification** | **bool** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] -**startup_formation_or_resolution_date** | **datetime** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] +**startup_formation_or_resolution_date** | **date** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] **excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification** | **bool** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] -**nonfinancial_entity_filing_date** | **datetime** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] +**nonfinancial_entity_filing_date** | **date** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] **publicly_traded_nffe_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] **publicly_traded_nffe_securities_market** | **str** | The name of the securities market where the corporation's stock is regularly traded. | [optional] **nffe_affiliate_of_publicly_traded_entity_certification** | **bool** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] diff --git a/docs/A1099/V2/W9FormBaseRequest.md b/docs/A1099/V2/W9FormBaseRequest.md new file mode 100644 index 0000000..4bb0f81 --- /dev/null +++ b/docs/A1099/V2/W9FormBaseRequest.md @@ -0,0 +1,34 @@ +# W9FormBaseRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type. | [optional] [readonly] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w9_form_base_request import W9FormBaseRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W9FormBaseRequest from a JSON string +w9_form_base_request_instance = W9FormBaseRequest.from_json(json) +# print the JSON string representation of the object +print(W9FormBaseRequest.to_json()) + +# convert the object into a dict +w9_form_base_request_dict = w9_form_base_request_instance.to_dict() +# create an instance of W9FormBaseRequest from a dict +w9_form_base_request_from_dict = W9FormBaseRequest.from_dict(w9_form_base_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/A1099/V2/W9FormDataModel.md b/docs/A1099/V2/W9FormDataModel.md index 03bfd79..6c04b04 100644 --- a/docs/A1099/V2/W9FormDataModel.md +++ b/docs/A1099/V2/W9FormDataModel.md @@ -134,9 +134,9 @@ Name | Type | Description | Notes **certify_box41** | **bool** | | [optional] **certify_box43** | **bool** | | [optional] **certify_part29_signature** | **bool** | | [optional] -**part19_formation_or_resolution_date** | **datetime** | | [optional] -**part20_filing_date** | **datetime** | | [optional] -**part21_determination_date** | **datetime** | | [optional] +**part19_formation_or_resolution_date** | **date** | | [optional] +**part20_filing_date** | **date** | | [optional] +**part21_determination_date** | **date** | | [optional] **substantial_us_owners** | [**List[W8BenESubstantialUsOwnerDataModel]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **str** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] @@ -215,8 +215,8 @@ Name | Type | Description | Notes **certify_box40** | **bool** | Indicates certification for box 40. | [optional] **box41_sponsoring_entity** | **str** | The sponsoring entity information for box 41. | [optional] **certify_box42** | **bool** | Indicates certification for box 42. | [optional] -**box35_formed_on_date** | **datetime** | | [optional] -**box36_filed_on_date** | **datetime** | | [optional] +**box35_formed_on_date** | **date** | | [optional] +**box36_filed_on_date** | **date** | | [optional] ## Example diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md new file mode 100644 index 0000000..bdb7229 --- /dev/null +++ b/docs/A1099/V2/W9FormRequest.md @@ -0,0 +1,52 @@ +# W9FormRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The form type (always \"w9\" for this model). | [optional] [readonly] +**name** | **str** | The name of the individual or entity associated with the form. | [optional] +**business_name** | **str** | The name of the business associated with the form. | [optional] +**business_classification** | **str** | The classification of the business. | [optional] +**business_other** | **str** | The classification description when \"businessClassification\" is \"Other\". | [optional] +**foreign_partner_owner_or_beneficiary** | **bool** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] +**exempt_payee_code** | **str** | The exempt payee code. | [optional] +**exempt_fatca_code** | **str** | The exemption from FATCA reporting code. | [optional] +**foreign_country_indicator** | **bool** | Indicates whether the individual or entity is in a foreign country. | [optional] +**address** | **str** | The address of the individual or entity. | [optional] +**foreign_address** | **str** | The foreign address of the individual or entity. | [optional] +**city** | **str** | The city of the address. | [optional] +**state** | **str** | The state of the address. | [optional] +**zip** | **str** | The ZIP code of the address. | [optional] +**account_number** | **str** | The account number associated with the form. | [optional] +**tin_type** | **str** | The type of TIN provided. | [optional] +**tin** | **str** | The taxpayer identification number (TIN). | [optional] +**backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] +**is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] +**company_id** | **str** | The ID of the associated company. | [optional] +**reference_id** | **str** | A reference identifier for the form. | [optional] +**email** | **str** | The email address of the individual associated with the form. | [optional] +**e_delivery_consented_at** | **datetime** | The date when e-delivery was consented. | [optional] +**signature** | **str** | The signature of the form. | [optional] + +## Example + +```python +from Avalara.SDK.models.A1099.V2.w9_form_request import W9FormRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of W9FormRequest from a JSON string +w9_form_request_instance = W9FormRequest.from_json(json) +# print the JSON string representation of the object +print(W9FormRequest.to_json()) + +# convert the object into a dict +w9_form_request_dict = w9_form_request_instance.to_dict() +# create an instance of W9FormRequest from a dict +w9_form_request_from_dict = W9FormRequest.from_dict(w9_form_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/Address.md b/docs/EInvoicing/V1/Address.md new file mode 100644 index 0000000..5861eb6 --- /dev/null +++ b/docs/EInvoicing/V1/Address.md @@ -0,0 +1,34 @@ +# Address + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line1** | **str** | Address line 1 | [optional] +**line2** | **str** | Address line 2 | [optional] +**city** | **str** | City | [optional] +**state** | **str** | State | [optional] +**country** | **str** | Country (ISO 3166) | +**postal_code** | **str** | Postal code | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.address import Address + +# TODO update the JSON string below +json = "{}" +# create an instance of Address from a JSON string +address_instance = Address.from_json(json) +# print the JSON string representation of the object +print(Address.to_json()) + +# convert the object into a dict +address_dict = address_instance.to_dict() +# create an instance of Address from a dict +address_from_dict = Address.from_dict(address_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/BatchErrorDetail.md b/docs/EInvoicing/V1/BatchErrorDetail.md new file mode 100644 index 0000000..a6c9646 --- /dev/null +++ b/docs/EInvoicing/V1/BatchErrorDetail.md @@ -0,0 +1,31 @@ +# BatchErrorDetail + +Represents detailed error information for an individual entry in a batch request. Includes the index of the failed item and associated validation errors. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | The index of the request that caused the error in the batch. | [optional] +**validation_errors** | [**List[ValidationError]**](ValidationError.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.batch_error_detail import BatchErrorDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of BatchErrorDetail from a JSON string +batch_error_detail_instance = BatchErrorDetail.from_json(json) +# print the JSON string representation of the object +print(BatchErrorDetail.to_json()) + +# convert the object into a dict +batch_error_detail_dict = batch_error_detail_instance.to_dict() +# create an instance of BatchErrorDetail from a dict +batch_error_detail_from_dict = BatchErrorDetail.from_dict(batch_error_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/BatchSearch.md b/docs/EInvoicing/V1/BatchSearch.md index 10bef8d..6474b6e 100644 --- a/docs/EInvoicing/V1/BatchSearch.md +++ b/docs/EInvoicing/V1/BatchSearch.md @@ -1,6 +1,6 @@ # BatchSearch -Provides details about a batch search operation, including status, timestamps, and potential errors. +Represents a single batch search operation ## Properties diff --git a/docs/EInvoicing/V1/BatchSearchListResponse.md b/docs/EInvoicing/V1/BatchSearchListResponse.md index 1a021fd..d9ca371 100644 --- a/docs/EInvoicing/V1/BatchSearchListResponse.md +++ b/docs/EInvoicing/V1/BatchSearchListResponse.md @@ -1,14 +1,14 @@ # BatchSearchListResponse -Schema for batch search list +Response schema for listing batch search details. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**record_set_count** | **int** | The count of records in the result set | [optional] +**record_set_count** | **int** | The count of records in the result set. | [optional] **next_link** | **str** | Next Link | [optional] -**value** | [**List[BatchSearch]**](BatchSearch.md) | | [optional] +**value** | [**List[BatchSearch]**](BatchSearch.md) | List of batch search records. | [optional] ## Example diff --git a/docs/EInvoicing/V1/Consents.md b/docs/EInvoicing/V1/Consents.md new file mode 100644 index 0000000..ca6a213 --- /dev/null +++ b/docs/EInvoicing/V1/Consents.md @@ -0,0 +1,29 @@ +# Consents + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list_in_avalara_directory** | **bool** | Indicates whether the trading partner consents to being listed in the directory. If not provided in the payload, its value will default to true. | [optional] [default to True] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.consents import Consents + +# TODO update the JSON string below +json = "{}" +# create an instance of Consents from a JSON string +consents_instance = Consents.from_json(json) +# print the JSON string representation of the object +print(Consents.to_json()) + +# convert the object into a dict +consents_dict = consents_instance.to_dict() +# create an instance of Consents from a dict +consents_from_dict = Consents.from_dict(consents_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/CreateTradingPartner201Response.md b/docs/EInvoicing/V1/CreateTradingPartner201Response.md new file mode 100644 index 0000000..2df5d93 --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartner201Response.md @@ -0,0 +1,31 @@ +# CreateTradingPartner201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Avalara unique ID of the participant in the directory. | [optional] +**status** | **str** | The status of the create operation. | [optional] +**message** | **str** | A human-readable message providing additional context or feedback about the outcome of the operation. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.create_trading_partner201_response import CreateTradingPartner201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTradingPartner201Response from a JSON string +create_trading_partner201_response_instance = CreateTradingPartner201Response.from_json(json) +# print the JSON string representation of the object +print(CreateTradingPartner201Response.to_json()) + +# convert the object into a dict +create_trading_partner201_response_dict = create_trading_partner201_response_instance.to_dict() +# create an instance of CreateTradingPartner201Response from a dict +create_trading_partner201_response_from_dict = CreateTradingPartner201Response.from_dict(create_trading_partner201_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md b/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md new file mode 100644 index 0000000..235d9ff --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md @@ -0,0 +1,31 @@ +# CreateTradingPartnersBatch200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | [optional] +**message** | **str** | A message indicating the result of the batch operation. | [optional] +**value** | [**List[CreateTradingPartnersBatch200ResponseValueInner]**](CreateTradingPartnersBatch200ResponseValueInner.md) | A list of trading partners successfully created. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch200_response import CreateTradingPartnersBatch200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTradingPartnersBatch200Response from a JSON string +create_trading_partners_batch200_response_instance = CreateTradingPartnersBatch200Response.from_json(json) +# print the JSON string representation of the object +print(CreateTradingPartnersBatch200Response.to_json()) + +# convert the object into a dict +create_trading_partners_batch200_response_dict = create_trading_partners_batch200_response_instance.to_dict() +# create an instance of CreateTradingPartnersBatch200Response from a dict +create_trading_partners_batch200_response_from_dict = CreateTradingPartnersBatch200Response.from_dict(create_trading_partners_batch200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md b/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md new file mode 100644 index 0000000..54f4e32 --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md @@ -0,0 +1,31 @@ +# CreateTradingPartnersBatch200ResponseValueInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the created trading partner. | [optional] +**index** | **int** | Index number of the trading partner. | [optional] +**message** | **str** | A success message for the specific created record. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch200_response_value_inner import CreateTradingPartnersBatch200ResponseValueInner + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTradingPartnersBatch200ResponseValueInner from a JSON string +create_trading_partners_batch200_response_value_inner_instance = CreateTradingPartnersBatch200ResponseValueInner.from_json(json) +# print the JSON string representation of the object +print(CreateTradingPartnersBatch200ResponseValueInner.to_json()) + +# convert the object into a dict +create_trading_partners_batch200_response_value_inner_dict = create_trading_partners_batch200_response_value_inner_instance.to_dict() +# create an instance of CreateTradingPartnersBatch200ResponseValueInner from a dict +create_trading_partners_batch200_response_value_inner_from_dict = CreateTradingPartnersBatch200ResponseValueInner.from_dict(create_trading_partners_batch200_response_value_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md b/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md new file mode 100644 index 0000000..6ec1b0e --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md @@ -0,0 +1,29 @@ +# CreateTradingPartnersBatchRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**List[TradingPartner]**](TradingPartner.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.create_trading_partners_batch_request import CreateTradingPartnersBatchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTradingPartnersBatchRequest from a JSON string +create_trading_partners_batch_request_instance = CreateTradingPartnersBatchRequest.from_json(json) +# print the JSON string representation of the object +print(CreateTradingPartnersBatchRequest.to_json()) + +# convert the object into a dict +create_trading_partners_batch_request_dict = create_trading_partners_batch_request_instance.to_dict() +# create an instance of CreateTradingPartnersBatchRequest from a dict +create_trading_partners_batch_request_from_dict = CreateTradingPartnersBatchRequest.from_dict(create_trading_partners_batch_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index ee51670..fd0452e 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -40,11 +40,11 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = data_input_fields_api.DataInputFieldsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) filter = 'requiredFor/countryMandate eq AU-B2G-PEPPOL' # str | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - top = 3.4 # float | The number of items to include in the result. (optional) - skip = 'skip_example' # str | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) + top = 10 # decimal.Decimal | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) + skip = 10 # decimal.Decimal | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) count = true # bool | When set to true, the count of the collection is also returned in the response body (optional) count_only = true # bool | When set to true, only the count of the collection is returned (optional) # example passing only required values which don't have defaults set @@ -72,8 +72,8 @@ Name | Type | Description | Notes **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **filter** | **str**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] - **top** | **float**| The number of items to include in the result. | [optional] - **skip** | **str**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **top** | **decimal.Decimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] + **skip** | **decimal.Decimal**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] **count** | **bool**| When set to true, the count of the collection is also returned in the response body | [optional] **count_only** | **bool**| When set to true, only the count of the collection is returned | [optional] diff --git a/docs/EInvoicing/V1/DataInputFieldsResponse.md b/docs/EInvoicing/V1/DataInputFieldsResponse.md index c7ef366..41a9e0f 100644 --- a/docs/EInvoicing/V1/DataInputFieldsResponse.md +++ b/docs/EInvoicing/V1/DataInputFieldsResponse.md @@ -1,6 +1,5 @@ # DataInputFieldsResponse -Response model providing a list of input fields required, optional, or conditional for different country mandates. ## Properties diff --git a/docs/EInvoicing/V1/DocumentFetch.md b/docs/EInvoicing/V1/DocumentFetch.md index e457988..80e2328 100644 --- a/docs/EInvoicing/V1/DocumentFetch.md +++ b/docs/EInvoicing/V1/DocumentFetch.md @@ -1,6 +1,5 @@ # DocumentFetch -An object of the inbound document ## Properties diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index ee68dba..fd5bbeb 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -44,7 +44,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = documents_api.DocumentsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used accept = 'application/pdf' # str | This header indicates the MIME type of the document document_id = 'document_id_example' # str | The unique ID for this document that was returned in the POST /einvoicing/document response body x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) @@ -135,7 +135,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = documents_api.DocumentsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used fetch_documents_request = Avalara.SDK.FetchDocumentsRequest() # FetchDocumentsRequest | x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) # example passing only required values which don't have defaults set @@ -222,7 +222,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = documents_api.DocumentsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) start_date = '2013-10-20T19:20:30+01:00' # datetime | Start date of documents to return. This defaults to the previous month. (optional) end_date = '2013-10-20T19:20:30+01:00' # datetime | End date of documents to return. This defaults to the current date. (optional) @@ -230,7 +230,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: count = 'true' # str | When set to true, the count of the collection is also returned in the response body (optional) count_only = 'false' # str | When set to true, only the count of the collection is returned (optional) filter = 'id eq 52f60401-44d0-4667-ad47-4afe519abb53' # str | Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. (optional) - top = 3.4 # float | The number of items to include in the result. (optional) + top = 10 # decimal.Decimal | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. (optional) skip = '10' # str | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) # example passing only required values which don't have defaults set try: @@ -262,7 +262,7 @@ Name | Type | Description | Notes **count** | **str**| When set to true, the count of the collection is also returned in the response body | [optional] **count_only** | **str**| When set to true, only the count of the collection is returned | [optional] **filter** | **str**| Filter by field name and value. This filter only supports <code>eq</code> . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. | [optional] - **top** | **float**| The number of items to include in the result. | [optional] + **top** | **decimal.Decimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **skip** | **str**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] ### Return type @@ -323,7 +323,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = documents_api.DocumentsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used document_id = 'document_id_example' # str | The unique ID for this document that was returned in the POST /einvoicing/documents response body x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) # example passing only required values which don't have defaults set @@ -411,7 +411,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = documents_api.DocumentsApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used metadata = Avalara.SDK.SubmitDocumentMetadata() # SubmitDocumentMetadata | data = None # object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) diff --git a/docs/EInvoicing/V1/ErrorResponse.md b/docs/EInvoicing/V1/ErrorResponse.md index 40a59d2..558fa22 100644 --- a/docs/EInvoicing/V1/ErrorResponse.md +++ b/docs/EInvoicing/V1/ErrorResponse.md @@ -1,6 +1,6 @@ # ErrorResponse -Structure for reporting errors encountered during API operations, including title, status, and detailed message. +Standard format for API error responses. ## Properties diff --git a/docs/EInvoicing/V1/Extension.md b/docs/EInvoicing/V1/Extension.md new file mode 100644 index 0000000..b0da913 --- /dev/null +++ b/docs/EInvoicing/V1/Extension.md @@ -0,0 +1,30 @@ +# Extension + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | Name of the custom attribute. | +**values** | **List[str]** | Array of string values associated with the custom attribute. | + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.extension import Extension + +# TODO update the JSON string below +json = "{}" +# create an instance of Extension from a JSON string +extension_instance = Extension.from_json(json) +# print the JSON string representation of the object +print(Extension.to_json()) + +# convert the object into a dict +extension_dict = extension_instance.to_dict() +# create an instance of Extension from a dict +extension_from_dict = Extension.from_dict(extension_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/HmacSignatureValue.md b/docs/EInvoicing/V1/HmacSignatureValue.md index 7723174..96fc2d4 100644 --- a/docs/EInvoicing/V1/HmacSignatureValue.md +++ b/docs/EInvoicing/V1/HmacSignatureValue.md @@ -1,6 +1,5 @@ # HmacSignatureValue -Contains the HMAC algorithm and the resulting signature value used for verifying message integrity. ## Properties diff --git a/docs/EInvoicing/V1/Identifier.md b/docs/EInvoicing/V1/Identifier.md new file mode 100644 index 0000000..4b1b863 --- /dev/null +++ b/docs/EInvoicing/V1/Identifier.md @@ -0,0 +1,31 @@ +# Identifier + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Identifier name (e.g., Peppol Participant ID). | +**display_name** | **str** | Display name of the identifier. | [optional] +**value** | **str** | Value of the identifier. | + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.identifier import Identifier + +# TODO update the JSON string below +json = "{}" +# create an instance of Identifier from a JSON string +identifier_instance = Identifier.from_json(json) +# print the JSON string representation of the object +print(Identifier.to_json()) + +# convert the object into a dict +identifier_dict = identifier_instance.to_dict() +# create an instance of Identifier from a dict +identifier_from_dict = Identifier.from_dict(identifier_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md index cfff461..1c908e8 100644 --- a/docs/EInvoicing/V1/InteropApi.md +++ b/docs/EInvoicing/V1/InteropApi.md @@ -41,7 +41,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: api_instance = interop_api.InteropApi(api_client) document_type = 'document_type_example' # str | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. interchange_type = 'interchange_type_example' # str | Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) file_name = None # bytearray | The file to be uploaded (e.g., UBL XML, CII XML). (optional) diff --git a/docs/EInvoicing/V1/Mandate.md b/docs/EInvoicing/V1/Mandate.md index 1b555d9..16b43fe 100644 --- a/docs/EInvoicing/V1/Mandate.md +++ b/docs/EInvoicing/V1/Mandate.md @@ -1,6 +1,5 @@ # Mandate -An object representing the country mandate ## Properties diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index 82317e5..8fe0229 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -43,7 +43,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mandates_api.MandatesApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used mandate_id = 'AD-B2G-PEPPOL' # str | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body document_type = 'ubl-invoice' # str | Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) document_version = '2.1' # str | Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) @@ -137,11 +137,11 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mandates_api.MandatesApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) filter = 'countryMandate eq DE-B2G-PEPPOL' # str | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - top = 3.4 # float | The number of items to include in the result. (optional) - skip = 'skip_example' # str | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) + top = 10 # decimal.Decimal | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional) + skip = 10 # decimal.Decimal | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) count = true # bool | When set to true, the count of the collection is also returned in the response body. (optional) count_only = true # bool | When set to true, only the count of the collection is returned (optional) # example passing only required values which don't have defaults set @@ -169,8 +169,8 @@ Name | Type | Description | Notes **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **filter** | **str**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] - **top** | **float**| The number of items to include in the result. | [optional] - **skip** | **str**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **top** | **decimal.Decimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] + **skip** | **decimal.Decimal**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] **count** | **bool**| When set to true, the count of the collection is also returned in the response body. | [optional] **count_only** | **bool**| When set to true, only the count of the collection is returned | [optional] diff --git a/docs/EInvoicing/V1/Pagination.md b/docs/EInvoicing/V1/Pagination.md index 7725c24..c45ee3d 100644 --- a/docs/EInvoicing/V1/Pagination.md +++ b/docs/EInvoicing/V1/Pagination.md @@ -1,6 +1,5 @@ # Pagination -Pagination information for the dataset. ## Properties diff --git a/docs/EInvoicing/V1/RequiredWhenField.md b/docs/EInvoicing/V1/RequiredWhenField.md index a2194f2..aa70d27 100644 --- a/docs/EInvoicing/V1/RequiredWhenField.md +++ b/docs/EInvoicing/V1/RequiredWhenField.md @@ -1,6 +1,5 @@ # RequiredWhenField -Mandates for which this field is required ## Properties diff --git a/docs/EInvoicing/V1/SearchParticipants200Response.md b/docs/EInvoicing/V1/SearchParticipants200Response.md new file mode 100644 index 0000000..07c9ec1 --- /dev/null +++ b/docs/EInvoicing/V1/SearchParticipants200Response.md @@ -0,0 +1,31 @@ +# SearchParticipants200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**record_set_count** | **int** | The count of records in the result set. | [optional] +**next_link** | **str** | The next page link to get the next set of results. | [optional] +**value** | [**List[TradingPartner]**](TradingPartner.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.search_participants200_response import SearchParticipants200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchParticipants200Response from a JSON string +search_participants200_response_instance = SearchParticipants200Response.from_json(json) +# print the JSON string representation of the object +print(SearchParticipants200Response.to_json()) + +# convert the object into a dict +search_participants200_response_dict = search_participants200_response_instance.to_dict() +# create an instance of SearchParticipants200Response from a dict +search_participants200_response_from_dict = SearchParticipants200Response.from_dict(search_participants200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/Signature.md b/docs/EInvoicing/V1/Signature.md index e7d939b..d43790e 100644 --- a/docs/EInvoicing/V1/Signature.md +++ b/docs/EInvoicing/V1/Signature.md @@ -1,6 +1,5 @@ # Signature -Defines the signature configuration, specifying whether and how messages are signed for webhook delivery. ## Properties diff --git a/docs/EInvoicing/V1/SignatureValue.md b/docs/EInvoicing/V1/SignatureValue.md index 362da4a..81f074f 100644 --- a/docs/EInvoicing/V1/SignatureValue.md +++ b/docs/EInvoicing/V1/SignatureValue.md @@ -1,6 +1,5 @@ # SignatureValue -Includes the actual signature applied to a webhook message along with the algorithm used. ## Properties diff --git a/docs/EInvoicing/V1/SubscriptionCommon.md b/docs/EInvoicing/V1/SubscriptionCommon.md index d60b3cd..f34eafc 100644 --- a/docs/EInvoicing/V1/SubscriptionCommon.md +++ b/docs/EInvoicing/V1/SubscriptionCommon.md @@ -1,6 +1,5 @@ # SubscriptionCommon -Basic configuration for a webhook subscription, including description and target notification URL. ## Properties diff --git a/docs/EInvoicing/V1/SubscriptionsApi.md b/docs/EInvoicing/V1/SubscriptionsApi.md index b355118..646369e 100644 --- a/docs/EInvoicing/V1/SubscriptionsApi.md +++ b/docs/EInvoicing/V1/SubscriptionsApi.md @@ -43,7 +43,7 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = subscriptions_api.SubscriptionsApi(api_client) - avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.3\". + avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.4\". subscription_registration = Avalara.SDK.SubscriptionRegistration() # SubscriptionRegistration | x_correlation_id = 'x_correlation_id_example' # str | A unique identifier for tracking the request and its response (optional) x_avalara_client = 'x_avalara_client_example' # str | Client application identification (optional) @@ -69,7 +69,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The version of the API to use, e.g., \"1.3\". | + **avalara_version** | **str**| The version of the API to use, e.g., \"1.4\". | **subscription_registration** | [**SubscriptionRegistration**](SubscriptionRegistration.md)| | **x_correlation_id** | **str**| A unique identifier for tracking the request and its response | [optional] **x_avalara_client** | **str**| Client application identification | [optional] @@ -131,7 +131,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = subscriptions_api.SubscriptionsApi(api_client) subscription_id = 'subscription_id_example' # str | - avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.3\". + avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.4\". x_correlation_id = 'x_correlation_id_example' # str | A unique identifier for tracking the request and its response (optional) x_avalara_client = 'x_avalara_client_example' # str | Client application identification (optional) # example passing only required values which don't have defaults set @@ -155,7 +155,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **subscription_id** | **str**| | - **avalara_version** | **str**| The version of the API to use, e.g., \"1.3\". | + **avalara_version** | **str**| The version of the API to use, e.g., \"1.4\". | **x_correlation_id** | **str**| A unique identifier for tracking the request and its response | [optional] **x_avalara_client** | **str**| Client application identification | [optional] @@ -217,7 +217,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = subscriptions_api.SubscriptionsApi(api_client) subscription_id = 'subscription_id_example' # str | - avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.3\". + avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.4\". x_correlation_id = 'x_correlation_id_example' # str | A unique identifier for tracking the request and its response (optional) x_avalara_client = 'x_avalara_client_example' # str | Client application identification (optional) # example passing only required values which don't have defaults set @@ -243,7 +243,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **subscription_id** | **str**| | - **avalara_version** | **str**| The version of the API to use, e.g., \"1.3\". | + **avalara_version** | **str**| The version of the API to use, e.g., \"1.4\". | **x_correlation_id** | **str**| A unique identifier for tracking the request and its response | [optional] **x_avalara_client** | **str**| Client application identification | [optional] @@ -304,11 +304,11 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = subscriptions_api.SubscriptionsApi(api_client) - avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.3\". + avalara_version = 'avalara_version_example' # str | The version of the API to use, e.g., \"1.4\". x_correlation_id = 'x_correlation_id_example' # str | A unique identifier for tracking the request and its response (optional) x_avalara_client = 'x_avalara_client_example' # str | Client application identification (optional) - top = 3.4 # float | The number of items to include in the result. (optional) - skip = 3.4 # float | The number of items to skip in the result. (optional) + top = 56 # int | The number of items to include in the result. (optional) + skip = 56 # int | The number of items to skip in the result. (optional) count = True # bool | Whether to include the total count of records in the result. (optional) count_only = True # bool | Whether to return only the count of records, without the list of records. (optional) # example passing only required values which don't have defaults set @@ -333,11 +333,11 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The version of the API to use, e.g., \"1.3\". | + **avalara_version** | **str**| The version of the API to use, e.g., \"1.4\". | **x_correlation_id** | **str**| A unique identifier for tracking the request and its response | [optional] **x_avalara_client** | **str**| Client application identification | [optional] - **top** | **float**| The number of items to include in the result. | [optional] - **skip** | **float**| The number of items to skip in the result. | [optional] + **top** | **int**| The number of items to include in the result. | [optional] + **skip** | **int**| The number of items to skip in the result. | [optional] **count** | **bool**| Whether to include the total count of records in the result. | [optional] **count_only** | **bool**| Whether to return only the count of records, without the list of records. | [optional] diff --git a/docs/EInvoicing/V1/SuccessResponse.md b/docs/EInvoicing/V1/SuccessResponse.md index 0186c34..81a8eec 100644 --- a/docs/EInvoicing/V1/SuccessResponse.md +++ b/docs/EInvoicing/V1/SuccessResponse.md @@ -1,6 +1,5 @@ # SuccessResponse -Indicates a successful outcome of an API operation, including a generated ID and success message. ## Properties diff --git a/docs/EInvoicing/V1/SupportedDocumentTypes.md b/docs/EInvoicing/V1/SupportedDocumentTypes.md new file mode 100644 index 0000000..469d40b --- /dev/null +++ b/docs/EInvoicing/V1/SupportedDocumentTypes.md @@ -0,0 +1,33 @@ +# SupportedDocumentTypes + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Document type name. | [optional] +**value** | **str** | Document type value. | +**supported_by_trading_partner** | **bool** | Does trading partner support receiving this document type. | +**supported_by_avalara** | **bool** | Does avalara support exchanging this document type. | [optional] +**extensions** | [**List[Extension]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.supported_document_types import SupportedDocumentTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of SupportedDocumentTypes from a JSON string +supported_document_types_instance = SupportedDocumentTypes.from_json(json) +# print the JSON string representation of the object +print(SupportedDocumentTypes.to_json()) + +# convert the object into a dict +supported_document_types_dict = supported_document_types_instance.to_dict() +# create an instance of SupportedDocumentTypes from a dict +supported_document_types_from_dict = SupportedDocumentTypes.from_dict(supported_document_types_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TaxIdentifierRequest.md b/docs/EInvoicing/V1/TaxIdentifierRequest.md new file mode 100644 index 0000000..31fe40b --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierRequest.md @@ -0,0 +1,33 @@ +# TaxIdentifierRequest + +Represents a request to validate company’s tax identifier. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_code** | **str** | The two-letter ISO-3166 country code of the tax identifier. | +**identifier_type** | **str** | Type of the identifier. | +**identifier** | **str** | The tax identifier of the company. | +**extensions** | **object** | Optional field for adding additional details required by specific tax authorities. Refer to the GET /tax-identifiers/schema API endpoint for the full request structure for a given country. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_request import TaxIdentifierRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxIdentifierRequest from a JSON string +tax_identifier_request_instance = TaxIdentifierRequest.from_json(json) +# print the JSON string representation of the object +print(TaxIdentifierRequest.to_json()) + +# convert the object into a dict +tax_identifier_request_dict = tax_identifier_request_instance.to_dict() +# create an instance of TaxIdentifierRequest from a dict +tax_identifier_request_from_dict = TaxIdentifierRequest.from_dict(tax_identifier_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TaxIdentifierResponse.md b/docs/EInvoicing/V1/TaxIdentifierResponse.md new file mode 100644 index 0000000..f905b9b --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierResponse.md @@ -0,0 +1,31 @@ +# TaxIdentifierResponse + +Represents the response for a tax identifier validation request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_code** | **str** | The two-letter ISO-3166 country code of the tax identifier. | +**value** | [**TaxIdentifierResponseValue**](TaxIdentifierResponseValue.md) | | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_response import TaxIdentifierResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxIdentifierResponse from a JSON string +tax_identifier_response_instance = TaxIdentifierResponse.from_json(json) +# print the JSON string representation of the object +print(TaxIdentifierResponse.to_json()) + +# convert the object into a dict +tax_identifier_response_dict = tax_identifier_response_instance.to_dict() +# create an instance of TaxIdentifierResponse from a dict +tax_identifier_response_from_dict = TaxIdentifierResponse.from_dict(tax_identifier_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TaxIdentifierResponseValue.md b/docs/EInvoicing/V1/TaxIdentifierResponseValue.md new file mode 100644 index 0000000..fa6b1d7 --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierResponseValue.md @@ -0,0 +1,31 @@ +# TaxIdentifierResponseValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier_type** | **str** | Type of the identifier. | [optional] +**identifier** | **str** | The tax identifier of the company. | [optional] +**extensions** | **object** | Optional field containing additional company-related information such as companyName, companyAddress, blockListed, tradeName, and taxPayerType. It may also include other details specific to the given tax authority. Refer to the GET /tax-identifiers/schema API endpoint for the full response structure for a given country. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_response_value import TaxIdentifierResponseValue + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxIdentifierResponseValue from a JSON string +tax_identifier_response_value_instance = TaxIdentifierResponseValue.from_json(json) +# print the JSON string representation of the object +print(TaxIdentifierResponseValue.to_json()) + +# convert the object into a dict +tax_identifier_response_value_dict = tax_identifier_response_value_instance.to_dict() +# create an instance of TaxIdentifierResponseValue from a dict +tax_identifier_response_value_from_dict = TaxIdentifierResponseValue.from_dict(tax_identifier_response_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md b/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md new file mode 100644 index 0000000..69431e3 --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md @@ -0,0 +1,30 @@ +# TaxIdentifierSchemaByCountry200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_code** | **str** | The two-letter ISO-3166 country code of the tax identifier. | +**var_schema** | **object** | The JSON Schema definition, following Draft-07 specification, used to validate tax identifier data. | + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.tax_identifier_schema_by_country200_response import TaxIdentifierSchemaByCountry200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of TaxIdentifierSchemaByCountry200Response from a JSON string +tax_identifier_schema_by_country200_response_instance = TaxIdentifierSchemaByCountry200Response.from_json(json) +# print the JSON string representation of the object +print(TaxIdentifierSchemaByCountry200Response.to_json()) + +# convert the object into a dict +tax_identifier_schema_by_country200_response_dict = tax_identifier_schema_by_country200_response_instance.to_dict() +# create an instance of TaxIdentifierSchemaByCountry200Response from a dict +tax_identifier_schema_by_country200_response_from_dict = TaxIdentifierSchemaByCountry200Response.from_dict(tax_identifier_schema_by_country200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TaxIdentifiersApi.md b/docs/EInvoicing/V1/TaxIdentifiersApi.md new file mode 100644 index 0000000..602acba --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifiersApi.md @@ -0,0 +1,192 @@ +# Avalara.SDK.TaxIdentifiersApi + +All URIs are relative to *https://api.sbx.avalara.com/einvoicing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tax_identifier_schema_by_country**](TaxIdentifiersApi.md#tax_identifier_schema_by_country) | **GET** /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. +[**validate_tax_identifier**](TaxIdentifiersApi.md#validate_tax_identifier) | **POST** /tax-identifiers/validate | Validates a tax identifier. + + +# **tax_identifier_schema_by_country** +> TaxIdentifierSchemaByCountry200Response tax_identifier_schema_by_country(avalara_version, country_code) + +Returns the tax identifier request & response schema for a specific country. + +This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import tax_identifiers_api +TaxIdentifierSchemaByCountry200Response +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tax_identifiers_api.TaxIdentifiersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + country_code = 'DE' # str | The two-letter ISO-3166 country code for which the schema should be retrieved. + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + type = 'request' # str | Specifies whether to return the request or response schema. (optional) + # example passing only required values which don't have defaults set + try: + # Returns the tax identifier request & response schema for a specific country. + api_response = api_instance.tax_identifier_schema_by_country(avalara_version, country_code) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TaxIdentifiersApi->tax_identifier_schema_by_country: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Returns the tax identifier request & response schema for a specific country. + api_response = api_instance.tax_identifier_schema_by_country(avalara_version, country_code, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id, type=type) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TaxIdentifiersApi->tax_identifier_schema_by_country: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **country_code** | **str**| The two-letter ISO-3166 country code for which the schema should be retrieved. | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + **type** | **str**| Specifies whether to return the request or response schema. | [optional] + +### Return type + +[**TaxIdentifierSchemaByCountry200Response**](TaxIdentifierSchemaByCountry200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | * X-Correlation-Id -
| +**400** | Invalid request | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **validate_tax_identifier** +> TaxIdentifierResponse validate_tax_identifier(avalara_version, tax_identifier_request) + +Validates a tax identifier. + +This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import tax_identifiers_api +TaxIdentifierRequest +TaxIdentifierResponse +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tax_identifiers_api.TaxIdentifiersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + tax_identifier_request = {"countryCode":"DE","identifierType":"vat","identifier":"123456789"} # TaxIdentifierRequest | + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + # example passing only required values which don't have defaults set + try: + # Validates a tax identifier. + api_response = api_instance.validate_tax_identifier(avalara_version, tax_identifier_request) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TaxIdentifiersApi->validate_tax_identifier: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Validates a tax identifier. + api_response = api_instance.validate_tax_identifier(avalara_version, tax_identifier_request, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TaxIdentifiersApi->validate_tax_identifier: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **tax_identifier_request** | [**TaxIdentifierRequest**](TaxIdentifierRequest.md)| | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**TaxIdentifierResponse**](TaxIdentifierResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success response. | * X-Correlation-Id -
| +**400** | Invalid request | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**429** | Rate limit exceeded | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/TradingPartner.md b/docs/EInvoicing/V1/TradingPartner.md new file mode 100644 index 0000000..1e28ef1 --- /dev/null +++ b/docs/EInvoicing/V1/TradingPartner.md @@ -0,0 +1,38 @@ +# TradingPartner + +Represents a participant in the Avalara directory. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Avalara unique ID of the participant in the directory. | [optional] [readonly] +**name** | **str** | Name of the participant (typically, the name of the business entity). | +**network** | **str** | The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored. | [optional] [readonly] +**registration_date** | **str** | Registration date of the participant if available. | [optional] +**identifiers** | [**List[Identifier]**](Identifier.md) | A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained. | +**addresses** | [**List[Address]**](Address.md) | | +**supported_document_types** | [**List[SupportedDocumentTypes]**](SupportedDocumentTypes.md) | A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored. | +**consents** | [**Consents**](Consents.md) | | [optional] +**extensions** | [**List[Extension]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.trading_partner import TradingPartner + +# TODO update the JSON string below +json = "{}" +# create an instance of TradingPartner from a JSON string +trading_partner_instance = TradingPartner.from_json(json) +# print the JSON string representation of the object +print(TradingPartner.to_json()) + +# convert the object into a dict +trading_partner_dict = trading_partner_instance.to_dict() +# create an instance of TradingPartner from a dict +trading_partner_from_dict = TradingPartner.from_dict(trading_partner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md index da5ab01..b647555 100644 --- a/docs/EInvoicing/V1/TradingPartnersApi.md +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -4,20 +4,24 @@ All URIs are relative to *https://api.sbx.avalara.com/einvoicing* Method | HTTP request | Description ------------- | ------------- | ------------- -[**batch_search_participants**](TradingPartnersApi.md#batch_search_participants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. -[**download_batch_search_report**](TradingPartnersApi.md#download_batch_search_report) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. -[**get_batch_search_detail**](TradingPartnersApi.md#get_batch_search_detail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. -[**list_batch_searches**](TradingPartnersApi.md#list_batch_searches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +[**batch_search_participants**](TradingPartnersApi.md#batch_search_participants) | **POST** /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. +[**create_trading_partner**](TradingPartnersApi.md#create_trading_partner) | **POST** /trading-partners | Creates a new trading partner. +[**create_trading_partners_batch**](TradingPartnersApi.md#create_trading_partners_batch) | **POST** /trading-partners/batch | Creates a batch of multiple trading partners. +[**delete_trading_partner**](TradingPartnersApi.md#delete_trading_partner) | **DELETE** /trading-partners/{id} | Deletes a trading partner using ID. +[**download_batch_search_report**](TradingPartnersApi.md#download_batch_search_report) | **GET** /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. +[**get_batch_search_detail**](TradingPartnersApi.md#get_batch_search_detail) | **GET** /trading-partners/batch-searches/{id} | Returns the batch search details using ID. +[**list_batch_searches**](TradingPartnersApi.md#list_batch_searches) | **GET** /trading-partners/batch-searches | Lists all batch searches that were previously submitted. [**search_participants**](TradingPartnersApi.md#search_participants) | **GET** /trading-partners | Returns a list of participants matching the input query. +[**update_trading_partner**](TradingPartnersApi.md#update_trading_partner) | **PUT** /trading-partners/{id} | Updates a trading partner using ID. # **batch_search_participants** > BatchSearchParticipants202Response batch_search_participants(avalara_version, name, notification_email, file) -Creates a batch search and performs a batch search in the directory for participants in the background. - Handles batch search requests by uploading a file containing search parameters. +This endpoint creates a batch search and performs a batch search in the directory for participants in the background. + ### Example * Bearer (JWT) Authentication (Bearer): @@ -43,15 +47,15 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = trading_partners_api.TradingPartnersApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used - name = 'Automotive Companies in London Search' # str | The human readable name given to this batch search. - notification_email = 'user@example.com' # str | The email address of the user to whom the batch search completion notification must go to. - file = None # bytearray | CSV file containing search parameters. - x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + name = 'Automotive Companies in London Search' # str | A human-readable name for the batch search. + notification_email = 'user@example.com' # str | The email address to which a notification will be sent once the batch search is complete. + file = None # bytearray | CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) # example passing only required values which don't have defaults set try: - # Creates a batch search and performs a batch search in the directory for participants in the background. + # Handles batch search requests by uploading a file containing search parameters. api_response = api_instance.batch_search_participants(avalara_version, name, notification_email, file) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -60,7 +64,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Creates a batch search and performs a batch search in the directory for participants in the background. + # Handles batch search requests by uploading a file containing search parameters. api_response = api_instance.batch_search_participants(avalara_version, name, notification_email, file, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -71,11 +75,11 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | - **name** | **str**| The human readable name given to this batch search. | - **notification_email** | **str**| The email address of the user to whom the batch search completion notification must go to. | - **file** | [**bytearray**](bytearray.md)| CSV file containing search parameters. | - **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **name** | **str**| A <b>human-readable</b> name for the batch search. | + **notification_email** | **str**| The email address to which a notification will be sent once the batch search is complete. | + **file** | [**bytearray**](bytearray.md)| CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -104,12 +108,281 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) +# **create_trading_partner** +> CreateTradingPartner201Response create_trading_partner(avalara_version, trading_partner) + +Creates a new trading partner. + +This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import trading_partners_api +CreateTradingPartner201Response +TradingPartner +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = trading_partners_api.TradingPartnersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + trading_partner = {"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]} # TradingPartner | + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + # example passing only required values which don't have defaults set + try: + # Creates a new trading partner. + api_response = api_instance.create_trading_partner(avalara_version, trading_partner) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->create_trading_partner: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Creates a new trading partner. + api_response = api_instance.create_trading_partner(avalara_version, trading_partner, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->create_trading_partner: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **trading_partner** | [**TradingPartner**](TradingPartner.md)| | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**CreateTradingPartner201Response**](CreateTradingPartner201Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The trading partner has been successfully created. | * X-Correlation-Id -
| +**400** | Bad request | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**409** | Conflict | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **create_trading_partners_batch** +> CreateTradingPartnersBatch200Response create_trading_partners_batch(avalara_version, create_trading_partners_batch_request) + +Creates a batch of multiple trading partners. + +This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import trading_partners_api +CreateTradingPartnersBatch200Response +CreateTradingPartnersBatchRequest +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = trading_partners_api.TradingPartnersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + create_trading_partners_batch_request = {"value":[{"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}]} # CreateTradingPartnersBatchRequest | + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + # example passing only required values which don't have defaults set + try: + # Creates a batch of multiple trading partners. + api_response = api_instance.create_trading_partners_batch(avalara_version, create_trading_partners_batch_request) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->create_trading_partners_batch: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Creates a batch of multiple trading partners. + api_response = api_instance.create_trading_partners_batch(avalara_version, create_trading_partners_batch_request, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->create_trading_partners_batch: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **create_trading_partners_batch_request** | [**CreateTradingPartnersBatchRequest**](CreateTradingPartnersBatchRequest.md)| | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**CreateTradingPartnersBatch200Response**](CreateTradingPartnersBatch200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Batch processing completed | * X-Correlation-Id -
| +**400** | Bad request | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**409** | Conflict | * X-Correlation-Id -
| +**413** | ContentTooLarge | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_trading_partner** +> delete_trading_partner(avalara_version, id) + +Deletes a trading partner using ID. + +This endpoint deletes an existing trading partner identified by the provided ID. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import trading_partners_api +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = trading_partners_api.TradingPartnersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + id = 'id_example' # str | The ID of the trading partner which is being deleted. + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + # example passing only required values which don't have defaults set + try: + # Deletes a trading partner using ID. + api_instance.delete_trading_partner(avalara_version, id) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->delete_trading_partner: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Deletes a trading partner using ID. + api_instance.delete_trading_partner(avalara_version, id, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->delete_trading_partner: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **str**| The ID of the trading partner which is being deleted. | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Trading partner deleted successfully. | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**404** | NotFound | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **download_batch_search_report** > bytearray download_batch_search_report(avalara_version, id) -Download batch search results in a csv file. +Downloads batch search results in a csv file. -Downloads the report for a specific batch search using the batch search ID. +This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. ### Example @@ -135,13 +408,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = trading_partners_api.TradingPartnersApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used - id = '2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99' # str | The ID of the batch search whose report is to be downloaded. - x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + id = '2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99' # str | The ID of the batch search for which the report should be downloaded. + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) # example passing only required values which don't have defaults set try: - # Download batch search results in a csv file. + # Downloads batch search results in a csv file. api_response = api_instance.download_batch_search_report(avalara_version, id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -150,7 +423,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Download batch search results in a csv file. + # Downloads batch search results in a csv file. api_response = api_instance.download_batch_search_report(avalara_version, id, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -161,9 +434,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | - **id** | **str**| The ID of the batch search whose report is to be downloaded. | - **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **str**| The ID of the batch search for which the report should be downloaded. | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -184,7 +457,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successful report download | * X-Correlation-Id -
| +**200** | Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV | * X-Correlation-Id -
| **401** | Unauthorized | * X-Correlation-Id -
| **403** | Forbidden | * X-Correlation-Id -
| **404** | Report not found | * X-Correlation-Id -
| @@ -195,9 +468,9 @@ Name | Type | Description | Notes # **get_batch_search_detail** > BatchSearch get_batch_search_detail(avalara_version, id) -Get the batch search details for a given id. +Returns the batch search details using ID. -This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. +This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. ### Example @@ -225,13 +498,13 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = trading_partners_api.TradingPartnersApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. id = '2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99' # str | The ID of the batch search that was submitted earlier. - x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) # example passing only required values which don't have defaults set try: - # Get the batch search details for a given id. + # Returns the batch search details using ID. api_response = api_instance.get_batch_search_detail(avalara_version, id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -240,7 +513,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # Get the batch search details for a given id. + # Returns the batch search details using ID. api_response = api_instance.get_batch_search_detail(avalara_version, id, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -251,9 +524,9 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | **id** | **str**| The ID of the batch search that was submitted earlier. | - **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -274,10 +547,10 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Get the batch search details for a given id. | * X-Correlation-Id -
| +**200** | The batch search details for a given ID. | * X-Correlation-Id -
| **401** | Unauthorized | * X-Correlation-Id -
| -**404** | Report not found | * X-Correlation-Id -
| **403** | Forbidden | * X-Correlation-Id -
| +**404** | Report not found | * X-Correlation-Id -
| **500** | Internal server error | * X-Correlation-Id -
| [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) @@ -285,9 +558,9 @@ Name | Type | Description | Notes # **list_batch_searches** > BatchSearchListResponse list_batch_searches(avalara_version) -List all batch searches that were previously submitted. +Lists all batch searches that were previously submitted. -This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. +This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. ### Example @@ -314,17 +587,17 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = trading_partners_api.TradingPartnersApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used - x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) - filter = 'name eq 'Batch_Search_Import_V4'' # str | Filter by field name and value. This filter only supports eq .The parameters supported is name. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) - count = true # bool | When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) - top = 3.4 # float | The number of items to include in the result. (optional) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + filter = 'name eq 'Batch_Search_Import_V4'' # str | Filters the results by field name. Only the eq operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) + count = true # bool | When set to true, returns the total count of matching records included as @recordSetCount in the response body. (optional) + top = '10' # str | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. (optional) skip = '10' # str | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) - order_by = 'name desc' # str | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + order_by = 'name desc' # str | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) # example passing only required values which don't have defaults set try: - # List all batch searches that were previously submitted. + # Lists all batch searches that were previously submitted. api_response = api_instance.list_batch_searches(avalara_version) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -333,7 +606,7 @@ with Avalara.SDK.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - # List all batch searches that were previously submitted. + # Lists all batch searches that were previously submitted. api_response = api_instance.list_batch_searches(avalara_version, x_avalara_client=x_avalara_client, filter=filter, count=count, top=top, skip=skip, order_by=order_by, x_correlation_id=x_correlation_id) pprint(api_response) except Avalara.SDK.ApiException as e: @@ -344,13 +617,13 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | - **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] - **filter** | **str**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported is <code>name</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] - **count** | **bool**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] - **top** | **float**| The number of items to include in the result. | [optional] + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **filter** | **str**| Filters the results by field name. Only the <code>eq</code> operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). | [optional] + **count** | **bool**| When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. | [optional] + **top** | **str**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **skip** | **str**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] - **order_by** | **str**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **order_by** | **str**| The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -380,11 +653,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) # **search_participants** -> DirectorySearchResponse search_participants(avalara_version, search) +> SearchParticipants200Response search_participants(avalara_version, search) Returns a list of participants matching the input query. -This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. +This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. ### Example @@ -394,7 +667,7 @@ This endpoint provides a list of trading partners that match a specified input q import time import Avalara.SDK from Avalara.SDK.api.EInvoicing.V1 import trading_partners_api -DirectorySearchResponse +SearchParticipants200Response ErrorResponse from pprint import pprint @@ -411,14 +684,14 @@ configuration = Avalara.SDK.Configuration( with Avalara.SDK.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = trading_partners_api.TradingPartnersApi(api_client) - avalara_version = '1.2' # str | The HTTP Header meant to specify the version of the API intended to be used - search = 'Acme and 7726627177 or BMW' # str | Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. - x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) - count = true # bool | When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) - filter = 'network eq 'Peppol' and country eq 'Australia'' # str | Filter by field name and value. This filter only supports eq .The parameters supported are network, country, documentType, idType. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) - top = 3.4 # float | The number of items to include in the result. (optional) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + search = 'Acme and 7726627177 or BMW' # str | Search by value supports logical AND / OR operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + count = true # bool | When set to true, returns the total count of matching records included as @recordSetCount in the response body. (optional) + filter = 'network eq 'Peppol' and country eq 'Australia'' # str | Filters the results using the eq operator. Supported fields: network, country, documentType, idType. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) + top = '10' # str | If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. (optional) skip = '10' # str | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) - order_by = 'name desc' # str | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + order_by = 'name desc' # str | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) # example passing only required values which don't have defaults set try: @@ -442,19 +715,19 @@ with Avalara.SDK.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used | - **search** | **str**| Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over <code>name</code> and <code>identifier</code> parameters only. | - **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] - **count** | **bool**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] - **filter** | **str**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported are <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] - **top** | **float**| The number of items to include in the result. | [optional] + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **search** | **str**| Search by value supports logical <code>AND</code> / <code>OR</code> operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **count** | **bool**| When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. | [optional] + **filter** | **str**| Filters the results using the <code>eq</code> operator. Supported fields: <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). | [optional] + **top** | **str**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **skip** | **str**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] - **order_by** | **str**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **order_by** | **str**| The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**DirectorySearchResponse**](DirectorySearchResponse.md) +[**SearchParticipants200Response**](SearchParticipants200Response.md) ### Authorization @@ -478,3 +751,97 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) +# **update_trading_partner** +> UpdateTradingPartner200Response update_trading_partner(avalara_version, id, trading_partner) + +Updates a trading partner using ID. + +This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. + +### Example + +* Bearer (JWT) Authentication (Bearer): + +```python +import time +import Avalara.SDK +from Avalara.SDK.api.EInvoicing.V1 import trading_partners_api +UpdateTradingPartner200Response +TradingPartner +ErrorResponse +from pprint import pprint + +# Define configuration object with parameters specified to your application. +configuration = Avalara.SDK.Configuration( + app_name='test app' + app_version='1.0' + machine_name='some machine' + client_id='' + client_secret='' + environment='sandbox' +) +# Enter a context with an instance of the API client +with Avalara.SDK.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = trading_partners_api.TradingPartnersApi(api_client) + avalara_version = '1.4' # str | The HTTP Header meant to specify the version of the API intended to be used. + id = 'id_example' # str | The ID of the trading partner which is being updated. + trading_partner = {"name":"Pineapple Labs ltd","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"address":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]} # TradingPartner | + x_avalara_client = 'John's E-Invoicing-API Client' # str | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + x_correlation_id = 'f3f0d19a-01a1-4748-8a58-f000d0424f43' # str | The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + # example passing only required values which don't have defaults set + try: + # Updates a trading partner using ID. + api_response = api_instance.update_trading_partner(avalara_version, id, trading_partner) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->update_trading_partner: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Updates a trading partner using ID. + api_response = api_instance.update_trading_partner(avalara_version, id, trading_partner, x_avalara_client=x_avalara_client, x_correlation_id=x_correlation_id) + pprint(api_response) + except Avalara.SDK.ApiException as e: + print("Exception when calling TradingPartnersApi->update_trading_partner: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **str**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **str**| The ID of the trading partner which is being updated. | + **trading_partner** | [**TradingPartner**](TradingPartner.md)| | + **x_avalara_client** | **str**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **x_correlation_id** | **str**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**UpdateTradingPartner200Response**](UpdateTradingPartner200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The trading partner has been successfully created. | - | +**400** | Bad request | * X-Correlation-Id -
| +**401** | Unauthorized | * X-Correlation-Id -
| +**403** | Forbidden | * X-Correlation-Id -
| +**404** | NotFound | * X-Correlation-Id -
| +**409** | Conflict | * X-Correlation-Id -
| +**500** | Internal server error | * X-Correlation-Id -
| + +[[Back to top]](#) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + diff --git a/docs/EInvoicing/V1/UpdateTradingPartner200Response.md b/docs/EInvoicing/V1/UpdateTradingPartner200Response.md new file mode 100644 index 0000000..9077179 --- /dev/null +++ b/docs/EInvoicing/V1/UpdateTradingPartner200Response.md @@ -0,0 +1,31 @@ +# UpdateTradingPartner200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Avalara unique ID of the participant in the directory. | [optional] +**status** | **str** | The status of the create operation. | [optional] +**message** | **str** | A human-readable message providing additional context or feedback about the outcome of the operation. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.update_trading_partner200_response import UpdateTradingPartner200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTradingPartner200Response from a JSON string +update_trading_partner200_response_instance = UpdateTradingPartner200Response.from_json(json) +# print the JSON string representation of the object +print(UpdateTradingPartner200Response.to_json()) + +# convert the object into a dict +update_trading_partner200_response_dict = update_trading_partner200_response_instance.to_dict() +# create an instance of UpdateTradingPartner200Response from a dict +update_trading_partner200_response_from_dict = UpdateTradingPartner200Response.from_dict(update_trading_partner200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/ValidationError.md b/docs/EInvoicing/V1/ValidationError.md new file mode 100644 index 0000000..46313a6 --- /dev/null +++ b/docs/EInvoicing/V1/ValidationError.md @@ -0,0 +1,31 @@ +# ValidationError + +Represents a specific validation failure within a request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_field** | **str** | The name of the field that failed validation. | [optional] +**message** | **str** | A human-readable explanation of the error for the specific field. | [optional] + +## Example + +```python +from Avalara.SDK.models.EInvoicing.V1.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EInvoicing/V1/WebhooksErrorResponse.md b/docs/EInvoicing/V1/WebhooksErrorResponse.md index a11e370..c3aa05a 100644 --- a/docs/EInvoicing/V1/WebhooksErrorResponse.md +++ b/docs/EInvoicing/V1/WebhooksErrorResponse.md @@ -1,6 +1,5 @@ # WebhooksErrorResponse -Wrapper for errors occurring during webhook subscription or delivery processing. ## Properties diff --git a/setup.py b/setup.py index 5341749..ed840e3 100644 --- a/setup.py +++ b/setup.py @@ -18,13 +18,13 @@ limitations under the License. Avalara 1099 & W-9 API Definition - ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) @author Sachin Baijal @author Jonathan Wenger @copyright 2022 Avalara, Inc. @license https://www.apache.org/licenses/LICENSE-2.0 -@version 25.7.2 +@version 25.8.0 @link https://github.com/avadev/AvaTax-REST-V3-Python-SDK """ @@ -40,7 +40,7 @@ from setuptools import setup, find_namespace_packages NAME = "Avalara.SDK" -VERSION = "25.7.2" +VERSION = "25.8.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0",