From 446be5d97b7b7dded7f9ca18280b1bd597959339 Mon Sep 17 00:00:00 2001 From: "svc.developer" Date: Tue, 30 Sep 2025 05:51:54 -0700 Subject: [PATCH] 25.10.0 --- docs/A1099/V2/CompaniesW9Api.md | 10 +- docs/A1099/V2/CreateW9FormRequest.md | 105 +++++- docs/A1099/V2/ErrorResponse.md | 4 +- docs/A1099/V2/ErrorResponseItem.md | 4 +- docs/A1099/V2/Forms1099Api.md | 14 +- docs/A1099/V2/FormsW9Api.md | 16 +- docs/A1099/V2/Issuers1099Api.md | 10 +- docs/A1099/V2/JobsApi.md | 2 +- docs/A1099/V2/W4FormRequest.md | 83 ++++- docs/A1099/V2/W8ImyFormRequest.md | 78 ++++- docs/A1099/V2/W9FormRequest.md | 93 ++++- pom.xml | 2 +- .../SDK/api/A1099/V2/CompaniesW9Api.java | 2 +- .../SDK/api/A1099/V2/Forms1099Api.java | 2 +- .../Avalara/SDK/api/A1099/V2/FormsW9Api.java | 2 +- .../SDK/api/A1099/V2/Issuers1099Api.java | 2 +- .../Avalara/SDK/api/A1099/V2/JobsApi.java | 2 +- .../api/EInvoicing/V1/DataInputFieldsApi.java | 2 +- .../SDK/api/EInvoicing/V1/DocumentsApi.java | 2 +- .../SDK/api/EInvoicing/V1/InteropApi.java | 2 +- .../SDK/api/EInvoicing/V1/MandatesApi.java | 2 +- .../api/EInvoicing/V1/SubscriptionsApi.java | 2 +- .../api/EInvoicing/V1/TaxIdentifiersApi.java | 2 +- .../api/EInvoicing/V1/TradingPartnersApi.java | 2 +- .../SDK/model/A1099/V2/ErrorResponse.java | 4 +- .../SDK/model/A1099/V2/ErrorResponseItem.java | 4 +- .../SDK/model/A1099/V2/W4FormRequest.java | 250 +++++++++++++- .../SDK/model/A1099/V2/W8ImyFormRequest.java | 326 +++++++++++++++++- .../SDK/model/A1099/V2/W9FormRequest.java | 262 +++++++++++++- 29 files changed, 1193 insertions(+), 98 deletions(-) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 9a921b5..96ba1ca 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -49,7 +49,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "a607ad38-398e-43d2-918d-d809e43dbd6b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6df88900-1e19-42cb-b5a0-fc2442681327"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The company to create try { @@ -136,7 +136,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "54780530-dee1-472f-8626-a1ef1d6f3bfa"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "33931030-471d-4055-be36-8dcc3c48c11d"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { apiInstance.deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -228,7 +228,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "7ee6e06e-ae28-4317-9053-d966f0b24a94"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "cf08fb7e-1d1c-43e2-a2b8-dfe7be26d43f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { PaginatedQueryResultModelCompanyResponse result = apiInstance.getCompanies(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -321,7 +321,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "c2254966-bcae-4b32-a7b4-67f0518ca748"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f29e8436-2c45-494b-b537-a22ae251829e"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { CompanyResponse result = apiInstance.getCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -409,7 +409,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b730ea19-59f4-4cc8-8ef0-94a9d4637a6a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "595ee1c9-2b9e-4d5a-8aa6-661b1fe4669f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The updated company data try { diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md index d16dac3..9f4dac7 100644 --- a/docs/A1099/V2/CreateW9FormRequest.md +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -10,16 +10,16 @@ |**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | |**name** | **String** | The name of the individual or entity associated with the form. | | |**businessName** | **String** | The name of the business associated with the form. | [optional] | -|**businessClassification** | **String** | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | +|**businessClassification** | [**BusinessClassificationEnum**](#BusinessClassificationEnum) | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | -|**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | -|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | +|**exemptPayeeCode** | **String** | The exempt payee code. Allowed values (1–13): - 1 — Organization exempt under §501(a) or IRA; custodial account under §403(b)(7) - 2 — U.S. government or its agencies/instrumentalities - 3 — U.S. state, DC, U.S. territory/possession, or their political subdivisions/agencies/instrumentalities - 4 — Foreign government or its political subdivisions/agencies/instrumentalities - 5 — Corporation - 6 — Dealer in securities or commodities required to register in the U.S., DC, or U.S. territory/possession - 7 — Futures commission merchant registered with the CFTC - 8 — Real estate investment trust (REIT) - 9 — Entity registered at all times during the tax year under the Investment Company Act of 1940 - 10 — Common trust fund operated by a bank under §584(a) - 11 — Financial institution (see §581) - 12 — Broker (nominee/custodian) - 13 — Trust exempt under §664 or described in §4947 | [optional] | +|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. Allowed values (A–M): - A — Tax‑exempt organization under §501(a) or IRA (§7701(a)(37)) - B — U.S. government or any of its agencies/instrumentalities - C — U.S. state, DC, territory/possession, or their political subdivisions/instrumentalities - D — Corporation whose stock is regularly traded on an established securities market - E — Corporation that is a member of the same expanded affiliated group as a D corporation - F — Registered dealer in securities/commodities/derivatives - G — REIT (Real Estate Investment Trust) - H — Regulated investment company (§851) or entity registered all year under the Investment Company Act of 1940 - I — Common trust fund (§584(a)) - J — Bank (§581) - K — Broker - L — Charitable remainder trust (§664) or trust described in §4947(a)(1) - M — Trust under §403(b) plan or §457(g) plan | [optional] | |**foreignCountryIndicator** | **Boolean** | Indicates whether the individual or entity is in a foreign country. | [optional] | |**address** | **String** | The address of the employee. Required unless exempt. | | |**foreignAddress** | **String** | The foreign address of the individual or entity. | [optional] | |**city** | **String** | The city of residence of the employee. Required unless exempt. | | -|**state** | **String** | The state of residence of the employee. Required unless exempt. | | +|**state** | [**StateEnum**](#StateEnum) | The state of residence of the employee. Required unless exempt. | | |**zip** | **String** | The ZIP code of residence of the employee. Required unless exempt. | | |**accountNumber** | **String** | The account number associated with the form. | [optional] | |**tinType** | **String** | Tax Identification Number (TIN) type. | | @@ -168,7 +168,7 @@ |**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | |**employeeLastName** | **String** | The last name of the employee. | | |**employeeNameSuffix** | **String** | The name suffix of the employee. | [optional] | -|**maritalStatus** | **String** | The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual. | [optional] | +|**maritalStatus** | [**MaritalStatusEnum**](#MaritalStatusEnum) | The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual. | [optional] | |**lastNameDiffers** | **Boolean** | Indicates whether the last name differs from prior records. | [optional] | |**numAllowances** | **Integer** | The number of allowances claimed by the employee. | [optional] | |**otherDependents** | **Integer** | The number of dependents other than allowances. | [optional] | @@ -192,3 +192,98 @@ +## Enum: BusinessClassificationEnum + +| Name | Value | +|---- | -----| +| INDIVIDUAL | "Individual" | +| C_CORPORATION | "CCorporation" | +| S_CORPORATION | "SCorporation" | +| PARTNERSHIP | "Partnership" | +| TRUST_ESTATE | "TrustEstate" | +| LLC_C | "LlcC" | +| LLC_S | "LlcS" | +| LLC_P | "LlcP" | +| OTHER | "Other" | + + + +## Enum: StateEnum + +| Name | Value | +|---- | -----| +| AA | "AA" | +| AE | "AE" | +| AK | "AK" | +| AL | "AL" | +| AP | "AP" | +| AR | "AR" | +| AS | "AS" | +| AZ | "AZ" | +| CA | "CA" | +| CO | "CO" | +| CT | "CT" | +| DC | "DC" | +| DE | "DE" | +| FL | "FL" | +| FM | "FM" | +| GA | "GA" | +| GU | "GU" | +| HI | "HI" | +| IA | "IA" | +| ID | "ID" | +| IL | "IL" | +| IN | "IN" | +| KS | "KS" | +| KY | "KY" | +| LA | "LA" | +| MA | "MA" | +| MD | "MD" | +| ME | "ME" | +| MH | "MH" | +| MI | "MI" | +| MN | "MN" | +| MO | "MO" | +| MP | "MP" | +| MS | "MS" | +| MT | "MT" | +| NC | "NC" | +| ND | "ND" | +| NE | "NE" | +| NH | "NH" | +| NJ | "NJ" | +| NM | "NM" | +| NV | "NV" | +| NY | "NY" | +| OH | "OH" | +| OK | "OK" | +| OR | "OR" | +| PA | "PA" | +| PR | "PR" | +| PW | "PW" | +| RI | "RI" | +| SC | "SC" | +| SD | "SD" | +| TN | "TN" | +| TX | "TX" | +| UT | "UT" | +| VA | "VA" | +| VI | "VI" | +| VT | "VT" | +| WA | "WA" | +| WI | "WI" | +| WV | "WV" | +| WY | "WY" | + + + +## Enum: MaritalStatusEnum + +| Name | Value | +|---- | -----| +| SINGLE | "Single" | +| MARRIED | "Married" | +| MARRIED_BUT | "MarriedBut" | + + + diff --git a/docs/A1099/V2/ErrorResponse.md b/docs/A1099/V2/ErrorResponse.md index 7f70cb5..9ac3f91 100644 --- a/docs/A1099/V2/ErrorResponse.md +++ b/docs/A1099/V2/ErrorResponse.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**title** | **String** | | [optional] | -|**errors** | [**List<ErrorResponseItem>**](ErrorResponseItem.md) | | [optional] | +|**title** | **String** | A summary of the problem type. | [optional] | +|**errors** | [**List<ErrorResponseItem>**](ErrorResponseItem.md) | A list of errors detailing the problem type. | [optional] | diff --git a/docs/A1099/V2/ErrorResponseItem.md b/docs/A1099/V2/ErrorResponseItem.md index 02671c4..b5bdda0 100644 --- a/docs/A1099/V2/ErrorResponseItem.md +++ b/docs/A1099/V2/ErrorResponseItem.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **String** | | [optional] | -|**detail** | **String** | | [optional] | +|**type** | **String** | An identifier for this occurrence of the problem. It is the name of a request's field when specific to that field. Otherwise, for other types of errors, its value is empty. | [optional] | +|**detail** | **String** | An explanation specific to this occurrence of the problem. | [optional] | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index cbb9f38..0bda689 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -52,7 +52,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version Boolean dryRun = false; // 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 - String xCorrelationId = "5ef65de0-c394-4aa2-b249-d8bfcbe9b23a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "eec0b095-bfa8-4786-bbad-3f20a4b61ac2"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . Form1099ListRequest form1099ListRequest = new Form1099ListRequest(); // Form1099ListRequest | try { @@ -141,7 +141,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5b55b569-4e1e-44d3-920c-65153461c426"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "ea80e3d4-6198-4297-9fff-4b12b5d270a0"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { @@ -229,7 +229,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | The unique identifier of the desired form to delete. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e82ee14f-7146-41a5-b856-28f403d65e29"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6f61d545-12cb-445a-b60c-bd21c3f78ae3"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { apiInstance.delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -317,7 +317,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "f5198e72-fc87-4a4d-a09a-b2aa6cf70c38"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "3dda6df9-8f00-4ac0-8eab-0e56263c2895"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { Get1099Form200Response result = apiInstance.get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -406,7 +406,7 @@ public class Example { String id = "id_example"; // String | The ID of the form String avalaraVersion = "2.0.0"; // String | API version Boolean markEdelivered = true; // Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - String xCorrelationId = "7fdfd0b2-cebf-4f25-8a65-6dd03811e77d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "83471033-6587-4425-a03e-1057de8d14cf"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); @@ -500,7 +500,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "97f7596c-99c0-4879-b47c-57df572a32c9"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "9cd2b713-72ed-419c-8c1f-4aeef9f6b0d4"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { PaginatedQueryResultModelForm1099Base result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -593,7 +593,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "560aa857-d5ba-484b-9375-a14e9e57d7a8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b0bb9771-ffdf-4884-bac3-7cf00bf7c745"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 4e75682..686bf99 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -52,7 +52,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "96f3173e-05e5-496d-b7a2-8f3c8711164f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "0ab9baaf-56ae-484d-a812-1586d6141797"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest = new CreateAndSendW9FormEmailRequest(); // CreateAndSendW9FormEmailRequest | Form to be created try { @@ -138,7 +138,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "4fef31cf-2985-471b-83bb-59b4bf4cee0e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d1c7d02a-c0be-4a64-9fbb-0b4aed2f526c"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { @@ -225,7 +225,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b1cd71dd-2fd3-483d-b611-0dd8306b5201"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5c349318-0f66-4478-bcc0-ce6af3c9f485"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { apiInstance.deleteW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -310,7 +310,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "6d803604-fec0-4f42-9114-e77ddd25d823"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f39583e2-33c6-460f-aed2-66bc23ef3b6a"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -401,7 +401,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "5473c6dd-8986-4b62-b027-9a94c94f9401"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a60536fb-e758-4f92-a0cd-7d99addcc735"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { PaginatedQueryResultModelW9FormBaseResponse result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -492,7 +492,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | The ID of the W9/W4/W8 form. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1204a47d-7c4d-4b63-8776-560f89e236e6"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8f2f717b-24cb-4bf1-9820-ded88ed93798"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { CreateW9Form201Response result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -580,7 +580,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "2f240777-dd4f-4aaf-b4b6-fcb22df6de90"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8688fb2d-d79c-433a-9abf-4f96ea744f32"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be updated try { @@ -669,7 +669,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "ba65d92c-2a2a-4b4e-9731-c7b385d7fb59"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "13008974-9cbc-417c-a3d1-7779277a2077"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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 File("/path/to/file"); // File | try { diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 491a9af..41bf6c7 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -49,7 +49,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5c70e4f3-3885-4757-84f3-86323c1af033"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "019c2b9f-42e4-424f-a440-2de4183e50c9"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to create try { @@ -136,7 +136,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "ebe59aa0-745c-44da-b86b-67ad7994619c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "2c4f0724-28b8-4321-940c-7aea4e6a1ae4"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { apiInstance.deleteIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -221,7 +221,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to retrieve String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "cfc604e9-15ae-4c65-a59f-123475fad2ef"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e7d6ad5f-3589-4822-b711-bb658238ebf6"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { IssuerResponse result = apiInstance.getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -312,7 +312,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "3302a30f-61fc-4b94-af04-c683c6064eed"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "2c3cf6e2-a30b-4934-8dad-94105b6b668c"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { PaginatedQueryResultModelIssuerResponse result = apiInstance.getIssuers(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -405,7 +405,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "4f30c58e-f8fd-4635-99d4-ea710f1d0182"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1d3cb56d-6c88-4c68-863a-81b0f64c270f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to update try { diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index b0f3eb3..0f596b4 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -46,7 +46,7 @@ public class Example { JobsApi apiInstance = new JobsApi(apiClient); String id = "id_example"; // String | Job id obtained from other API responses, like `/1099/bulk-upsert`. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "af6414fe-0bd6-4ddb-91bb-43108aa78fa5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a5bf9066-6d69-4811-95f8-646108327017"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "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/) . try { JobResponse result = apiInstance.getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient); diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md index 644cb15..b639f99 100644 --- a/docs/A1099/V2/W4FormRequest.md +++ b/docs/A1099/V2/W4FormRequest.md @@ -16,9 +16,9 @@ |**tin** | **String** | The taxpayer identification number (TIN). | | |**address** | **String** | The address of the employee. Required unless exempt. | [optional] | |**city** | **String** | The city of residence of the employee. Required unless exempt. | [optional] | -|**state** | **String** | The state of residence of the employee. Required unless exempt. | [optional] | +|**state** | [**StateEnum**](#StateEnum) | The state of residence of the employee. Required unless exempt. | [optional] | |**zip** | **String** | The ZIP code of residence of the employee. Required unless exempt. | [optional] | -|**maritalStatus** | **String** | The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual. | [optional] | +|**maritalStatus** | [**MaritalStatusEnum**](#MaritalStatusEnum) | The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual. | [optional] | |**lastNameDiffers** | **Boolean** | Indicates whether the last name differs from prior records. | [optional] | |**numAllowances** | **Integer** | The number of allowances claimed by the employee. | [optional] | |**otherDependents** | **Integer** | The number of dependents other than allowances. | [optional] | @@ -47,3 +47,82 @@ +## Enum: StateEnum + +| Name | Value | +|---- | -----| +| AA | "AA" | +| AE | "AE" | +| AK | "AK" | +| AL | "AL" | +| AP | "AP" | +| AR | "AR" | +| AS | "AS" | +| AZ | "AZ" | +| CA | "CA" | +| CO | "CO" | +| CT | "CT" | +| DC | "DC" | +| DE | "DE" | +| FL | "FL" | +| FM | "FM" | +| GA | "GA" | +| GU | "GU" | +| HI | "HI" | +| IA | "IA" | +| ID | "ID" | +| IL | "IL" | +| IN | "IN" | +| KS | "KS" | +| KY | "KY" | +| LA | "LA" | +| MA | "MA" | +| MD | "MD" | +| ME | "ME" | +| MH | "MH" | +| MI | "MI" | +| MN | "MN" | +| MO | "MO" | +| MP | "MP" | +| MS | "MS" | +| MT | "MT" | +| NC | "NC" | +| ND | "ND" | +| NE | "NE" | +| NH | "NH" | +| NJ | "NJ" | +| NM | "NM" | +| NV | "NV" | +| NY | "NY" | +| OH | "OH" | +| OK | "OK" | +| OR | "OR" | +| PA | "PA" | +| PR | "PR" | +| PW | "PW" | +| RI | "RI" | +| SC | "SC" | +| SD | "SD" | +| TN | "TN" | +| TX | "TX" | +| UT | "UT" | +| VA | "VA" | +| VI | "VI" | +| VT | "VT" | +| WA | "WA" | +| WI | "WI" | +| WV | "WV" | +| WY | "WY" | + + + +## Enum: MaritalStatusEnum + +| Name | Value | +|---- | -----| +| SINGLE | "Single" | +| MARRIED | "Married" | +| MARRIED_BUT | "MarriedBut" | + + + diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md index e6cda91..33e9cba 100644 --- a/docs/A1099/V2/W8ImyFormRequest.md +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -11,8 +11,8 @@ |**name** | **String** | The name of the individual or entity associated with the form. | | |**citizenshipCountry** | **String** | The country of citizenship. | | |**disregardedEntity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | -|**entityType** | **String** | The entity type. Available values: - 1: QI (including a QDD). Complete Part III. - 2: Nonqualified intermediary. Complete Part IV. - 3: Territory financial institution. Complete Part V. - 4: U.S. branch. Complete Part VI. - 5: Withholding foreign partnership. Complete Part VII. - 6: Withholding foreign trust. Complete Part VII. - 7: Nonwithholding foreign partnership. Complete Part VIII. - 8: Nonwithholding foreign simple trust. Complete Part VIII. - 9: Nonwithholding foreign grantor trust. Complete Part VIII. | | -|**fatcaStatus** | **String** | The FATCA status. Available values: - 1: Nonparticipating foreign financial institution (FFI) (including an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner). Complete Part IX (if applicable). - 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 XIX). - 6: Territory financial institution. Complete Part V. - 7: Sponsored FFI (other than a certified deemed-compliant sponsored, closely held investment vehicle). Complete Part X. - 8: Certified deemed-compliant nonregistering local bank. Complete Part XII. - 9: Certified deemed-compliant FFI with only low-value accounts. Complete Part XIII. - 10: Certified deemed-compliant sponsored, closely held investment vehicle. Complete Part XIV. - 11: Certified deemed-compliant limited life debt investment entity. Complete Part XV. - 12: Certain investment entities that do not maintain financial accounts. Complete Part XVI. - 13: Owner-documented FFI. Complete Part XI. - 14: Restricted distributor. Complete Part XVII. - 15: Foreign central bank of issue. Complete Part XVIII. - 16: Nonreporting IGA FFI. Complete Part XIX. - 17: Exempt retirement plans. Complete Part XX. - 18: Excepted nonfinancial group entity. Complete Part XXI. - 19: Excepted nonfinancial start-up company. Complete Part XXII. - 20: Excepted nonfinancial entity in liquidation or bankruptcy. Complete Part XXIII. - 21: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation. Complete Part XXIV. - 22: Excepted territory NFFE. Complete Part XXV. - 23: Active NFFE. Complete Part XXVI. - 24: Passive NFFE. Complete Part XXVII. - 25: Direct reporting NFFE. - 26: Sponsored direct reporting NFFE. Complete Part XXVIII. | [optional] | +|**entityType** | [**EntityTypeEnum**](#EntityTypeEnum) | Represents the entity type for W-8IMY tax forms. W-8IMY forms only accept entity types 1-9, which is a subset of the full EntityType enum. | | +|**fatcaStatus** | [**FatcaStatusEnum**](#FatcaStatusEnum) | Represents the FATCA status types specifically for W8-IMY forms. This is a subset of the full FatcaStatus enum, restricted to values 1-26 for W8-IMY forms. | [optional] | |**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | |**residenceCity** | **String** | The city of residence. | [optional] | |**residenceState** | **String** | The state of residence. | [optional] | @@ -29,7 +29,7 @@ |**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | |**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | |**referenceNumber** | **String** | A reference number for the form. | [optional] | -|**disregardedEntityFatcaStatus** | **String** | The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI. - 2: Participating FFI. - 3: Reporting Model 1 FFI. - 4: Reporting Model 2 FFI. - 5: U.S. Branch | [optional] | +|**disregardedEntityFatcaStatus** | [**DisregardedEntityFatcaStatusEnum**](#DisregardedEntityFatcaStatusEnum) | The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI. - 2: Participating FFI. - 3: Reporting Model 1 FFI. - 4: Reporting Model 2 FFI. - 5: U.S. Branch | [optional] | |**disregardedAddress** | **String** | The address for disregarded entities. | [optional] | |**disregardedCity** | **String** | The city for disregarded entities. | [optional] | |**disregardedState** | **String** | The state for disregarded entities. | [optional] | @@ -93,7 +93,7 @@ |**foreignCentralBankOfIssueCertification** | **Boolean** | 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] | |**nonreportingIgaFfiCertification** | **Boolean** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] | |**igaCountry** | **String** | The country for the applicable IGA with the United States. | [optional] | -|**igaModel** | **String** | The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA | [optional] | +|**igaModel** | [**IgaModelEnum**](#IgaModelEnum) | The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA | [optional] | |**igaLegalStatusTreatment** | **String** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] | |**igaFfiTrusteeOrSponsor** | **String** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] | |**igaFfiTrusteeIsForeign** | **Boolean** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] | @@ -139,3 +139,73 @@ +## Enum: EntityTypeEnum + +| Name | Value | +|---- | -----| +| QI | "QI" | +| NONQUALIFIED_INTERMEDIARY | "NonqualifiedIntermediary" | +| TERRITORY_FINANCIAL_INSTITUTION | "TerritoryFinancialInstitution" | +| US_BRANCH | "USBranch" | +| WITHHOLDING_FOREIGN_PARTNERSHIP | "WithholdingForeignPartnership" | +| WITHHOLDING_FOREIGN_TRUST | "WithholdingForeignTrust" | +| NONWITHHOLDING_FOREIGN_PARTNERSHIP | "NonwithholdingForeignPartnership" | +| NONWITHHOLDING_FOREIGN_SIMPLE_TRUST | "NonwithholdingForeignSimpleTrust" | +| NONWITHHOLDING_FOREIGN_GRANTOR_TRUST | "NonwithholdingForeignGrantorTrust" | + + + +## Enum: FatcaStatusEnum + +| Name | Value | +|---- | -----| +| NONPARTICIPATING_FFI | "NonparticipatingFFI" | +| PARTICIPATING_FFI | "ParticipatingFFI" | +| REPORTING_MODEL1_FFI | "ReportingModel1FFI" | +| REPORTING_MODEL2_FFI | "ReportingModel2FFI" | +| REGISTERED_DEEMED_COMPLIANT_FFI | "RegisteredDeemedCompliantFFI" | +| TERRITORY_FINANCIAL_INSTITUTION | "TerritoryFinancialInstitution" | +| SPONSORED_FFI | "SponsoredFFI" | +| CERTIFIED_DEEMED_COMPLIANT_NONREGISTERING_LOCAL_BANK | "CertifiedDeemedCompliantNonregisteringLocalBank" | +| CERTIFIED_DEEMED_COMPLIANT_FFI_WITH_LOW_VALUE_ACCOUNTS | "CertifiedDeemedCompliantFFIWithLowValueAccounts" | +| CERTIFIED_DEEMED_COMPLIANT_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE | "CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle" | +| CERTIFIED_DEEMED_COMPLIANT_LIMITED_LIFE_DEBT_INVESTMENT_ENTITY | "CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity" | +| CERTAIN_INVESTMENT_ENTITIES_WITHOUT_FINANCIAL_ACCOUNTS | "CertainInvestmentEntitiesWithoutFinancialAccounts" | +| OWNER_DOCUMENTED_FFI | "OwnerDocumentedFFI" | +| RESTRICTED_DISTRIBUTOR | "RestrictedDistributor" | +| FOREIGN_CENTRAL_BANK_OF_ISSUE | "ForeignCentralBankOfIssue" | +| NONREPORTING_IGAFFI | "NonreportingIGAFFI" | +| EXEMPT_RETIREMENT_PLANS | "ExemptRetirementPlans" | +| EXCEPTED_NONFINANCIAL_GROUP_ENTITY | "ExceptedNonfinancialGroupEntity" | +| EXCEPTED_NONFINANCIAL_START_UP_COMPANY | "ExceptedNonfinancialStartUpCompany" | +| EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY | "ExceptedNonfinancialEntityInLiquidationOrBankruptcy" | +| PUBLICLY_TRADED_NFFEOR_AFFILIATE_OF_PUBLICLY_TRADED_CORPORATION | "PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation" | +| EXCEPTED_TERRITORY_NFFE | "ExceptedTerritoryNFFE" | +| ACTIVE_NFFE | "ActiveNFFE" | +| PASSIVE_NFFE | "PassiveNFFE" | +| DIRECT_REPORTING_NFFE | "DirectReportingNFFE" | +| SPONSORED_DIRECT_REPORTING_NFFE | "SponsoredDirectReportingNFFE" | + + + +## Enum: DisregardedEntityFatcaStatusEnum + +| Name | Value | +|---- | -----| +| _1 | "1" | +| _2 | "2" | +| _3 | "3" | +| _4 | "4" | +| _5 | "5" | + + + +## Enum: IgaModelEnum + +| Name | Value | +|---- | -----| +| _1 | "1" | +| _2 | "2" | + + + diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md index 9b44388..2ce4b47 100644 --- a/docs/A1099/V2/W9FormRequest.md +++ b/docs/A1099/V2/W9FormRequest.md @@ -10,16 +10,16 @@ |**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w9\" for this model). | [optional] [readonly] | |**name** | **String** | The name of the individual or entity associated with the form. | | |**businessName** | **String** | The name of the business associated with the form. | [optional] | -|**businessClassification** | **String** | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | +|**businessClassification** | [**BusinessClassificationEnum**](#BusinessClassificationEnum) | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | -|**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | -|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | +|**exemptPayeeCode** | **String** | The exempt payee code. Allowed values (1–13): - 1 — Organization exempt under §501(a) or IRA; custodial account under §403(b)(7) - 2 — U.S. government or its agencies/instrumentalities - 3 — U.S. state, DC, U.S. territory/possession, or their political subdivisions/agencies/instrumentalities - 4 — Foreign government or its political subdivisions/agencies/instrumentalities - 5 — Corporation - 6 — Dealer in securities or commodities required to register in the U.S., DC, or U.S. territory/possession - 7 — Futures commission merchant registered with the CFTC - 8 — Real estate investment trust (REIT) - 9 — Entity registered at all times during the tax year under the Investment Company Act of 1940 - 10 — Common trust fund operated by a bank under §584(a) - 11 — Financial institution (see §581) - 12 — Broker (nominee/custodian) - 13 — Trust exempt under §664 or described in §4947 | [optional] | +|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. Allowed values (A–M): - A — Tax‑exempt organization under §501(a) or IRA (§7701(a)(37)) - B — U.S. government or any of its agencies/instrumentalities - C — U.S. state, DC, territory/possession, or their political subdivisions/instrumentalities - D — Corporation whose stock is regularly traded on an established securities market - E — Corporation that is a member of the same expanded affiliated group as a D corporation - F — Registered dealer in securities/commodities/derivatives - G — REIT (Real Estate Investment Trust) - H — Regulated investment company (§851) or entity registered all year under the Investment Company Act of 1940 - I — Common trust fund (§584(a)) - J — Bank (§581) - K — Broker - L — Charitable remainder trust (§664) or trust described in §4947(a)(1) - M — Trust under §403(b) plan or §457(g) plan | [optional] | |**foreignCountryIndicator** | **Boolean** | Indicates whether the individual or entity is in a foreign country. | [optional] | |**address** | **String** | The address of the individual or entity. | | |**foreignAddress** | **String** | The foreign address of the individual or entity. | [optional] | |**city** | **String** | The city of the address. | | -|**state** | **String** | The state of the address. | | +|**state** | [**StateEnum**](#StateEnum) | The state of the address. | | |**zip** | **String** | The ZIP code of the address. | | |**accountNumber** | **String** | The account number associated with the form. | [optional] | |**tinType** | **String** | Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses). | | @@ -46,3 +46,88 @@ +## Enum: BusinessClassificationEnum + +| Name | Value | +|---- | -----| +| INDIVIDUAL | "Individual" | +| C_CORPORATION | "CCorporation" | +| S_CORPORATION | "SCorporation" | +| PARTNERSHIP | "Partnership" | +| TRUST_ESTATE | "TrustEstate" | +| LLC_C | "LlcC" | +| LLC_S | "LlcS" | +| LLC_P | "LlcP" | +| OTHER | "Other" | + + + +## Enum: StateEnum + +| Name | Value | +|---- | -----| +| AA | "AA" | +| AE | "AE" | +| AK | "AK" | +| AL | "AL" | +| AP | "AP" | +| AR | "AR" | +| AS | "AS" | +| AZ | "AZ" | +| CA | "CA" | +| CO | "CO" | +| CT | "CT" | +| DC | "DC" | +| DE | "DE" | +| FL | "FL" | +| FM | "FM" | +| GA | "GA" | +| GU | "GU" | +| HI | "HI" | +| IA | "IA" | +| ID | "ID" | +| IL | "IL" | +| IN | "IN" | +| KS | "KS" | +| KY | "KY" | +| LA | "LA" | +| MA | "MA" | +| MD | "MD" | +| ME | "ME" | +| MH | "MH" | +| MI | "MI" | +| MN | "MN" | +| MO | "MO" | +| MP | "MP" | +| MS | "MS" | +| MT | "MT" | +| NC | "NC" | +| ND | "ND" | +| NE | "NE" | +| NH | "NH" | +| NJ | "NJ" | +| NM | "NM" | +| NV | "NV" | +| NY | "NY" | +| OH | "OH" | +| OK | "OK" | +| OR | "OR" | +| PA | "PA" | +| PR | "PR" | +| PW | "PW" | +| RI | "RI" | +| SC | "SC" | +| SD | "SD" | +| TN | "TN" | +| TX | "TX" | +| UT | "UT" | +| VA | "VA" | +| VI | "VI" | +| VT | "VT" | +| WA | "WA" | +| WI | "WI" | +| WV | "WV" | +| WY | "WY" | + + + diff --git a/pom.xml b/pom.xml index 6a438dc..109181b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 25.9.0 + 25.10.0 https://github.com/avadev/Avalara-SDK-Java OpenAPI Java diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java index 55343fb..d657566 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -1089,7 +1089,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java index 8c9b290..4785fff 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -1509,7 +1509,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java index 9cbdafe..df91bbb 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -1647,7 +1647,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java index 7acd610..cfb47e5 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java index 5edc7e9..7dc5e13 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java index f2546ed..1fd80c3 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java index 31f4b62..5041d23 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -1105,7 +1105,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java index 4092b66..dbbaa05 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java index 1104d52..2bc3302 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java index 40f9278..32a006f 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -873,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java index c73d37f..89f380d 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -489,7 +489,7 @@ public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java index bb141f7..6923f91 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.9.0"); + this.localVarApiClient.setSdkVersion("25.10.0"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java index 06ef1e9..f637806 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java @@ -78,7 +78,7 @@ public ErrorResponse title(String title) { } /** - * Get title + * A summary of the problem type. * @return title */ @javax.annotation.Nullable @@ -105,7 +105,7 @@ public ErrorResponse addErrorsItem(ErrorResponseItem errorsItem) { } /** - * Get errors + * A list of errors detailing the problem type. * @return errors */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java index f5c67b6..1e1c56e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java @@ -75,7 +75,7 @@ public ErrorResponseItem type(String type) { } /** - * Get type + * An identifier for this occurrence of the problem. It is the name of a request's field when specific to that field. Otherwise, for other types of errors, its value is empty. * @return type */ @javax.annotation.Nullable @@ -94,7 +94,7 @@ public ErrorResponseItem detail(String detail) { } /** - * Get detail + * An explanation specific to this occurrence of the problem. * @return detail */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java index 4371aa1..ec9d359 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java @@ -153,17 +153,243 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_CITY) private String city; + /** + * The state of residence of the employee. Required unless exempt. + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + AA("AA"), + + AE("AE"), + + AK("AK"), + + AL("AL"), + + AP("AP"), + + AR("AR"), + + AS("AS"), + + AZ("AZ"), + + CA("CA"), + + CO("CO"), + + CT("CT"), + + DC("DC"), + + DE("DE"), + + FL("FL"), + + FM("FM"), + + GA("GA"), + + GU("GU"), + + HI("HI"), + + IA("IA"), + + ID("ID"), + + IL("IL"), + + IN("IN"), + + KS("KS"), + + KY("KY"), + + LA("LA"), + + MA("MA"), + + MD("MD"), + + ME("ME"), + + MH("MH"), + + MI("MI"), + + MN("MN"), + + MO("MO"), + + MP("MP"), + + MS("MS"), + + MT("MT"), + + NC("NC"), + + ND("ND"), + + NE("NE"), + + NH("NH"), + + NJ("NJ"), + + NM("NM"), + + NV("NV"), + + NY("NY"), + + OH("OH"), + + OK("OK"), + + OR("OR"), + + PA("PA"), + + PR("PR"), + + PW("PW"), + + RI("RI"), + + SC("SC"), + + SD("SD"), + + TN("TN"), + + TX("TX"), + + UT("UT"), + + VA("VA"), + + VI("VI"), + + VT("VT"), + + WA("WA"), + + WI("WI"), + + WV("WV"), + + WY("WY"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StateEnum fromValue(String value) { + for (StateEnum b : StateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StateEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StateEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) - private String state; + private StateEnum state; public static final String SERIALIZED_NAME_ZIP = "zip"; @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + /** + * The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual. + */ + @JsonAdapter(MaritalStatusEnum.Adapter.class) + public enum MaritalStatusEnum { + SINGLE("Single"), + + MARRIED("Married"), + + MARRIED_BUT("MarriedBut"); + + private String value; + + MaritalStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MaritalStatusEnum fromValue(String value) { + for (MaritalStatusEnum b : MaritalStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MaritalStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MaritalStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MaritalStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MaritalStatusEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_MARITAL_STATUS = "maritalStatus"; @SerializedName(SERIALIZED_NAME_MARITAL_STATUS) - private String maritalStatus; + private MaritalStatusEnum maritalStatus; public static final String SERIALIZED_NAME_LAST_NAME_DIFFERS = "lastNameDiffers"; @SerializedName(SERIALIZED_NAME_LAST_NAME_DIFFERS) @@ -390,7 +616,7 @@ public void setCity(String city) { } - public W4FormRequest state(String state) { + public W4FormRequest state(StateEnum state) { this.state = state; return this; } @@ -400,11 +626,11 @@ public W4FormRequest state(String state) { * @return state */ @javax.annotation.Nullable - public String getState() { + public StateEnum getState() { return state; } - public void setState(String state) { + public void setState(StateEnum state) { this.state = state; } @@ -428,7 +654,7 @@ public void setZip(String zip) { } - public W4FormRequest maritalStatus(String maritalStatus) { + public W4FormRequest maritalStatus(MaritalStatusEnum maritalStatus) { this.maritalStatus = maritalStatus; return this; } @@ -438,11 +664,11 @@ public W4FormRequest maritalStatus(String maritalStatus) { * @return maritalStatus */ @javax.annotation.Nullable - public String getMaritalStatus() { + public MaritalStatusEnum getMaritalStatus() { return maritalStatus; } - public void setMaritalStatus(String maritalStatus) { + public void setMaritalStatus(MaritalStatusEnum maritalStatus) { this.maritalStatus = maritalStatus; } @@ -875,12 +1101,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } + // validate the optional field `state` + if (jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) { + StateEnum.validateJsonElement(jsonObj.get("state")); + } if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } if ((jsonObj.get("maritalStatus") != null && !jsonObj.get("maritalStatus").isJsonNull()) && !jsonObj.get("maritalStatus").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `maritalStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maritalStatus").toString())); } + // validate the optional field `maritalStatus` + if (jsonObj.get("maritalStatus") != null && !jsonObj.get("maritalStatus").isJsonNull()) { + MaritalStatusEnum.validateJsonElement(jsonObj.get("maritalStatus")); + } if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java index 2766f0c..b0c5316 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java @@ -134,13 +134,179 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY) private String disregardedEntity; + /** + * Represents the entity type for W-8IMY tax forms. W-8IMY forms only accept entity types 1-9, which is a subset of the full EntityType enum. + */ + @JsonAdapter(EntityTypeEnum.Adapter.class) + public enum EntityTypeEnum { + QI("QI"), + + NONQUALIFIED_INTERMEDIARY("NonqualifiedIntermediary"), + + TERRITORY_FINANCIAL_INSTITUTION("TerritoryFinancialInstitution"), + + US_BRANCH("USBranch"), + + WITHHOLDING_FOREIGN_PARTNERSHIP("WithholdingForeignPartnership"), + + WITHHOLDING_FOREIGN_TRUST("WithholdingForeignTrust"), + + NONWITHHOLDING_FOREIGN_PARTNERSHIP("NonwithholdingForeignPartnership"), + + NONWITHHOLDING_FOREIGN_SIMPLE_TRUST("NonwithholdingForeignSimpleTrust"), + + NONWITHHOLDING_FOREIGN_GRANTOR_TRUST("NonwithholdingForeignGrantorTrust"); + + private String value; + + EntityTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EntityTypeEnum fromValue(String value) { + for (EntityTypeEnum b : EntityTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EntityTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EntityTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EntityTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EntityTypeEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) - private String entityType; + private EntityTypeEnum entityType; + + /** + * Represents the FATCA status types specifically for W8-IMY forms. This is a subset of the full FatcaStatus enum, restricted to values 1-26 for W8-IMY forms. + */ + @JsonAdapter(FatcaStatusEnum.Adapter.class) + public enum FatcaStatusEnum { + NONPARTICIPATING_FFI("NonparticipatingFFI"), + + PARTICIPATING_FFI("ParticipatingFFI"), + + REPORTING_MODEL1_FFI("ReportingModel1FFI"), + + REPORTING_MODEL2_FFI("ReportingModel2FFI"), + + REGISTERED_DEEMED_COMPLIANT_FFI("RegisteredDeemedCompliantFFI"), + + TERRITORY_FINANCIAL_INSTITUTION("TerritoryFinancialInstitution"), + + SPONSORED_FFI("SponsoredFFI"), + + CERTIFIED_DEEMED_COMPLIANT_NONREGISTERING_LOCAL_BANK("CertifiedDeemedCompliantNonregisteringLocalBank"), + + CERTIFIED_DEEMED_COMPLIANT_FFI_WITH_LOW_VALUE_ACCOUNTS("CertifiedDeemedCompliantFFIWithLowValueAccounts"), + + CERTIFIED_DEEMED_COMPLIANT_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE("CertifiedDeemedCompliantSponsoredCloselyHeldInvestmentVehicle"), + + CERTIFIED_DEEMED_COMPLIANT_LIMITED_LIFE_DEBT_INVESTMENT_ENTITY("CertifiedDeemedCompliantLimitedLifeDebtInvestmentEntity"), + + CERTAIN_INVESTMENT_ENTITIES_WITHOUT_FINANCIAL_ACCOUNTS("CertainInvestmentEntitiesWithoutFinancialAccounts"), + + OWNER_DOCUMENTED_FFI("OwnerDocumentedFFI"), + + RESTRICTED_DISTRIBUTOR("RestrictedDistributor"), + + FOREIGN_CENTRAL_BANK_OF_ISSUE("ForeignCentralBankOfIssue"), + + NONREPORTING_IGAFFI("NonreportingIGAFFI"), + + EXEMPT_RETIREMENT_PLANS("ExemptRetirementPlans"), + + EXCEPTED_NONFINANCIAL_GROUP_ENTITY("ExceptedNonfinancialGroupEntity"), + + EXCEPTED_NONFINANCIAL_START_UP_COMPANY("ExceptedNonfinancialStartUpCompany"), + + EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY("ExceptedNonfinancialEntityInLiquidationOrBankruptcy"), + + PUBLICLY_TRADED_NFFEOR_AFFILIATE_OF_PUBLICLY_TRADED_CORPORATION("PubliclyTradedNFFEOrAffiliateOfPubliclyTradedCorporation"), + + EXCEPTED_TERRITORY_NFFE("ExceptedTerritoryNFFE"), + + ACTIVE_NFFE("ActiveNFFE"), + + PASSIVE_NFFE("PassiveNFFE"), + + DIRECT_REPORTING_NFFE("DirectReportingNFFE"), + + SPONSORED_DIRECT_REPORTING_NFFE("SponsoredDirectReportingNFFE"); + + private String value; + + FatcaStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FatcaStatusEnum fromValue(String value) { + for (FatcaStatusEnum b : FatcaStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FatcaStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FatcaStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FatcaStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FatcaStatusEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_FATCA_STATUS = "fatcaStatus"; @SerializedName(SERIALIZED_NAME_FATCA_STATUS) - private String fatcaStatus; + private FatcaStatusEnum fatcaStatus; public static final String SERIALIZED_NAME_RESIDENCE_ADDRESS = "residenceAddress"; @SerializedName(SERIALIZED_NAME_RESIDENCE_ADDRESS) @@ -206,9 +372,67 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) private String referenceNumber; + /** + * The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI. - 2: Participating FFI. - 3: Reporting Model 1 FFI. - 4: Reporting Model 2 FFI. - 5: U.S. Branch + */ + @JsonAdapter(DisregardedEntityFatcaStatusEnum.Adapter.class) + public enum DisregardedEntityFatcaStatusEnum { + _1("1"), + + _2("2"), + + _3("3"), + + _4("4"), + + _5("5"); + + private String value; + + DisregardedEntityFatcaStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DisregardedEntityFatcaStatusEnum fromValue(String value) { + for (DisregardedEntityFatcaStatusEnum b : DisregardedEntityFatcaStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DisregardedEntityFatcaStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DisregardedEntityFatcaStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DisregardedEntityFatcaStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DisregardedEntityFatcaStatusEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS = "disregardedEntityFatcaStatus"; @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS) - private String disregardedEntityFatcaStatus; + private DisregardedEntityFatcaStatusEnum disregardedEntityFatcaStatus; public static final String SERIALIZED_NAME_DISREGARDED_ADDRESS = "disregardedAddress"; @SerializedName(SERIALIZED_NAME_DISREGARDED_ADDRESS) @@ -462,9 +686,61 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_IGA_COUNTRY) private String igaCountry; + /** + * The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA + */ + @JsonAdapter(IgaModelEnum.Adapter.class) + public enum IgaModelEnum { + _1("1"), + + _2("2"); + + private String value; + + IgaModelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IgaModelEnum fromValue(String value) { + for (IgaModelEnum b : IgaModelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IgaModelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IgaModelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IgaModelEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IgaModelEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_IGA_MODEL = "igaModel"; @SerializedName(SERIALIZED_NAME_IGA_MODEL) - private String igaModel; + private IgaModelEnum igaModel; public static final String SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT = "igaLegalStatusTreatment"; @SerializedName(SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT) @@ -664,40 +940,40 @@ public void setDisregardedEntity(String disregardedEntity) { } - public W8ImyFormRequest entityType(String entityType) { + public W8ImyFormRequest entityType(EntityTypeEnum entityType) { this.entityType = entityType; return this; } /** - * The entity type. Available values: - 1: QI (including a QDD). Complete Part III. - 2: Nonqualified intermediary. Complete Part IV. - 3: Territory financial institution. Complete Part V. - 4: U.S. branch. Complete Part VI. - 5: Withholding foreign partnership. Complete Part VII. - 6: Withholding foreign trust. Complete Part VII. - 7: Nonwithholding foreign partnership. Complete Part VIII. - 8: Nonwithholding foreign simple trust. Complete Part VIII. - 9: Nonwithholding foreign grantor trust. Complete Part VIII. + * Represents the entity type for W-8IMY tax forms. W-8IMY forms only accept entity types 1-9, which is a subset of the full EntityType enum. * @return entityType */ @javax.annotation.Nonnull - public String getEntityType() { + public EntityTypeEnum getEntityType() { return entityType; } - public void setEntityType(String entityType) { + public void setEntityType(EntityTypeEnum entityType) { this.entityType = entityType; } - public W8ImyFormRequest fatcaStatus(String fatcaStatus) { + public W8ImyFormRequest fatcaStatus(FatcaStatusEnum fatcaStatus) { this.fatcaStatus = fatcaStatus; return this; } /** - * The FATCA status. Available values: - 1: Nonparticipating foreign financial institution (FFI) (including an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner). Complete Part IX (if applicable). - 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 XIX). - 6: Territory financial institution. Complete Part V. - 7: Sponsored FFI (other than a certified deemed-compliant sponsored, closely held investment vehicle). Complete Part X. - 8: Certified deemed-compliant nonregistering local bank. Complete Part XII. - 9: Certified deemed-compliant FFI with only low-value accounts. Complete Part XIII. - 10: Certified deemed-compliant sponsored, closely held investment vehicle. Complete Part XIV. - 11: Certified deemed-compliant limited life debt investment entity. Complete Part XV. - 12: Certain investment entities that do not maintain financial accounts. Complete Part XVI. - 13: Owner-documented FFI. Complete Part XI. - 14: Restricted distributor. Complete Part XVII. - 15: Foreign central bank of issue. Complete Part XVIII. - 16: Nonreporting IGA FFI. Complete Part XIX. - 17: Exempt retirement plans. Complete Part XX. - 18: Excepted nonfinancial group entity. Complete Part XXI. - 19: Excepted nonfinancial start-up company. Complete Part XXII. - 20: Excepted nonfinancial entity in liquidation or bankruptcy. Complete Part XXIII. - 21: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation. Complete Part XXIV. - 22: Excepted territory NFFE. Complete Part XXV. - 23: Active NFFE. Complete Part XXVI. - 24: Passive NFFE. Complete Part XXVII. - 25: Direct reporting NFFE. - 26: Sponsored direct reporting NFFE. Complete Part XXVIII. + * Represents the FATCA status types specifically for W8-IMY forms. This is a subset of the full FatcaStatus enum, restricted to values 1-26 for W8-IMY forms. * @return fatcaStatus */ @javax.annotation.Nullable - public String getFatcaStatus() { + public FatcaStatusEnum getFatcaStatus() { return fatcaStatus; } - public void setFatcaStatus(String fatcaStatus) { + public void setFatcaStatus(FatcaStatusEnum fatcaStatus) { this.fatcaStatus = fatcaStatus; } @@ -1006,7 +1282,7 @@ public void setReferenceNumber(String referenceNumber) { } - public W8ImyFormRequest disregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + public W8ImyFormRequest disregardedEntityFatcaStatus(DisregardedEntityFatcaStatusEnum disregardedEntityFatcaStatus) { this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; return this; } @@ -1016,11 +1292,11 @@ public W8ImyFormRequest disregardedEntityFatcaStatus(String disregardedEntityFat * @return disregardedEntityFatcaStatus */ @javax.annotation.Nullable - public String getDisregardedEntityFatcaStatus() { + public DisregardedEntityFatcaStatusEnum getDisregardedEntityFatcaStatus() { return disregardedEntityFatcaStatus; } - public void setDisregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + public void setDisregardedEntityFatcaStatus(DisregardedEntityFatcaStatusEnum disregardedEntityFatcaStatus) { this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; } @@ -2222,7 +2498,7 @@ public void setIgaCountry(String igaCountry) { } - public W8ImyFormRequest igaModel(String igaModel) { + public W8ImyFormRequest igaModel(IgaModelEnum igaModel) { this.igaModel = igaModel; return this; } @@ -2232,11 +2508,11 @@ public W8ImyFormRequest igaModel(String igaModel) { * @return igaModel */ @javax.annotation.Nullable - public String getIgaModel() { + public IgaModelEnum getIgaModel() { return igaModel; } - public void setIgaModel(String igaModel) { + public void setIgaModel(IgaModelEnum igaModel) { this.igaModel = igaModel; } @@ -3161,9 +3437,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("entityType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `entityType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entityType").toString())); } + // validate the required field `entityType` + EntityTypeEnum.validateJsonElement(jsonObj.get("entityType")); if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `fatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fatcaStatus").toString())); } + // validate the optional field `fatcaStatus` + if (jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) { + FatcaStatusEnum.validateJsonElement(jsonObj.get("fatcaStatus")); + } if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); } @@ -3212,6 +3494,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("disregardedEntityFatcaStatus") != null && !jsonObj.get("disregardedEntityFatcaStatus").isJsonNull()) && !jsonObj.get("disregardedEntityFatcaStatus").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityFatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityFatcaStatus").toString())); } + // validate the optional field `disregardedEntityFatcaStatus` + if (jsonObj.get("disregardedEntityFatcaStatus") != null && !jsonObj.get("disregardedEntityFatcaStatus").isJsonNull()) { + DisregardedEntityFatcaStatusEnum.validateJsonElement(jsonObj.get("disregardedEntityFatcaStatus")); + } if ((jsonObj.get("disregardedAddress") != null && !jsonObj.get("disregardedAddress").isJsonNull()) && !jsonObj.get("disregardedAddress").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `disregardedAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedAddress").toString())); } @@ -3242,6 +3528,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("igaModel") != null && !jsonObj.get("igaModel").isJsonNull()) && !jsonObj.get("igaModel").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `igaModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaModel").toString())); } + // validate the optional field `igaModel` + if (jsonObj.get("igaModel") != null && !jsonObj.get("igaModel").isJsonNull()) { + IgaModelEnum.validateJsonElement(jsonObj.get("igaModel")); + } if ((jsonObj.get("igaLegalStatusTreatment") != null && !jsonObj.get("igaLegalStatusTreatment").isJsonNull()) && !jsonObj.get("igaLegalStatusTreatment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `igaLegalStatusTreatment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaLegalStatusTreatment").toString())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java index 23ede97..09d94c9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -129,9 +129,75 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) private String businessName; + /** + * The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) + */ + @JsonAdapter(BusinessClassificationEnum.Adapter.class) + public enum BusinessClassificationEnum { + INDIVIDUAL("Individual"), + + C_CORPORATION("CCorporation"), + + S_CORPORATION("SCorporation"), + + PARTNERSHIP("Partnership"), + + TRUST_ESTATE("TrustEstate"), + + LLC_C("LlcC"), + + LLC_S("LlcS"), + + LLC_P("LlcP"), + + OTHER("Other"); + + private String value; + + BusinessClassificationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BusinessClassificationEnum fromValue(String value) { + for (BusinessClassificationEnum b : BusinessClassificationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BusinessClassificationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BusinessClassificationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BusinessClassificationEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + BusinessClassificationEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_BUSINESS_CLASSIFICATION = "businessClassification"; @SerializedName(SERIALIZED_NAME_BUSINESS_CLASSIFICATION) - private String businessClassification; + private BusinessClassificationEnum businessClassification; public static final String SERIALIZED_NAME_BUSINESS_OTHER = "businessOther"; @SerializedName(SERIALIZED_NAME_BUSINESS_OTHER) @@ -165,9 +231,181 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_CITY) private String city; + /** + * The state of the address. + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + AA("AA"), + + AE("AE"), + + AK("AK"), + + AL("AL"), + + AP("AP"), + + AR("AR"), + + AS("AS"), + + AZ("AZ"), + + CA("CA"), + + CO("CO"), + + CT("CT"), + + DC("DC"), + + DE("DE"), + + FL("FL"), + + FM("FM"), + + GA("GA"), + + GU("GU"), + + HI("HI"), + + IA("IA"), + + ID("ID"), + + IL("IL"), + + IN("IN"), + + KS("KS"), + + KY("KY"), + + LA("LA"), + + MA("MA"), + + MD("MD"), + + ME("ME"), + + MH("MH"), + + MI("MI"), + + MN("MN"), + + MO("MO"), + + MP("MP"), + + MS("MS"), + + MT("MT"), + + NC("NC"), + + ND("ND"), + + NE("NE"), + + NH("NH"), + + NJ("NJ"), + + NM("NM"), + + NV("NV"), + + NY("NY"), + + OH("OH"), + + OK("OK"), + + OR("OR"), + + PA("PA"), + + PR("PR"), + + PW("PW"), + + RI("RI"), + + SC("SC"), + + SD("SD"), + + TN("TN"), + + TX("TX"), + + UT("UT"), + + VA("VA"), + + VI("VI"), + + VT("VT"), + + WA("WA"), + + WI("WI"), + + WV("WV"), + + WY("WY"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StateEnum fromValue(String value) { + for (StateEnum b : StateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StateEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StateEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) - private String state; + private StateEnum state; public static final String SERIALIZED_NAME_ZIP = "zip"; @SerializedName(SERIALIZED_NAME_ZIP) @@ -272,7 +510,7 @@ public void setBusinessName(String businessName) { } - public W9FormRequest businessClassification(String businessClassification) { + public W9FormRequest businessClassification(BusinessClassificationEnum businessClassification) { this.businessClassification = businessClassification; return this; } @@ -282,11 +520,11 @@ public W9FormRequest businessClassification(String businessClassification) { * @return businessClassification */ @javax.annotation.Nonnull - public String getBusinessClassification() { + public BusinessClassificationEnum getBusinessClassification() { return businessClassification; } - public void setBusinessClassification(String businessClassification) { + public void setBusinessClassification(BusinessClassificationEnum businessClassification) { this.businessClassification = businessClassification; } @@ -335,7 +573,7 @@ public W9FormRequest exemptPayeeCode(String exemptPayeeCode) { } /** - * The exempt payee code. + * The exempt payee code. Allowed values (1–13): - 1 — Organization exempt under §501(a) or IRA; custodial account under §403(b)(7) - 2 — U.S. government or its agencies/instrumentalities - 3 — U.S. state, DC, U.S. territory/possession, or their political subdivisions/agencies/instrumentalities - 4 — Foreign government or its political subdivisions/agencies/instrumentalities - 5 — Corporation - 6 — Dealer in securities or commodities required to register in the U.S., DC, or U.S. territory/possession - 7 — Futures commission merchant registered with the CFTC - 8 — Real estate investment trust (REIT) - 9 — Entity registered at all times during the tax year under the Investment Company Act of 1940 - 10 — Common trust fund operated by a bank under §584(a) - 11 — Financial institution (see §581) - 12 — Broker (nominee/custodian) - 13 — Trust exempt under §664 or described in §4947 * @return exemptPayeeCode */ @javax.annotation.Nullable @@ -354,7 +592,7 @@ public W9FormRequest exemptFatcaCode(String exemptFatcaCode) { } /** - * The exemption from FATCA reporting code. + * The exemption from FATCA reporting code. Allowed values (A–M): - A — Tax‑exempt organization under §501(a) or IRA (§7701(a)(37)) - B — U.S. government or any of its agencies/instrumentalities - C — U.S. state, DC, territory/possession, or their political subdivisions/instrumentalities - D — Corporation whose stock is regularly traded on an established securities market - E — Corporation that is a member of the same expanded affiliated group as a D corporation - F — Registered dealer in securities/commodities/derivatives - G — REIT (Real Estate Investment Trust) - H — Regulated investment company (§851) or entity registered all year under the Investment Company Act of 1940 - I — Common trust fund (§584(a)) - J — Bank (§581) - K — Broker - L — Charitable remainder trust (§664) or trust described in §4947(a)(1) - M — Trust under §403(b) plan or §457(g) plan * @return exemptFatcaCode */ @javax.annotation.Nullable @@ -443,7 +681,7 @@ public void setCity(String city) { } - public W9FormRequest state(String state) { + public W9FormRequest state(StateEnum state) { this.state = state; return this; } @@ -453,11 +691,11 @@ public W9FormRequest state(String state) { * @return state */ @javax.annotation.Nullable - public String getState() { + public StateEnum getState() { return state; } - public void setState(String state) { + public void setState(StateEnum state) { this.state = state; } @@ -836,6 +1074,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!jsonObj.get("businessClassification").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessClassification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessClassification").toString())); } + // validate the required field `businessClassification` + BusinessClassificationEnum.validateJsonElement(jsonObj.get("businessClassification")); if ((jsonObj.get("businessOther") != null && !jsonObj.get("businessOther").isJsonNull()) && !jsonObj.get("businessOther").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessOther` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessOther").toString())); } @@ -857,6 +1097,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } + // validate the required field `state` + StateEnum.validateJsonElement(jsonObj.get("state")); if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); }