diff --git a/Gemfile.lock b/Gemfile.lock index b03d3a8..ee7c6d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - avalara_sdk (25.9.0) + avalara_sdk (25.10.0) faraday (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index c5e8c3c..a8a58be 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *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 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* | [**get_w9_form_pdf**](docs/A1099/V2/FormsW9Api.md#get_w9_form_pdf) | **GET** /w9/forms/{id}/pdf | Download the PDF for 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 | 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 diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 79b4bf8..b6d6589 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -39,7 +39,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '6df88900-1e19-42cb-b5a0-fc2442681327', # String | Unique correlation Id in a GUID format + x_correlation_id: 'e059925d-91f6-4c34-9bcd-2a0e997dd8fa', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . company_request: AvalaraSdk::A1099::V2::CompanyRequest.new({name: 'name_example', email: 'email_example', address: 'address_example', city: 'city_example', zip: 'zip_example', telephone: 'telephone_example', tin: 'tin_example', country_code: 'country_code_example'}) # CompanyRequest | The company to create } @@ -123,7 +123,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | The company to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '33931030-471d-4055-be36-8dcc3c48c11d', # String | Unique correlation Id in a GUID format + x_correlation_id: 'b01f9bff-5e8c-49d6-8c9b-44892e578dc5', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -210,7 +210,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: 'cf08fb7e-1d1c-43e2-a2b8-dfe7be26d43f', # String | Unique correlation Id in a GUID format + x_correlation_id: '9654708e-0675-4a73-a0fa-5b8016bb2175', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -298,7 +298,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | Id of the company avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'f29e8436-2c45-494b-b537-a22ae251829e', # String | Unique correlation Id in a GUID format + x_correlation_id: 'c9747d06-85d9-42ed-a7d2-1438a48a4d33', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -381,7 +381,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | The ID of the company to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '595ee1c9-2b9e-4d5a-8aa6-661b1fe4669f', # String | Unique correlation Id in a GUID format + x_correlation_id: '0227fcc3-16c4-439b-a4ea-28c316d311ef', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . company_request: AvalaraSdk::A1099::V2::CompanyRequest.new({name: 'name_example', email: 'email_example', address: 'address_example', city: 'city_example', zip: 'zip_example', telephone: 'telephone_example', tin: 'tin_example', country_code: 'country_code_example'}) # CompanyRequest | The updated company data } diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index 208b5a7..9ed32c4 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -42,7 +42,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { dry_run: true, # Boolean | defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB - x_correlation_id: 'eec0b095-bfa8-4786-bbad-3f20a4b61ac2', # String | Unique correlation Id in a GUID format + x_correlation_id: '2d9b6e7b-79bb-4d14-9699-4638bb6151d9', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . form1099_list_request: AvalaraSdk::A1099::V2::Form1099ListRequest.new # Form1099ListRequest | } @@ -126,7 +126,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'ea80e3d4-6198-4297-9fff-4b12b5d270a0', # String | Unique correlation Id in a GUID format + x_correlation_id: '5274903f-4f84-4aba-9dcf-408ca56e00ea', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . get1099_form200_response: AvalaraSdk::A1099::V2::Form1042S.new({unique_form_id: 'unique_form_id_example', income_code: '01', gross_income: 3.56, withholding_indicator: '3', tax_country_code: 'tax_country_code_example', type: 'Form1099Nec', recipient_name: 'recipient_name_example', address: 'address_example', city: 'city_example', country_code: 'country_code_example'}) # Get1099Form200Response | } @@ -210,7 +210,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | The unique identifier of the desired form to delete. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '6f61d545-12cb-445a-b60c-bd21c3f78ae3', # String | Unique correlation Id in a GUID format + x_correlation_id: 'f59c9692-f2fb-4dbe-8cba-98633c4bfb3b', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -292,7 +292,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '3dda6df9-8f00-4ac0-8eab-0e56263c2895', # String | Unique correlation Id in a GUID format + x_correlation_id: '73429041-37dd-428a-8fd5-94f9bfdc849d', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -376,7 +376,7 @@ id = 'id_example' # String | The ID of the form avalara_version = '2.0.0' # String | API version opts = { mark_edelivered: true, # Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - x_correlation_id: '83471033-6587-4425-a03e-1057de8d14cf', # String | Unique correlation Id in a GUID format + x_correlation_id: '880a787b-1d92-485f-a3db-b5277d3d0ba1', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -465,7 +465,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: '9cd2b713-72ed-419c-8c1f-4aeef9f6b0d4', # String | Unique correlation Id in a GUID format + x_correlation_id: '612ac19d-6b12-4fe1-b92b-61e73b3b5d54', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -553,7 +553,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'b0bb9771-ffdf-4884-bac3-7cf00bf7c745', # String | Unique correlation Id in a GUID format + x_correlation_id: '5717cd04-c60c-4603-9ede-aba2bec55e19', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . get1099_form200_response: AvalaraSdk::A1099::V2::Form1042S.new({unique_form_id: 'unique_form_id_example', income_code: '01', gross_income: 3.56, withholding_indicator: '3', tax_country_code: 'tax_country_code_example', type: 'Form1099Nec', recipient_name: 'recipient_name_example', address: 'address_example', city: 'city_example', country_code: 'country_code_example'}) # Get1099Form200Response | } diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index b44f5cd..90fc5d8 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -8,6 +8,7 @@ All URIs are relative to *https://api.sbx.avalara.com/avalara1099* | [**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 W9/W4/W8 form | | [**get_w9_form**](FormsW9Api.md#get_w9_form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form | +| [**get_w9_form_pdf**](FormsW9Api.md#get_w9_form_pdf) | **GET** /w9/forms/{id}/pdf | Download the PDF for 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 | 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 | @@ -42,7 +43,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '0ab9baaf-56ae-484d-a812-1586d6141797', # String | Unique correlation Id in a GUID format + x_correlation_id: 'fa427ec8-fbb3-4e25-8c7e-2f81d68241ec', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . create_and_send_w9_form_email_request: AvalaraSdk::A1099::V2::W4FormMinimalRequest.new({email: 'email_example', employee_first_name: 'employee_first_name_example', employee_last_name: 'employee_last_name_example'}) # CreateAndSendW9FormEmailRequest | Form to be created } @@ -125,7 +126,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'd1c7d02a-c0be-4a64-9fbb-0b4aed2f526c', # String | Unique correlation Id in a GUID format + x_correlation_id: '6bde16cf-bc27-448b-8abd-a3461599deff', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . create_w9_form_request: AvalaraSdk::A1099::V2::W4FormRequest.new({employee_first_name: 'employee_first_name_example', employee_last_name: 'employee_last_name_example', tin_type: 'tin_type_example', tin: 'tin_example'}) # CreateW9FormRequest | Form to be created } @@ -209,7 +210,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '5c349318-0f66-4478-bcc0-ce6af3c9f485', # String | Unique correlation Id in a GUID format + x_correlation_id: '4bc1a0f7-f202-4e27-ba6d-37645f4a839e', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -291,7 +292,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'f39583e2-33c6-460f-aed2-66bc23ef3b6a', # String | Unique correlation Id in a GUID format + x_correlation_id: '7dd6cb2c-d9ed-4fb7-8f97-67d35d09e59e', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -345,6 +346,88 @@ end - **Accept**: application/json +## get_w9_form_pdf + +> get_w9_form_pdf(id, avalara_version, opts) + +Download the PDF for a W9/W4/W8 form. + +Returns the PDF file for a W9/W4/W8 form. + +### Examples + +```ruby +require 'time' +require 'avalara_sdk' +# setup authorization +AvalaraSdk::A1099::V2.configure do |config| + # See Documentation for Authorization section in main README.md for more auth examples. + config.bearer_token='' + config.environment='sandbox' + config.app_name='testApp' + config.app_version='1.2.3' + config.machine_name='testMachine' +end + +api_client = AvalaraSdk::ApiClient.new config +api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client + +id = 'id_example' # String | Id of the form +avalara_version = '2.0.0' # String | API version +opts = { + x_correlation_id: '783194b6-5fc6-41c5-a5b4-1b02018e09dd', # String | Unique correlation Id in a GUID format + x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . +} + +begin + # Download the PDF for a W9/W4/W8 form. + api_instance.get_w9_form_pdf(id, avalara_version, opts) +rescue AvalaraSdk::ApiError => e + puts "Error when calling FormsW9Api->get_w9_form_pdf: #{e}" +end +``` + +#### Using the get_w9_form_pdf_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> get_w9_form_pdf_with_http_info(id, avalara_version, opts) + +```ruby +begin + # Download the PDF for a W9/W4/W8 form. + data, status_code, headers = api_instance.get_w9_form_pdf_with_http_info(id, avalara_version, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue AvalaraSdk::A1099::V2::ApiError => e + puts "Error when calling FormsW9Api->get_w9_form_pdf_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Id of the form | | +| **avalara_version** | **String** | API version | | +| **x_correlation_id** | **String** | Unique correlation Id in a GUID format | [optional] | +| **x_avalara_client** | **String** | 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 + +nil (empty response body) + +### Authorization + +[bearer](../../../README.md#documentation-for-authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + + ## list_w9_forms > list_w9_forms(avalara_version, opts) @@ -379,7 +462,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: 'a60536fb-e758-4f92-a0cd-7d99addcc735', # String | Unique correlation Id in a GUID format + x_correlation_id: 'c1b56927-f8e5-4243-8fd5-b5d13f7c0c29', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -467,7 +550,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | The ID of the W9/W4/W8 form. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '8f2f717b-24cb-4bf1-9820-ded88ed93798', # String | Unique correlation Id in a GUID format + x_correlation_id: 'ef646026-89fe-420b-bea9-e29ec45d9557', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -550,7 +633,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '8688fb2d-d79c-433a-9abf-4f96ea744f32', # String | Unique correlation Id in a GUID format + x_correlation_id: 'ac8f162c-fbee-4c4d-b9fa-986df02c90e3', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . create_w9_form_request: AvalaraSdk::A1099::V2::W4FormRequest.new({employee_first_name: 'employee_first_name_example', employee_last_name: 'employee_last_name_example', tin_type: 'tin_type_example', tin: 'tin_example'}) # CreateW9FormRequest | Form to be updated } @@ -635,7 +718,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | Id of the form avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '13008974-9cbc-417c-a3d1-7779277a2077', # String | Unique correlation Id in a GUID format + x_correlation_id: 'c332bc05-2179-4a35-bd1a-1d01a3d03e36', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . file: File.new('/path/to/some/file') # File | } diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 664d787..446d3c8 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -39,7 +39,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '019c2b9f-42e4-424f-a440-2de4183e50c9', # String | Unique correlation Id in a GUID format + x_correlation_id: '0183bbfe-d8da-48ad-a320-b999accf40bd', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . issuer_request: AvalaraSdk::A1099::V2::IssuerRequest.new({name: 'name_example', telephone: 'telephone_example', tax_year: 37, email: 'email_example', address: 'address_example', city: 'city_example', state: 'state_example', zip: 'zip_example', last_filing: false}) # IssuerRequest | The issuer to create } @@ -123,7 +123,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '2c4f0724-28b8-4321-940c-7aea4e6a1ae4', # String | Unique correlation Id in a GUID format + x_correlation_id: 'c0d08fe4-5eaf-4902-aa48-db347d045ba2', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -205,7 +205,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to retrieve avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'e7d6ad5f-3589-4822-b711-bb658238ebf6', # String | Unique correlation Id in a GUID format + x_correlation_id: '126ca6ac-f595-4b34-ada2-22cdd14960f5', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -293,7 +293,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: '2c3cf6e2-a30b-4934-8dad-94105b6b668c', # String | Unique correlation Id in a GUID format + x_correlation_id: '51f8e5b5-bb09-4b2c-954f-f0f7b119003b', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } @@ -381,7 +381,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '1d3cb56d-6c88-4c68-863a-81b0f64c270f', # String | Unique correlation Id in a GUID format + x_correlation_id: '508db50e-5f2e-404d-9974-509003a9dfa8', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0', # String | 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/) . issuer_request: AvalaraSdk::A1099::V2::IssuerRequest.new({name: 'name_example', telephone: 'telephone_example', tax_year: 37, email: 'email_example', address: 'address_example', city: 'city_example', state: 'state_example', zip: 'zip_example', last_filing: false}) # IssuerRequest | The issuer to update } diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index 7479a40..b2b07e6 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -36,7 +36,7 @@ api_instance = AvalaraSdk::A1099::V2::JobsApi.new api_client id = 'id_example' # String | Job id obtained from other API responses, like `/1099/bulk-upsert`. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'a5bf9066-6d69-4811-95f8-646108327017', # String | Unique correlation Id in a GUID format + x_correlation_id: '44d0405b-1dec-4c17-8933-d5f2e21f598d', # String | Unique correlation Id in a GUID format x_avalara_client: 'Swagger UI; 22.1.0' # String | 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/) . } diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md index 9b089f1..a19de70 100644 --- a/docs/A1099/V2/W8BenEFormRequest.md +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -8,9 +8,9 @@ | **name** | **String** | The name of the individual or entity associated with the form. | | | **citizenship_country** | **String** | The country of citizenship. | | | **disregarded_entity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | -| **entity_type** | **String** | The entity type. Available values: - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part | | +| **entity_type** | **String** | Represents the entity type for tax forms. Each value corresponds to a specific entity classification. - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part | | | **making_treaty_claim** | **Boolean** | Indicates whether the entity is making a treaty claim. | [optional] | -| **fatca_status** | **String** | The FATCA status. Available values: - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account | | +| **fatca_status** | **String** | Represents the FATCA status types for tax forms. Used for W8-BEN-E forms and FATCA compliance validations. Values correspond to numeric identifiers used in forms. - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account | | | **residence_address** | **String** | The residential address of the individual or entity. | [optional] | | **residence_city** | **String** | The city of residence. | [optional] | | **residence_state** | **String** | The state of residence. | [optional] | @@ -27,7 +27,7 @@ | **foreign_tin_not_required** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | | **foreign_tin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | | **reference_number** | **String** | A reference number for the form. | [optional] | -| **disregarded_entity_fatca_status** | **String** | The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Limited Branch - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI | [optional] | +| **disregarded_entity_fatca_status** | **String** | The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI | [optional] | | **disregarded_address** | **String** | The address for disregarded entities. | [optional] | | **disregarded_city** | **String** | The city for disregarded entities. | [optional] | | **disregarded_state** | **String** | The state for disregarded entities. | [optional] | @@ -37,7 +37,7 @@ | **treaty_country_certification** | **Boolean** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] | | **treaty_country** | **String** | The treaty country of the beneficial owner. | [optional] | | **benefit_limitation_certification** | **Boolean** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] | -| **benefit_limitation** | **String** | The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other | [optional] | +| **benefit_limitation** | **String** | The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other - 11: No LOB article in treaty | [optional] | | **qualified_resident_status_certification** | **Boolean** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] | | **treaty_article** | **String** | Indicates the specific article and paragraph of the tax treaty under which the beneficial owner is claiming benefits. | [optional] | | **withholding_rate** | **String** | Specifies the reduced withholding rate claimed under the applicable tax treaty. | [optional] | diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md index 3510663..55d4580 100644 --- a/docs/A1099/V2/W8BenFormRequest.md +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -6,27 +6,27 @@ | ---- | ---- | ----------- | ----- | | **type** | **String** | The form type (always \"w8ben\" for this model). | [optional][readonly] | | **name** | **String** | The name of the individual or entity associated with the form. | | -| **citizenship_country** | **String** | The country of citizenship. | | +| **citizenship_country** | **String** | The country of citizenship.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | | | **residence_address** | **String** | The residential address of the individual or entity. | [optional] | | **residence_city** | **String** | The city of residence. | [optional] | -| **residence_state** | **String** | The state of residence. | [optional] | +| **residence_state** | **String** | The state of residence. Required for US and Canada.. Allowed values: AA, AE, AK, AL, AP, AR, AS, AZ, CA, CO (and 65 more) | [optional] | | **residence_zip** | **String** | The ZIP code of the residence. | [optional] | -| **residence_country** | **String** | The country of residence. | | +| **residence_country** | **String** | The country of residence.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | | | **residence_is_mailing** | **Boolean** | Indicates whether the residence address is the mailing address. | [optional] | | **mailing_address** | **String** | The mailing address. | [optional] | | **mailing_city** | **String** | The city of the mailing address. | [optional] | -| **mailing_state** | **String** | The state of the mailing address. | [optional] | +| **mailing_state** | **String** | The state of the mailing address. Required for US and Canada.. Allowed values: AA, AE, AK, AL, AP, AR, AS, AZ, CA, CO (and 65 more) | [optional] | | **mailing_zip** | **String** | The ZIP code of the mailing address. | [optional] | -| **mailing_country** | **String** | The country of the mailing address. | | +| **mailing_country** | **String** | The country of the mailing address.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | | | **tin** | **String** | The taxpayer identification number (TIN). | [optional] | | **foreign_tin_not_required** | **Boolean** | Indicates whether a foreign TIN is not legally required. | [optional] | | **foreign_tin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | | **reference_number** | **String** | A reference number for the form. | [optional] | | **birthday** | **Date** | The birthday of the individual associated with the form. | [optional] | -| **treaty_country** | **String** | The country for which the treaty applies. | [optional] | +| **treaty_country** | **String** | The country for which the treaty applies.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | [optional] | | **treaty_article** | **String** | The specific article of the treaty being claimed. | [optional] | | **treaty_reasons** | **String** | The reasons for claiming treaty benefits. | [optional] | -| **withholding_rate** | **String** | The withholding rate applied as per the treaty. | [optional] | +| **withholding_rate** | **String** | The withholding rate applied as per the treaty. Must be a percentage with up to two decimals (e.g., 12.50, 0).. Allowed values: 0, 0.0, 0.00, 5, 5.5, 10, 12.50, 15, 20, 25 (and 1 more) | [optional] | | **income_type** | **String** | The type of income covered by the treaty. | [optional] | | **signer_name** | **String** | The name of the signer of the form. | [optional] | | **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | diff --git a/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb b/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb index 0005856..b422ad7 100644 --- a/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb b/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb index e3852ff..af08419 100644 --- a/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb b/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb index 621557f..3cbf88e 100644 --- a/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end @@ -571,6 +571,92 @@ def get_w9_form_with_http_info(request_parameters) return data, response.code, response.headers end + # Download the PDF for a W9/W4/W8 form. + # Returns the PDF file for a W9/W4/W8 form. + # @param id [String] Id of the form # @param avalara_version [String] API version # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [String] 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/) . + # @return [nil] + def get_w9_form_pdf(request_parameters) + get_w9_form_pdf_with_http_info(request_parameters) + nil + end + + # Download the PDF for a W9/W4/W8 form. + # Returns the PDF file for a W9/W4/W8 form. + + # @param id [String] Id of the form + # @param avalara_version [String] API version + # @param x_correlation_id [String] Unique correlation Id in a GUID format + # @param x_avalara_client [String] 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/) . + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def get_w9_form_pdf_with_http_info(request_parameters) + # OAuth2 Scopes + required_scopes = '' + # Request Parameters + id = request_parameters.get_id() + avalara_version = request_parameters.get_avalara_version() + x_correlation_id = request_parameters.get_x_correlation_id() + x_avalara_client = request_parameters.get_x_avalara_client() + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling FormsW9Api.get_w9_form_pdf" + end + # verify the required parameter 'avalara_version' is set + if @api_client.config.client_side_validation && avalara_version.nil? + fail ArgumentError, "Missing the required parameter 'avalara_version' when calling FormsW9Api.get_w9_form_pdf" + end + # resource path + local_var_path = '/w9/forms/{id}/pdf'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) + if !avalara_version.nil? + header_params[:'avalara-version'] = avalara_version + end + if !x_correlation_id.nil? + header_params[:'X-Correlation-Id'] = x_correlation_id + end + if !x_avalara_client.nil? + header_params[:'X-Avalara-Client'] = x_avalara_client + end + + # form parameters + form_params = {} + + # http body (model) + post_body = {} + + # return_type + return_type = '' + + # auth_names + auth_names = ['bearer'] + + @api_client.apply_auth_to_request!(header_params, auth_names, required_scopes) + + new_options = { + :operation => :"FormsW9Api.get_w9_form_pdf", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + } + + response = @api_client.call_api(:GET, local_var_path, new_options, required_scopes, false, :A1099) + if new_options[:return_type] + data = deserialize(response, new_options[:return_type]) + else + data = nil + end + return data, response.code, response.headers + end + # List W9/W4/W8 forms # List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". # @param avalara_version [String] API version # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. # @param top [Integer] 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. # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. # @param order_by [String] A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. # @param count [Boolean] If true, return the global count of elements in the collection. # @param count_only [Boolean] If true, return ONLY the global count of elements in the collection. It only applies when count=true. # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [String] 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/) . @@ -1160,6 +1246,57 @@ def set_x_avalara_client(x_avalara_client) @x_avalara_client = x_avalara_client end end + # Represents the Request object for the GetW9FormPdf API + # + # @param String $id Id of the form (required) + # @param String $avalara_version API version (required) + # @param String $x_correlation_id Unique correlation Id in a GUID format (optional) + # @param String $x_avalara_client 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) + # + class GetW9FormPdfRequestSdk + attr_accessor :id + + attr_accessor :avalara_version + + attr_accessor :x_correlation_id + + attr_accessor :x_avalara_client + + def initialize() + end + + def get_id() + return @id + end + + def set_id(id) + @id = id + end + + def get_avalara_version() + return @avalara_version || '2.0' + end + + def set_avalara_version(avalara_version) + @avalara_version = avalara_version + end + + def get_x_correlation_id() + return @x_correlation_id + end + + def set_x_correlation_id(x_correlation_id) + @x_correlation_id = x_correlation_id + end + + def get_x_avalara_client() + return @x_avalara_client + end + + def set_x_avalara_client(x_avalara_client) + @x_avalara_client = x_avalara_client + end + end # Represents the Request object for the ListW9Forms API # # @param String $avalara_version API version (required) diff --git a/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb b/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb index b32c80e..27b299d 100644 --- a/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/jobs_api.rb b/lib/avalara_sdk/api/A1099/V2/jobs_api.rb index 273f65e..eee0644 100644 --- a/lib/avalara_sdk/api/A1099/V2/jobs_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/jobs_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb index d1d75b6..f3b97ad 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb index 35043d3..5d7411e 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb index d42219f..a3bbe3b 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb index 83925ad..f53cb6f 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb index 312ad73..de283a8 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb index 77acd96..a531893 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb index d0e0d13..2eeec39 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.10.0") + api_client.set_sdk_version("25.10.1") @api_client = api_client end diff --git a/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb b/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb index e6a7e11..a1c029c 100644 --- a/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb @@ -23,13 +23,13 @@ class W8BenEFormRequest # The name of the disregarded entity receiving the payment (if applicable). attr_accessor :disregarded_entity - # The entity type. Available values: - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part + # Represents the entity type for tax forms. Each value corresponds to a specific entity classification. - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part attr_accessor :entity_type # Indicates whether the entity is making a treaty claim. attr_accessor :making_treaty_claim - # The FATCA status. Available values: - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account + # Represents the FATCA status types for tax forms. Used for W8-BEN-E forms and FATCA compliance validations. Values correspond to numeric identifiers used in forms. - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account attr_accessor :fatca_status # The residential address of the individual or entity. @@ -80,7 +80,7 @@ class W8BenEFormRequest # A reference number for the form. attr_accessor :reference_number - # The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Limited Branch - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI + # The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI attr_accessor :disregarded_entity_fatca_status # The address for disregarded entities. @@ -110,7 +110,7 @@ class W8BenEFormRequest # Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. attr_accessor :benefit_limitation_certification - # The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other + # The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other - 11: No LOB article in treaty attr_accessor :benefit_limitation # Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. @@ -1126,8 +1126,24 @@ def valid? return false if @name.nil? return false if @citizenship_country.nil? return false if @entity_type.nil? + entity_type_validator = EnumAttributeValidator.new('String', ["Corporation", "DisregardedEntity", "Partnership", "SimpleTrust", "GrantorTrust", "ComplexTrust", "Estate", "ForeignGovernmentControlledEntity", "CentralBankOfIssue", "TaxExemptOrganization", "PrivateFoundation", "InternationalOrganization", "ForeignGovernmentControlledIntegralPart"]) + return false unless entity_type_validator.valid?(@entity_type) return false if @fatca_status.nil? + fatca_status_validator = EnumAttributeValidator.new('String', ["NonparticipatingFFI", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI", "RegisteredDeemedCompliantFFI", "SponsoredFFIWithoutGIIN", "CertifiedDeemedCompliantNonregisteringLocalBank", "CertifiedDeemedCompliantFFIWithLowValueAccounts", "CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle", "CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity", "CertainInvestmentEntitiesWithoutFinancialAccounts", "OwnerDocumentedFFI", "RestrictedDistributor", "NonreportingIGAFFI", "ForeignGovernmentOrUSPossessionOrForeignCentralBank", "InternationalOrganization", "ExemptRetirementPlans", "EntityWhollyOwnedByExemptBeneficialOwners", "TerritoryFinancialInstitution", "NonfinancialGroupEntity", "ExceptedNonfinancialStartUpCompany", "ExceptedNonfinancialEntityInLiquidationOrBankruptcy", "Organization501c", "NonprofitOrganization", "PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation", "ExceptedTerritoryNFFE", "ActiveNFFE", "PassiveNFFE", "ExceptedInterAffiliateFFI", "DirectReportingNFFE", "SponsoredDirectReportingNFFE", "AccountThatIsNotFinancialAccount"]) + return false unless fatca_status_validator.valid?(@fatca_status) + residence_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + return false unless residence_state_validator.valid?(@residence_state) return false if @residence_country.nil? + mailing_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + return false unless mailing_state_validator.valid?(@mailing_state) + disregarded_entity_fatca_status_validator = EnumAttributeValidator.new('String', ["BranchTreatedAsNonparticipatingFFI", "USBranch", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI"]) + return false unless disregarded_entity_fatca_status_validator.valid?(@disregarded_entity_fatca_status) + disregarded_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + return false unless disregarded_state_validator.valid?(@disregarded_state) + benefit_limitation_validator = EnumAttributeValidator.new('String', ["Government", "TaxExemptPensionTrustOrPensionFund", "OtherTaxExemptOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyThatMeetsOwnershipAndBaseErosionTest", "CompanyThatMeetsDerivativeBenefitsTest", "CompanyWithItemOfIncomeThatMeetsActiveTradeOrBusinessTest", "FavorableDiscretionaryDeterminationByUSCompetentAuthorityReceived", "Other", "NoLOBArticleInTreaty"]) + return false unless benefit_limitation_validator.valid?(@benefit_limitation) + iga_model_validator = EnumAttributeValidator.new('String', ["Model1IGA", "Model2IGA"]) + return false unless iga_model_validator.valid?(@iga_model) true end @@ -1141,6 +1157,86 @@ def type=(type) @type = type end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] entity_type Object to be assigned + def entity_type=(entity_type) + validator = EnumAttributeValidator.new('String', ["Corporation", "DisregardedEntity", "Partnership", "SimpleTrust", "GrantorTrust", "ComplexTrust", "Estate", "ForeignGovernmentControlledEntity", "CentralBankOfIssue", "TaxExemptOrganization", "PrivateFoundation", "InternationalOrganization", "ForeignGovernmentControlledIntegralPart"]) + unless validator.valid?(entity_type) + fail ArgumentError, "invalid value for \"entity_type\", must be one of #{validator.allowable_values}." + end + @entity_type = entity_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] fatca_status Object to be assigned + def fatca_status=(fatca_status) + validator = EnumAttributeValidator.new('String', ["NonparticipatingFFI", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI", "RegisteredDeemedCompliantFFI", "SponsoredFFIWithoutGIIN", "CertifiedDeemedCompliantNonregisteringLocalBank", "CertifiedDeemedCompliantFFIWithLowValueAccounts", "CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle", "CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity", "CertainInvestmentEntitiesWithoutFinancialAccounts", "OwnerDocumentedFFI", "RestrictedDistributor", "NonreportingIGAFFI", "ForeignGovernmentOrUSPossessionOrForeignCentralBank", "InternationalOrganization", "ExemptRetirementPlans", "EntityWhollyOwnedByExemptBeneficialOwners", "TerritoryFinancialInstitution", "NonfinancialGroupEntity", "ExceptedNonfinancialStartUpCompany", "ExceptedNonfinancialEntityInLiquidationOrBankruptcy", "Organization501c", "NonprofitOrganization", "PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation", "ExceptedTerritoryNFFE", "ActiveNFFE", "PassiveNFFE", "ExceptedInterAffiliateFFI", "DirectReportingNFFE", "SponsoredDirectReportingNFFE", "AccountThatIsNotFinancialAccount"]) + unless validator.valid?(fatca_status) + fail ArgumentError, "invalid value for \"fatca_status\", must be one of #{validator.allowable_values}." + end + @fatca_status = fatca_status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] residence_state Object to be assigned + def residence_state=(residence_state) + validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + unless validator.valid?(residence_state) + fail ArgumentError, "invalid value for \"residence_state\", must be one of #{validator.allowable_values}." + end + @residence_state = residence_state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] mailing_state Object to be assigned + def mailing_state=(mailing_state) + validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + unless validator.valid?(mailing_state) + fail ArgumentError, "invalid value for \"mailing_state\", must be one of #{validator.allowable_values}." + end + @mailing_state = mailing_state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] disregarded_entity_fatca_status Object to be assigned + def disregarded_entity_fatca_status=(disregarded_entity_fatca_status) + validator = EnumAttributeValidator.new('String', ["BranchTreatedAsNonparticipatingFFI", "USBranch", "ParticipatingFFI", "ReportingModel1FFI", "ReportingModel2FFI"]) + unless validator.valid?(disregarded_entity_fatca_status) + fail ArgumentError, "invalid value for \"disregarded_entity_fatca_status\", must be one of #{validator.allowable_values}." + end + @disregarded_entity_fatca_status = disregarded_entity_fatca_status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] disregarded_state Object to be assigned + def disregarded_state=(disregarded_state) + validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"]) + unless validator.valid?(disregarded_state) + fail ArgumentError, "invalid value for \"disregarded_state\", must be one of #{validator.allowable_values}." + end + @disregarded_state = disregarded_state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] benefit_limitation Object to be assigned + def benefit_limitation=(benefit_limitation) + validator = EnumAttributeValidator.new('String', ["Government", "TaxExemptPensionTrustOrPensionFund", "OtherTaxExemptOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyThatMeetsOwnershipAndBaseErosionTest", "CompanyThatMeetsDerivativeBenefitsTest", "CompanyWithItemOfIncomeThatMeetsActiveTradeOrBusinessTest", "FavorableDiscretionaryDeterminationByUSCompetentAuthorityReceived", "Other", "NoLOBArticleInTreaty"]) + unless validator.valid?(benefit_limitation) + fail ArgumentError, "invalid value for \"benefit_limitation\", must be one of #{validator.allowable_values}." + end + @benefit_limitation = benefit_limitation + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] iga_model Object to be assigned + def iga_model=(iga_model) + validator = EnumAttributeValidator.new('String', ["Model1IGA", "Model2IGA"]) + unless validator.valid?(iga_model) + fail ArgumentError, "invalid value for \"iga_model\", must be one of #{validator.allowable_values}." + end + @iga_model = iga_model + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb b/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb index 400a60d..4329930 100644 --- a/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb @@ -17,7 +17,7 @@ class W8BenFormRequest # The name of the individual or entity associated with the form. attr_accessor :name - # The country of citizenship. + # The country of citizenship.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) attr_accessor :citizenship_country # The residential address of the individual or entity. @@ -26,13 +26,13 @@ class W8BenFormRequest # The city of residence. attr_accessor :residence_city - # The state of residence. + # The state of residence. Required for US and Canada.. Allowed values: AA, AE, AK, AL, AP, AR, AS, AZ, CA, CO (and 65 more) attr_accessor :residence_state # The ZIP code of the residence. attr_accessor :residence_zip - # The country of residence. + # The country of residence.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) attr_accessor :residence_country # Indicates whether the residence address is the mailing address. @@ -44,13 +44,13 @@ class W8BenFormRequest # The city of the mailing address. attr_accessor :mailing_city - # The state of the mailing address. + # The state of the mailing address. Required for US and Canada.. Allowed values: AA, AE, AK, AL, AP, AR, AS, AZ, CA, CO (and 65 more) attr_accessor :mailing_state # The ZIP code of the mailing address. attr_accessor :mailing_zip - # The country of the mailing address. + # The country of the mailing address.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) attr_accessor :mailing_country # The taxpayer identification number (TIN). @@ -68,7 +68,7 @@ class W8BenFormRequest # The birthday of the individual associated with the form. attr_accessor :birthday - # The country for which the treaty applies. + # The country for which the treaty applies.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) attr_accessor :treaty_country # The specific article of the treaty being claimed. @@ -77,7 +77,7 @@ class W8BenFormRequest # The reasons for claiming treaty benefits. attr_accessor :treaty_reasons - # The withholding rate applied as per the treaty. + # The withholding rate applied as per the treaty. Must be a percentage with up to two decimals (e.g., 12.50, 0).. Allowed values: 0, 0.0, 0.00, 5, 5.5, 10, 12.50, 15, 20, 25 (and 1 more) attr_accessor :withholding_rate # The type of income covered by the treaty. @@ -404,7 +404,21 @@ def valid? return false unless type_validator.valid?(@type) return false if @name.nil? return false if @citizenship_country.nil? + citizenship_country_validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + return false unless citizenship_country_validator.valid?(@citizenship_country) + residence_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"]) + return false unless residence_state_validator.valid?(@residence_state) return false if @residence_country.nil? + residence_country_validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + return false unless residence_country_validator.valid?(@residence_country) + mailing_state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"]) + return false unless mailing_state_validator.valid?(@mailing_state) + mailing_country_validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + return false unless mailing_country_validator.valid?(@mailing_country) + treaty_country_validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + return false unless treaty_country_validator.valid?(@treaty_country) + withholding_rate_validator = EnumAttributeValidator.new('String', ["0", "0.0", "0.00", "5", "5.5", "10", "12.50", "15", "20", "25", "30"]) + return false unless withholding_rate_validator.valid?(@withholding_rate) true end @@ -418,6 +432,76 @@ def type=(type) @type = type end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] citizenship_country Object to be assigned + def citizenship_country=(citizenship_country) + validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + unless validator.valid?(citizenship_country) + fail ArgumentError, "invalid value for \"citizenship_country\", must be one of #{validator.allowable_values}." + end + @citizenship_country = citizenship_country + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] residence_state Object to be assigned + def residence_state=(residence_state) + validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"]) + unless validator.valid?(residence_state) + fail ArgumentError, "invalid value for \"residence_state\", must be one of #{validator.allowable_values}." + end + @residence_state = residence_state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] residence_country Object to be assigned + def residence_country=(residence_country) + validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + unless validator.valid?(residence_country) + fail ArgumentError, "invalid value for \"residence_country\", must be one of #{validator.allowable_values}." + end + @residence_country = residence_country + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] mailing_state Object to be assigned + def mailing_state=(mailing_state) + validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"]) + unless validator.valid?(mailing_state) + fail ArgumentError, "invalid value for \"mailing_state\", must be one of #{validator.allowable_values}." + end + @mailing_state = mailing_state + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] mailing_country Object to be assigned + def mailing_country=(mailing_country) + validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + unless validator.valid?(mailing_country) + fail ArgumentError, "invalid value for \"mailing_country\", must be one of #{validator.allowable_values}." + end + @mailing_country = mailing_country + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] treaty_country Object to be assigned + def treaty_country=(treaty_country) + validator = EnumAttributeValidator.new('String', ["US", "AF", "AX", "AL", "AG", "AQ", "AN", "AO", "AV", "AY", "AC", "AR", "AM", "AA", "AT", "AS", "AU", "AJ", "BF", "BA", "FQ", "BG", "BB", "BO", "BE", "BH", "BN", "BD", "BT", "BL", "BK", "BC", "BV", "BR", "IO", "VI", "BX", "BU", "UV", "BM", "BY", "CB", "CM", "CA", "CV", "CJ", "CT", "CD", "CI", "CH", "KT", "IP", "CK", "CO", "CN", "CF", "CG", "CW", "CR", "CS", "IV", "HR", "CU", "UC", "CY", "EZ", "DA", "DX", "DJ", "DO", "DR", "TT", "EC", "EG", "ES", "EK", "ER", "EN", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "FP", "FS", "GB", "GA", "GG", "GM", "GH", "GI", "GR", "GL", "GJ", "GQ", "GT", "GK", "GV", "PU", "GY", "HA", "HM", "VT", "HO", "HK", "HQ", "HU", "IC", "IN", "ID", "IR", "IZ", "EI", "IS", "IT", "JM", "JN", "JA", "DQ", "JE", "JQ", "JO", "KZ", "KE", "KQ", "KR", "KN", "KS", "KV", "KU", "KG", "LA", "LG", "LE", "LT", "LI", "LY", "LS", "LH", "LU", "MC", "MK", "MA", "MI", "MY", "MV", "ML", "MT", "IM", "RM", "MR", "MP", "MX", "MQ", "MD", "MN", "MG", "MJ", "MH", "MO", "MZ", "WA", "NR", "BQ", "NP", "NL", "NC", "NZ", "NU", "NG", "NI", "NE", "NF", "CQ", "NO", "MU", "OC", "PK", "PS", "LQ", "PM", "PP", "PF", "PA", "PE", "RP", "PC", "PL", "PO", "RQ", "QA", "RO", "RS", "RW", "TB", "RN", "WS", "SM", "TP", "SA", "SG", "RI", "SE", "SL", "SN", "NN", "LO", "SI", "BP", "SO", "SF", "SX", "SP", "PG", "CE", "SH", "SC", "ST", "SB", "VC", "SU", "NS", "SV", "WZ", "SW", "SZ", "SY", "TW", "TI", "TZ", "TH", "TO", "TL", "TN", "TD", "TS", "TU", "TX", "TK", "TV", "UG", "UP", "AE", "UK", "UY", "UZ", "NH", "VE", "VM", "VQ", "WQ", "WF", "WI", "YM", "ZA", "ZI"]) + unless validator.valid?(treaty_country) + fail ArgumentError, "invalid value for \"treaty_country\", must be one of #{validator.allowable_values}." + end + @treaty_country = treaty_country + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] withholding_rate Object to be assigned + def withholding_rate=(withholding_rate) + validator = EnumAttributeValidator.new('String', ["0", "0.0", "0.00", "5", "5.5", "10", "12.50", "15", "20", "25", "30"]) + unless validator.valid?(withholding_rate) + fail ArgumentError, "invalid value for \"withholding_rate\", must be one of #{validator.allowable_values}." + end + @withholding_rate = withholding_rate + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o)