_callback) throws ApiException {
@@ -1064,8 +1062,9 @@ public ListW9FormsRequest getListW9FormsRequest() {
| Status Code | Description | Response Headers |
| 200 | Email sent using existing form (form was already in 'Requested' status or descendant found) | - |
| 201 | Email sent using newly created minimal form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing vendor e-mail) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call sendW9FormEmailCall(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1150,7 +1149,7 @@ private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest re
/**
* Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form
- * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
+ * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
* @param requestOptions Object which represents the options available for a given API/request
* @return CreateW9Form201Response
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -1159,8 +1158,9 @@ private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest re
| Status Code | Description | Response Headers |
| 200 | Email sent using existing form (form was already in 'Requested' status or descendant found) | - |
| 201 | Email sent using newly created minimal form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing vendor e-mail) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestParameters) throws ApiException {
@@ -1170,7 +1170,7 @@ public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestPar
/**
* Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form
- * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
+ * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
* @param requestOptions Object which represents the options available for a given API/request
* @return ApiResponse<CreateW9Form201Response>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
@@ -1179,8 +1179,9 @@ public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestPar
| Status Code | Description | Response Headers |
| 200 | Email sent using existing form (form was already in 'Requested' status or descendant found) | - |
| 201 | Email sent using newly created minimal form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing vendor e-mail) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public ApiResponse sendW9FormEmailWithHttpInfo(SendW9FormEmailRequest requestParameters) throws ApiException {
@@ -1191,7 +1192,7 @@ public ApiResponse sendW9FormEmailWithHttpInfo(SendW9Fo
/**
* Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form (asynchronously)
- * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
+ * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request.
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback The callback to be executed when the API call finishes
* @return The request call
@@ -1201,8 +1202,9 @@ public ApiResponse sendW9FormEmailWithHttpInfo(SendW9Fo
| Status Code | Description | Response Headers |
| 200 | Email sent using existing form (form was already in 'Requested' status or descendant found) | - |
| 201 | Email sent using newly created minimal form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing vendor e-mail) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call sendW9FormEmailAsync(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1257,7 +1259,7 @@ public SendW9FormEmailRequest getSendW9FormEmailRequest() {
| Status Code | Description | Response Headers |
| 200 | The updated W9/W4/W8 form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing required field) | - |
| 401 | Authentication failed | - |
| 404 | W9/W4/W8 form not found | - |
@@ -1280,7 +1282,7 @@ public okhttp3.Call updateW9FormCall(UpdateW9FormRequest requestParameters, fina
basePath = null;
}
- Object localVarPostBody = requestParameters.getIw9FormDataModelsOneOf();
+ Object localVarPostBody = requestParameters.getCreateW9FormRequest();
// create path and map variables
String localVarPath = "/w9/forms/{id}"
@@ -1346,19 +1348,19 @@ private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestP
* Update a W9/W4/W8 form
* Update a W9/W4/W8 form.
* @param requestOptions Object which represents the options available for a given API/request
- * @return IW9FormDataModelsOneOf
+ * @return CreateW9Form201Response
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
| 200 | The updated W9/W4/W8 form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing required field) | - |
| 401 | Authentication failed | - |
| 404 | W9/W4/W8 form not found | - |
*/
- public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException {
- ApiResponse localVarResp = updateW9FormWithHttpInfo(requestParameters);
+ public CreateW9Form201Response updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException {
+ ApiResponse localVarResp = updateW9FormWithHttpInfo(requestParameters);
return localVarResp.getData();
}
@@ -1366,20 +1368,20 @@ public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters
* Update a W9/W4/W8 form
* Update a W9/W4/W8 form.
* @param requestOptions Object which represents the options available for a given API/request
- * @return ApiResponse<IW9FormDataModelsOneOf>
+ * @return ApiResponse<CreateW9Form201Response>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
| Status Code | Description | Response Headers |
| 200 | The updated W9/W4/W8 form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing required field) | - |
| 401 | Authentication failed | - |
| 404 | W9/W4/W8 form not found | - |
*/
- public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException {
+ public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException {
okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
@@ -1394,15 +1396,15 @@ public ApiResponse updateW9FormWithHttpInfo(UpdateW9Form
| Status Code | Description | Response Headers |
| 200 | The updated W9/W4/W8 form | - |
- | 400 | Bad request (e.g., invalid sort key) | - |
+ | 400 | Bad request (e.g., missing required field) | - |
| 401 | Authentication failed | - |
| 404 | W9/W4/W8 form not found | - |
*/
- public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
@@ -1413,14 +1415,14 @@ public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, fin
* @param avalaraVersion API version
* @param xCorrelationId Unique correlation Id in a GUID format (optional)
* @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional)
- * @param iw9FormDataModelsOneOf Form to be updated (optional)
+ * @param createW9FormRequest Form to be updated (optional)
*/
public class UpdateW9FormRequest {
private String id;
private String avalaraVersion;
private String xCorrelationId;
private String xAvalaraClient;
- private IW9FormDataModelsOneOf iw9FormDataModelsOneOf;
+ private CreateW9FormRequest createW9FormRequest;
public UpdateW9FormRequest () {
}
@@ -1433,8 +1435,8 @@ public UpdateW9FormRequest () {
public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
- public IW9FormDataModelsOneOf getIw9FormDataModelsOneOf() { return iw9FormDataModelsOneOf; }
- public void setIw9FormDataModelsOneOf(IW9FormDataModelsOneOf iw9FormDataModelsOneOf) { this.iw9FormDataModelsOneOf = iw9FormDataModelsOneOf; }
+ public CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; }
+ public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; }
}
/**
@@ -1455,9 +1457,9 @@ public UpdateW9FormRequest getUpdateW9FormRequest() {
| Status Code | Description | Response Headers |
| 200 | | - |
- | 400 | Bad request (e.g., Only .pdf files are allowed.) | - |
+ | 400 | Bad request (e.g., only .pdf files are allowed.) | - |
| 401 | Authentication failed | - |
- | 404 | Not Found | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1553,9 +1555,9 @@ private okhttp3.Call uploadW9FilesValidateBeforeCall(UploadW9FilesRequest reques
| Status Code | Description | Response Headers |
| 200 | | - |
- | 400 | Bad request (e.g., Only .pdf files are allowed.) | - |
+ | 400 | Bad request (e.g., only .pdf files are allowed.) | - |
| 401 | Authentication failed | - |
- | 404 | Not Found | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiException {
@@ -1572,9 +1574,9 @@ public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiExce
| Status Code | Description | Response Headers |
| 200 | | - |
- | 400 | Bad request (e.g., Only .pdf files are allowed.) | - |
+ | 400 | Bad request (e.g., only .pdf files are allowed.) | - |
| 401 | Authentication failed | - |
- | 404 | Not Found | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestParameters) throws ApiException {
@@ -1593,9 +1595,9 @@ public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestP
| Status Code | Description | Response Headers |
| 200 | | - |
- | 400 | Bad request (e.g., Only .pdf files are allowed.) | - |
+ | 400 | Bad request (e.g., only .pdf files are allowed.) | - |
| 401 | Authentication failed | - |
- | 404 | Not Found | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call uploadW9FilesAsync(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1645,7 +1647,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 0f84317..7acd610 100644
--- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java
+++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java
@@ -36,8 +36,8 @@
import java.util.*;
-import Avalara.SDK.model.A1099.V2.CreateIssuerRequest;
import Avalara.SDK.model.A1099.V2.ErrorResponse;
+import Avalara.SDK.model.A1099.V2.IssuerRequest;
import Avalara.SDK.model.A1099.V2.IssuerResponse;
import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse;
@@ -109,7 +109,7 @@ public okhttp3.Call createIssuerCall(CreateIssuerRequest requestParameters, fina
basePath = null;
}
- Object localVarPostBody = requestParameters.getCreateIssuerRequest();
+ Object localVarPostBody = requestParameters.getIssuerRequest();
// create path and map variables
String localVarPath = "/1099/issuers";
@@ -232,13 +232,13 @@ public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, fin
* @param avalaraVersion API version
* @param xCorrelationId Unique correlation Id in a GUID format (optional)
* @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional)
- * @param createIssuerRequest The issuer to create (optional)
+ * @param issuerRequest The issuer to create (optional)
*/
public class CreateIssuerRequest {
private String avalaraVersion;
private String xCorrelationId;
private String xAvalaraClient;
- private CreateIssuerRequest createIssuerRequest;
+ private IssuerRequest issuerRequest;
public CreateIssuerRequest () {
}
@@ -249,8 +249,8 @@ public CreateIssuerRequest () {
public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
- public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; }
- public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; }
+ public IssuerRequest getIssuerRequest() { return issuerRequest; }
+ public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; }
}
/**
@@ -906,7 +906,7 @@ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, fina
basePath = null;
}
- Object localVarPostBody = requestParameters.getCreateIssuerRequest();
+ Object localVarPostBody = requestParameters.getIssuerRequest();
// create path and map variables
String localVarPath = "/1099/issuers/{id}"
@@ -1035,14 +1035,14 @@ public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, fin
* @param avalaraVersion API version
* @param xCorrelationId Unique correlation Id in a GUID format (optional)
* @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional)
- * @param createIssuerRequest The issuer to update (optional)
+ * @param issuerRequest The issuer to update (optional)
*/
public class UpdateIssuerRequest {
private String id;
private String avalaraVersion;
private String xCorrelationId;
private String xAvalaraClient;
- private CreateIssuerRequest createIssuerRequest;
+ private IssuerRequest issuerRequest;
public UpdateIssuerRequest () {
}
@@ -1055,8 +1055,8 @@ public UpdateIssuerRequest () {
public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
- public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; }
- public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; }
+ public IssuerRequest getIssuerRequest() { return issuerRequest; }
+ public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; }
}
/**
@@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 063d99d..5edc7e9 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 bf1883f..f2546ed 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 2100ede..31f4b62 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 1e8659e..4092b66 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 4672dfd..1104d52 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 25a1e9c..40f9278 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 b5e2c83..c73d37f 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.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 1609bdd..bb141f7 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.8.3");
+ this.localVarApiClient.setSdkVersion("25.9.0");
}
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java
new file mode 100644
index 0000000..c948f4c
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java
@@ -0,0 +1,691 @@
+/*
+ * AvaTax Software Development Kit for Java (JRE)
+ *
+ * (c) 2004-2025 Avalara, Inc.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * Avalara 1099 & W-9 API Definition
+ *
+ * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
+ *
+ * @author Sachin Baijal
+ * @author Jonathan Wenger
+ * @copyright 2004-2025 Avalara, Inc.
+ * @license https://www.apache.org/licenses/LICENSE-2.0
+ * @link https://github.com/avadev/Avalara-SDK-Java
+ */
+
+package Avalara.SDK.model.A1099.V2;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import Avalara.SDK.JSON;
+
+/**
+ * CompanyBase
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CompanyBase {
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_DBA_NAME = "dbaName";
+ @SerializedName(SERIALIZED_NAME_DBA_NAME)
+ private String dbaName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ADDRESS = "address";
+ @SerializedName(SERIALIZED_NAME_ADDRESS)
+ private String address;
+
+ public static final String SERIALIZED_NAME_CITY = "city";
+ @SerializedName(SERIALIZED_NAME_CITY)
+ private String city;
+
+ public static final String SERIALIZED_NAME_STATE = "state";
+ @SerializedName(SERIALIZED_NAME_STATE)
+ private String state;
+
+ public static final String SERIALIZED_NAME_ZIP = "zip";
+ @SerializedName(SERIALIZED_NAME_ZIP)
+ private String zip;
+
+ public static final String SERIALIZED_NAME_TELEPHONE = "telephone";
+ @SerializedName(SERIALIZED_NAME_TELEPHONE)
+ private String telephone;
+
+ public static final String SERIALIZED_NAME_TIN = "tin";
+ @SerializedName(SERIALIZED_NAME_TIN)
+ private String tin;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch";
+ @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH)
+ private Boolean doTinMatch;
+
+ public static final String SERIALIZED_NAME_GROUP_NAME = "groupName";
+ @SerializedName(SERIALIZED_NAME_GROUP_NAME)
+ private String groupName;
+
+ public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince";
+ @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE)
+ private String foreignProvince;
+
+ public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode";
+ @SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
+ private String countryCode;
+
+ public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests";
+ @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS)
+ private Boolean resendRequests;
+
+ public static final String SERIALIZED_NAME_RESEND_INTERVAL_DAYS = "resendIntervalDays";
+ @SerializedName(SERIALIZED_NAME_RESEND_INTERVAL_DAYS)
+ private Integer resendIntervalDays;
+
+ public static final String SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS = "maxReminderAttempts";
+ @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS)
+ private Integer maxReminderAttempts;
+
+ public CompanyBase() {
+ }
+
+ public CompanyBase name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Legal name. Not the DBA name.
+ * @return name
+ */
+ @javax.annotation.Nullable
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public CompanyBase dbaName(String dbaName) {
+ this.dbaName = dbaName;
+ return this;
+ }
+
+ /**
+ * Doing Business As (DBA) name or continuation of a long legal name.
+ * @return dbaName
+ */
+ @javax.annotation.Nullable
+ public String getDbaName() {
+ return dbaName;
+ }
+
+ public void setDbaName(String dbaName) {
+ this.dbaName = dbaName;
+ }
+
+
+ public CompanyBase email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Contact email address. For inquiries by vendors/employees.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public CompanyBase address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Address.
+ * @return address
+ */
+ @javax.annotation.Nullable
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+
+ public CompanyBase city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * City.
+ * @return city
+ */
+ @javax.annotation.Nullable
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+
+ public CompanyBase state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
+ * @return state
+ */
+ @javax.annotation.Nullable
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+
+ public CompanyBase zip(String zip) {
+ this.zip = zip;
+ return this;
+ }
+
+ /**
+ * ZIP/postal code.
+ * @return zip
+ */
+ @javax.annotation.Nullable
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+
+ public CompanyBase telephone(String telephone) {
+ this.telephone = telephone;
+ return this;
+ }
+
+ /**
+ * Contact phone number (must contain at least 10 digits, max 15 characters).
+ * @return telephone
+ */
+ @javax.annotation.Nullable
+ public String getTelephone() {
+ return telephone;
+ }
+
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
+ }
+
+
+ public CompanyBase tin(String tin) {
+ this.tin = tin;
+ return this;
+ }
+
+ /**
+ * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies).
+ * @return tin
+ */
+ @javax.annotation.Nullable
+ public String getTin() {
+ return tin;
+ }
+
+ public void setTin(String tin) {
+ this.tin = tin;
+ }
+
+
+ public CompanyBase referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * Internal reference ID. Never shown to any agency or recipient.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public CompanyBase doTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
+ return this;
+ }
+
+ /**
+ * Indicates whether the company authorizes IRS TIN matching.
+ * @return doTinMatch
+ */
+ @javax.annotation.Nullable
+ public Boolean getDoTinMatch() {
+ return doTinMatch;
+ }
+
+ public void setDoTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
+ }
+
+
+ public CompanyBase groupName(String groupName) {
+ this.groupName = groupName;
+ return this;
+ }
+
+ /**
+ * Group name for organizing companies (creates or finds group by name).
+ * @return groupName
+ */
+ @javax.annotation.Nullable
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+
+
+ public CompanyBase foreignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ return this;
+ }
+
+ /**
+ * Province or region for non-US/CA addresses.
+ * @return foreignProvince
+ */
+ @javax.annotation.Nullable
+ public String getForeignProvince() {
+ return foreignProvince;
+ }
+
+ public void setForeignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ }
+
+
+ public CompanyBase countryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
+ * @return countryCode
+ */
+ @javax.annotation.Nullable
+ public String getCountryCode() {
+ return countryCode;
+ }
+
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ }
+
+
+ public CompanyBase resendRequests(Boolean resendRequests) {
+ this.resendRequests = resendRequests;
+ return this;
+ }
+
+ /**
+ * Boolean to enable automatic reminder emails (default: false).
+ * @return resendRequests
+ */
+ @javax.annotation.Nullable
+ public Boolean getResendRequests() {
+ return resendRequests;
+ }
+
+ public void setResendRequests(Boolean resendRequests) {
+ this.resendRequests = resendRequests;
+ }
+
+
+ public CompanyBase resendIntervalDays(Integer resendIntervalDays) {
+ this.resendIntervalDays = resendIntervalDays;
+ return this;
+ }
+
+ /**
+ * Days between reminder emails (7-365, required if resendRequests is true).
+ * @return resendIntervalDays
+ */
+ @javax.annotation.Nullable
+ public Integer getResendIntervalDays() {
+ return resendIntervalDays;
+ }
+
+ public void setResendIntervalDays(Integer resendIntervalDays) {
+ this.resendIntervalDays = resendIntervalDays;
+ }
+
+
+ public CompanyBase maxReminderAttempts(Integer maxReminderAttempts) {
+ this.maxReminderAttempts = maxReminderAttempts;
+ return this;
+ }
+
+ /**
+ * Maximum number of reminder attempts (1-52, required if resendRequests is true).
+ * @return maxReminderAttempts
+ */
+ @javax.annotation.Nullable
+ public Integer getMaxReminderAttempts() {
+ return maxReminderAttempts;
+ }
+
+ public void setMaxReminderAttempts(Integer maxReminderAttempts) {
+ this.maxReminderAttempts = maxReminderAttempts;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CompanyBase companyBase = (CompanyBase) o;
+ return Objects.equals(this.name, companyBase.name) &&
+ Objects.equals(this.dbaName, companyBase.dbaName) &&
+ Objects.equals(this.email, companyBase.email) &&
+ Objects.equals(this.address, companyBase.address) &&
+ Objects.equals(this.city, companyBase.city) &&
+ Objects.equals(this.state, companyBase.state) &&
+ Objects.equals(this.zip, companyBase.zip) &&
+ Objects.equals(this.telephone, companyBase.telephone) &&
+ Objects.equals(this.tin, companyBase.tin) &&
+ Objects.equals(this.referenceId, companyBase.referenceId) &&
+ Objects.equals(this.doTinMatch, companyBase.doTinMatch) &&
+ Objects.equals(this.groupName, companyBase.groupName) &&
+ Objects.equals(this.foreignProvince, companyBase.foreignProvince) &&
+ Objects.equals(this.countryCode, companyBase.countryCode) &&
+ Objects.equals(this.resendRequests, companyBase.resendRequests) &&
+ Objects.equals(this.resendIntervalDays, companyBase.resendIntervalDays) &&
+ Objects.equals(this.maxReminderAttempts, companyBase.maxReminderAttempts);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CompanyBase {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" zip: ").append(toIndentedString(zip)).append("\n");
+ sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n");
+ sb.append(" tin: ").append(toIndentedString(tin)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n");
+ sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
+ sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n");
+ sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
+ sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n");
+ sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n");
+ sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("name");
+ openapiFields.add("dbaName");
+ openapiFields.add("email");
+ openapiFields.add("address");
+ openapiFields.add("city");
+ openapiFields.add("state");
+ openapiFields.add("zip");
+ openapiFields.add("telephone");
+ openapiFields.add("tin");
+ openapiFields.add("referenceId");
+ openapiFields.add("doTinMatch");
+ openapiFields.add("groupName");
+ openapiFields.add("foreignProvince");
+ openapiFields.add("countryCode");
+ openapiFields.add("resendRequests");
+ openapiFields.add("resendIntervalDays");
+ openapiFields.add("maxReminderAttempts");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("email");
+ openapiRequiredFields.add("address");
+ openapiRequiredFields.add("city");
+ openapiRequiredFields.add("zip");
+ openapiRequiredFields.add("telephone");
+ openapiRequiredFields.add("tin");
+ openapiRequiredFields.add("countryCode");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CompanyBase
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CompanyBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CompanyBase is not found in the empty JSON string", CompanyBase.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!CompanyBase.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyBase` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CompanyBase.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString()));
+ }
+ if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString()));
+ }
+ if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CompanyBase.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CompanyBase' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CompanyBase.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CompanyBase value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public CompanyBase read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of CompanyBase given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CompanyBase
+ * @throws IOException if the JSON string is invalid with respect to CompanyBase
+ */
+ public static CompanyBase fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CompanyBase.class);
+ }
+
+ /**
+ * Convert an instance of CompanyBase to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java
new file mode 100644
index 0000000..6c04be0
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java
@@ -0,0 +1,691 @@
+/*
+ * AvaTax Software Development Kit for Java (JRE)
+ *
+ * (c) 2004-2025 Avalara, Inc.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * Avalara 1099 & W-9 API Definition
+ *
+ * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
+ *
+ * @author Sachin Baijal
+ * @author Jonathan Wenger
+ * @copyright 2004-2025 Avalara, Inc.
+ * @license https://www.apache.org/licenses/LICENSE-2.0
+ * @link https://github.com/avadev/Avalara-SDK-Java
+ */
+
+package Avalara.SDK.model.A1099.V2;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import Avalara.SDK.JSON;
+
+/**
+ * CompanyRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CompanyRequest {
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_DBA_NAME = "dbaName";
+ @SerializedName(SERIALIZED_NAME_DBA_NAME)
+ private String dbaName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ADDRESS = "address";
+ @SerializedName(SERIALIZED_NAME_ADDRESS)
+ private String address;
+
+ public static final String SERIALIZED_NAME_CITY = "city";
+ @SerializedName(SERIALIZED_NAME_CITY)
+ private String city;
+
+ public static final String SERIALIZED_NAME_STATE = "state";
+ @SerializedName(SERIALIZED_NAME_STATE)
+ private String state;
+
+ public static final String SERIALIZED_NAME_ZIP = "zip";
+ @SerializedName(SERIALIZED_NAME_ZIP)
+ private String zip;
+
+ public static final String SERIALIZED_NAME_TELEPHONE = "telephone";
+ @SerializedName(SERIALIZED_NAME_TELEPHONE)
+ private String telephone;
+
+ public static final String SERIALIZED_NAME_TIN = "tin";
+ @SerializedName(SERIALIZED_NAME_TIN)
+ private String tin;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch";
+ @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH)
+ private Boolean doTinMatch;
+
+ public static final String SERIALIZED_NAME_GROUP_NAME = "groupName";
+ @SerializedName(SERIALIZED_NAME_GROUP_NAME)
+ private String groupName;
+
+ public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince";
+ @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE)
+ private String foreignProvince;
+
+ public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode";
+ @SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
+ private String countryCode;
+
+ public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests";
+ @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS)
+ private Boolean resendRequests;
+
+ public static final String SERIALIZED_NAME_RESEND_INTERVAL_DAYS = "resendIntervalDays";
+ @SerializedName(SERIALIZED_NAME_RESEND_INTERVAL_DAYS)
+ private Integer resendIntervalDays;
+
+ public static final String SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS = "maxReminderAttempts";
+ @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS)
+ private Integer maxReminderAttempts;
+
+ public CompanyRequest() {
+ }
+
+ public CompanyRequest name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Legal name. Not the DBA name.
+ * @return name
+ */
+ @javax.annotation.Nullable
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public CompanyRequest dbaName(String dbaName) {
+ this.dbaName = dbaName;
+ return this;
+ }
+
+ /**
+ * Doing Business As (DBA) name or continuation of a long legal name.
+ * @return dbaName
+ */
+ @javax.annotation.Nullable
+ public String getDbaName() {
+ return dbaName;
+ }
+
+ public void setDbaName(String dbaName) {
+ this.dbaName = dbaName;
+ }
+
+
+ public CompanyRequest email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Contact email address. For inquiries by vendors/employees.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public CompanyRequest address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Address.
+ * @return address
+ */
+ @javax.annotation.Nullable
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+
+ public CompanyRequest city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * City.
+ * @return city
+ */
+ @javax.annotation.Nullable
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+
+ public CompanyRequest state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
+ * @return state
+ */
+ @javax.annotation.Nullable
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+
+ public CompanyRequest zip(String zip) {
+ this.zip = zip;
+ return this;
+ }
+
+ /**
+ * ZIP/postal code.
+ * @return zip
+ */
+ @javax.annotation.Nullable
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+
+ public CompanyRequest telephone(String telephone) {
+ this.telephone = telephone;
+ return this;
+ }
+
+ /**
+ * Contact phone number (must contain at least 10 digits, max 15 characters).
+ * @return telephone
+ */
+ @javax.annotation.Nullable
+ public String getTelephone() {
+ return telephone;
+ }
+
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
+ }
+
+
+ public CompanyRequest tin(String tin) {
+ this.tin = tin;
+ return this;
+ }
+
+ /**
+ * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies).
+ * @return tin
+ */
+ @javax.annotation.Nullable
+ public String getTin() {
+ return tin;
+ }
+
+ public void setTin(String tin) {
+ this.tin = tin;
+ }
+
+
+ public CompanyRequest referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * Internal reference ID. Never shown to any agency or recipient.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public CompanyRequest doTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
+ return this;
+ }
+
+ /**
+ * Indicates whether the company authorizes IRS TIN matching.
+ * @return doTinMatch
+ */
+ @javax.annotation.Nullable
+ public Boolean getDoTinMatch() {
+ return doTinMatch;
+ }
+
+ public void setDoTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
+ }
+
+
+ public CompanyRequest groupName(String groupName) {
+ this.groupName = groupName;
+ return this;
+ }
+
+ /**
+ * Group name for organizing companies (creates or finds group by name).
+ * @return groupName
+ */
+ @javax.annotation.Nullable
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+
+
+ public CompanyRequest foreignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ return this;
+ }
+
+ /**
+ * Province or region for non-US/CA addresses.
+ * @return foreignProvince
+ */
+ @javax.annotation.Nullable
+ public String getForeignProvince() {
+ return foreignProvince;
+ }
+
+ public void setForeignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ }
+
+
+ public CompanyRequest countryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
+ * @return countryCode
+ */
+ @javax.annotation.Nullable
+ public String getCountryCode() {
+ return countryCode;
+ }
+
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ }
+
+
+ public CompanyRequest resendRequests(Boolean resendRequests) {
+ this.resendRequests = resendRequests;
+ return this;
+ }
+
+ /**
+ * Boolean to enable automatic reminder emails (default: false).
+ * @return resendRequests
+ */
+ @javax.annotation.Nullable
+ public Boolean getResendRequests() {
+ return resendRequests;
+ }
+
+ public void setResendRequests(Boolean resendRequests) {
+ this.resendRequests = resendRequests;
+ }
+
+
+ public CompanyRequest resendIntervalDays(Integer resendIntervalDays) {
+ this.resendIntervalDays = resendIntervalDays;
+ return this;
+ }
+
+ /**
+ * Days between reminder emails (7-365, required if resendRequests is true).
+ * @return resendIntervalDays
+ */
+ @javax.annotation.Nullable
+ public Integer getResendIntervalDays() {
+ return resendIntervalDays;
+ }
+
+ public void setResendIntervalDays(Integer resendIntervalDays) {
+ this.resendIntervalDays = resendIntervalDays;
+ }
+
+
+ public CompanyRequest maxReminderAttempts(Integer maxReminderAttempts) {
+ this.maxReminderAttempts = maxReminderAttempts;
+ return this;
+ }
+
+ /**
+ * Maximum number of reminder attempts (1-52, required if resendRequests is true).
+ * @return maxReminderAttempts
+ */
+ @javax.annotation.Nullable
+ public Integer getMaxReminderAttempts() {
+ return maxReminderAttempts;
+ }
+
+ public void setMaxReminderAttempts(Integer maxReminderAttempts) {
+ this.maxReminderAttempts = maxReminderAttempts;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CompanyRequest companyRequest = (CompanyRequest) o;
+ return Objects.equals(this.name, companyRequest.name) &&
+ Objects.equals(this.dbaName, companyRequest.dbaName) &&
+ Objects.equals(this.email, companyRequest.email) &&
+ Objects.equals(this.address, companyRequest.address) &&
+ Objects.equals(this.city, companyRequest.city) &&
+ Objects.equals(this.state, companyRequest.state) &&
+ Objects.equals(this.zip, companyRequest.zip) &&
+ Objects.equals(this.telephone, companyRequest.telephone) &&
+ Objects.equals(this.tin, companyRequest.tin) &&
+ Objects.equals(this.referenceId, companyRequest.referenceId) &&
+ Objects.equals(this.doTinMatch, companyRequest.doTinMatch) &&
+ Objects.equals(this.groupName, companyRequest.groupName) &&
+ Objects.equals(this.foreignProvince, companyRequest.foreignProvince) &&
+ Objects.equals(this.countryCode, companyRequest.countryCode) &&
+ Objects.equals(this.resendRequests, companyRequest.resendRequests) &&
+ Objects.equals(this.resendIntervalDays, companyRequest.resendIntervalDays) &&
+ Objects.equals(this.maxReminderAttempts, companyRequest.maxReminderAttempts);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CompanyRequest {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" zip: ").append(toIndentedString(zip)).append("\n");
+ sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n");
+ sb.append(" tin: ").append(toIndentedString(tin)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n");
+ sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
+ sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n");
+ sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
+ sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n");
+ sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n");
+ sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("name");
+ openapiFields.add("dbaName");
+ openapiFields.add("email");
+ openapiFields.add("address");
+ openapiFields.add("city");
+ openapiFields.add("state");
+ openapiFields.add("zip");
+ openapiFields.add("telephone");
+ openapiFields.add("tin");
+ openapiFields.add("referenceId");
+ openapiFields.add("doTinMatch");
+ openapiFields.add("groupName");
+ openapiFields.add("foreignProvince");
+ openapiFields.add("countryCode");
+ openapiFields.add("resendRequests");
+ openapiFields.add("resendIntervalDays");
+ openapiFields.add("maxReminderAttempts");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("email");
+ openapiRequiredFields.add("address");
+ openapiRequiredFields.add("city");
+ openapiRequiredFields.add("zip");
+ openapiRequiredFields.add("telephone");
+ openapiRequiredFields.add("tin");
+ openapiRequiredFields.add("countryCode");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CompanyRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CompanyRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CompanyRequest is not found in the empty JSON string", CompanyRequest.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!CompanyRequest.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CompanyRequest.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString()));
+ }
+ if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString()));
+ }
+ if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CompanyRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CompanyRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CompanyRequest.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CompanyRequest value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public CompanyRequest read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of CompanyRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CompanyRequest
+ * @throws IOException if the JSON string is invalid with respect to CompanyRequest
+ */
+ public static CompanyRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CompanyRequest.class);
+ }
+
+ /**
+ * Convert an instance of CompanyRequest to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java
index 70e4f1d..a7ab2b3 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java
@@ -69,12 +69,10 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1042S {
/**
- * Gets or Sets tinType
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -723,7 +721,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private Double taxPaidAgent;
/**
- * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
+ * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
*/
@JsonAdapter(Chap3StatusCodeEnum.Adapter.class)
public enum Chap3StatusCodeEnum {
@@ -851,7 +849,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private Chap3StatusCodeEnum chap3StatusCode;
/**
- * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
+ * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
*/
@JsonAdapter(Chap4StatusCodeEnum.Adapter.class)
public enum Chap4StatusCodeEnum {
@@ -1011,27 +1009,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private IntermediaryOrFlowThrough intermediaryOrFlowThrough;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -1259,7 +1257,7 @@ public Form1042S(
}
/**
- * Get tinType
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1636,7 +1634,7 @@ public Form1042S chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) {
}
/**
- * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
+ * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
* @return chap3StatusCode
*/
@javax.annotation.Nullable
@@ -1655,7 +1653,7 @@ public Form1042S chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) {
}
/**
- * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
+ * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
* @return chap4StatusCode
*/
@javax.annotation.Nullable
@@ -1712,7 +1710,7 @@ public Form1042S type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -1761,7 +1759,7 @@ public Form1042S issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -1799,7 +1797,7 @@ public Form1042S taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -2084,7 +2082,7 @@ public Form1042S federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -2122,7 +2120,7 @@ public Form1042S stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -2141,7 +2139,7 @@ public Form1042S recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -2250,7 +2248,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -2261,7 +2259,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -2272,7 +2270,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -2283,7 +2281,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -2294,7 +2292,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -2305,7 +2303,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java
index f144f02..947c503 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java
@@ -88,7 +88,7 @@ public class Form1095B {
private LocalDate employeeDateOfBirth;
/**
- * Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later)
+ * Origin of health coverage code. Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later)
*/
@JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class)
public enum OriginOfHealthCoverageCodeEnum {
@@ -158,27 +158,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private List coveredIndividuals;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -260,12 +260,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -566,7 +564,7 @@ public Form1095B originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum origi
}
/**
- * Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later)
+ * Origin of health coverage code. Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later)
* @return originOfHealthCoverageCode
*/
@javax.annotation.Nullable
@@ -612,7 +610,7 @@ public Form1095B type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -661,7 +659,7 @@ public Form1095B issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -699,7 +697,7 @@ public Form1095B taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -775,7 +773,7 @@ public Form1095B tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1003,7 +1001,7 @@ public Form1095B federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1041,7 +1039,7 @@ public Form1095B stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1060,7 +1058,7 @@ public Form1095B recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1169,7 +1167,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1180,7 +1178,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1191,7 +1189,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1202,7 +1200,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1213,7 +1211,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1224,7 +1222,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java
index 6066c24..e771325 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java
@@ -179,27 +179,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private List coveredIndividuals;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -281,12 +281,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -679,7 +677,7 @@ public Form1095C type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -728,7 +726,7 @@ public Form1095C issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -766,7 +764,7 @@ public Form1095C taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -842,7 +840,7 @@ public Form1095C tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1070,7 +1068,7 @@ public Form1095C federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1108,7 +1106,7 @@ public Form1095C stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1127,7 +1125,7 @@ public Form1095C recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1236,7 +1234,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1247,7 +1245,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1258,7 +1256,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1269,7 +1267,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1280,7 +1278,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1291,7 +1289,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java
index fc7ba62..2f161c2 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java
@@ -67,27 +67,27 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099Base {
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -169,12 +169,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -380,7 +378,7 @@ public Form1099Base type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -429,7 +427,7 @@ public Form1099Base issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -467,7 +465,7 @@ public Form1099Base taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -543,7 +541,7 @@ public Form1099Base tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -771,7 +769,7 @@ public Form1099Base federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -809,7 +807,7 @@ public Form1099Base stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -828,7 +826,7 @@ public Form1099Base recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -937,7 +935,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -948,7 +946,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -959,7 +957,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -970,7 +968,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -981,7 +979,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -992,7 +990,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java
index 76ad052..0b98da5 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java
@@ -62,7 +62,7 @@
import Avalara.SDK.JSON;
/**
- * Form 1099-DIV: Dividends and Distributions
+ * Form 1099-DIV: Dividends and Distributions *At least one of the following dividend or distribution amounts must be provided:* Total ordinary dividends, Total capital gain distributions, Nondividend distributions, Cash liquidation distributions, Noncash liquidation distributions, or Exempt-interest dividends.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099Div {
@@ -143,27 +143,27 @@ public class Form1099Div {
private Boolean fatcaFilingRequirement;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -245,12 +245,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -798,7 +796,7 @@ public Form1099Div fatcaFilingRequirement(Boolean fatcaFilingRequirement) {
}
/**
- * FATCA filing requirement
+ * FATCA filing requirement.
* @return fatcaFilingRequirement
*/
@javax.annotation.Nullable
@@ -817,7 +815,7 @@ public Form1099Div type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -866,7 +864,7 @@ public Form1099Div issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -904,7 +902,7 @@ public Form1099Div taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -980,7 +978,7 @@ public Form1099Div tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1208,7 +1206,7 @@ public Form1099Div federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1246,7 +1244,7 @@ public Form1099Div stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1265,7 +1263,7 @@ public Form1099Div recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1374,7 +1372,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1385,7 +1383,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1396,7 +1394,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1407,7 +1405,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1418,7 +1416,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1429,7 +1427,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java
index 70140b8..6967443 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java
@@ -62,7 +62,7 @@
import Avalara.SDK.JSON;
/**
- * Form1099Int
+ * Form 1099-INT: Interest Imcome *At least one of the following amounts must be provided:* Interest Income, Interest on U.S. Savings Bonds and Treasury obligations, or Tax-Exempt Interest.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099Int {
@@ -127,27 +127,27 @@ public class Form1099Int {
private Boolean fatcaFilingRequirement;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -229,12 +229,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -687,7 +685,7 @@ public Form1099Int taxExemptBondCusipNumber(String taxExemptBondCusipNumber) {
}
/**
- * Tax exempt bond CUSIP no.
+ * Tax exempt bond CUSIP no. Enter VARIOUS if the tax-exempt interest is reported in the aggregate for multiple bonds or accounts.
* @return taxExemptBondCusipNumber
*/
@javax.annotation.Nullable
@@ -706,7 +704,7 @@ public Form1099Int fatcaFilingRequirement(Boolean fatcaFilingRequirement) {
}
/**
- * FATCA filing requirement
+ * FATCA filing requirement.
* @return fatcaFilingRequirement
*/
@javax.annotation.Nullable
@@ -725,7 +723,7 @@ public Form1099Int type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -774,7 +772,7 @@ public Form1099Int issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -812,7 +810,7 @@ public Form1099Int taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -888,7 +886,7 @@ public Form1099Int tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1116,7 +1114,7 @@ public Form1099Int federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1154,7 +1152,7 @@ public Form1099Int stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1173,7 +1171,7 @@ public Form1099Int recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1282,7 +1280,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1293,7 +1291,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1304,7 +1302,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1315,7 +1313,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1326,7 +1324,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1337,7 +1335,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java
index 04b891b..8c6138e 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java
@@ -67,15 +67,13 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099K {
/**
- * Filer type (PSE or EPF)
+ * Filer type for tax reporting purposes. Available values: - PSE: Payment Settlement Entity - EPF: Electronic Payment Facilitator or other third party
*/
@JsonAdapter(FilerTypeEnum.Adapter.class)
public enum FilerTypeEnum {
PSE("PSE"),
- EPF("EPF"),
-
- OTHER("Other");
+ EPF("EPF");
private String value;
@@ -125,11 +123,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private FilerTypeEnum filerType;
/**
- * Payment type (payment card or third party network)
+ * Payment type for transaction classification. Available values: - PaymentCard: Payment card transactions - ThirdPartyNetwork: Third party network transactions
*/
@JsonAdapter(PaymentTypeEnum.Adapter.class)
public enum PaymentTypeEnum {
- MERCHANT_PAYMENT_CARD("MerchantPaymentCard"),
+ PAYMENT_CARD("PaymentCard"),
THIRD_PARTY_NETWORK("ThirdPartyNetwork");
@@ -253,27 +251,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private Double december;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -355,12 +353,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -566,7 +562,7 @@ public Form1099K filerType(FilerTypeEnum filerType) {
}
/**
- * Filer type (PSE or EPF)
+ * Filer type for tax reporting purposes. Available values: - PSE: Payment Settlement Entity - EPF: Electronic Payment Facilitator or other third party
* @return filerType
*/
@javax.annotation.Nullable
@@ -585,7 +581,7 @@ public Form1099K paymentType(PaymentTypeEnum paymentType) {
}
/**
- * Payment type (payment card or third party network)
+ * Payment type for transaction classification. Available values: - PaymentCard: Payment card transactions - ThirdPartyNetwork: Third party network transactions
* @return paymentType
*/
@javax.annotation.Nullable
@@ -604,7 +600,7 @@ public Form1099K paymentSettlementEntityNamePhoneNumber(String paymentSettlement
}
/**
- * Payment settlement entity name and phone number
+ * Payment settlement entity name and phone number, if different from Filer's
* @return paymentSettlementEntityNamePhoneNumber
*/
@javax.annotation.Nullable
@@ -623,7 +619,7 @@ public Form1099K grossAmountPaymentCard(Double grossAmountPaymentCard) {
}
/**
- * Gross amount of payment card/third party network transactions
+ * Gross amount of payment card/third party network transactions. This value must equal the total of all monthly payment amounts (January through December).
* @return grossAmountPaymentCard
*/
@javax.annotation.Nullable
@@ -661,7 +657,7 @@ public Form1099K merchantCategoryCode(String merchantCategoryCode) {
}
/**
- * Merchant category code
+ * Merchant category code (4 numbers)
* @return merchantCategoryCode
*/
@javax.annotation.Nullable
@@ -946,7 +942,7 @@ public Form1099K type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -995,7 +991,7 @@ public Form1099K issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -1033,7 +1029,7 @@ public Form1099K taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -1109,7 +1105,7 @@ public Form1099K tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1337,7 +1333,7 @@ public Form1099K federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1375,7 +1371,7 @@ public Form1099K stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1394,7 +1390,7 @@ public Form1099K recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1503,7 +1499,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1514,7 +1510,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1525,7 +1521,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1536,7 +1532,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1547,7 +1543,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1558,7 +1554,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
@@ -1815,6 +1811,10 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("filerType");
+ openapiRequiredFields.add("paymentType");
+ openapiRequiredFields.add("grossAmountPaymentCard");
+ openapiRequiredFields.add("paymentTransactionNumber");
openapiRequiredFields.add("type");
openapiRequiredFields.add("recipientName");
openapiRequiredFields.add("address");
@@ -1853,17 +1853,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString()));
}
- // validate the optional field `filerType`
- if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) {
- FilerTypeEnum.validateJsonElement(jsonObj.get("filerType"));
- }
+ // validate the required field `filerType`
+ FilerTypeEnum.validateJsonElement(jsonObj.get("filerType"));
if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString()));
}
- // validate the optional field `paymentType`
- if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) {
- PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType"));
- }
+ // validate the required field `paymentType`
+ PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType"));
if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString()));
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java
index 3d4fe55..19cd3b5 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java
@@ -65,23 +65,23 @@ public class Form1099ListRequest {
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java
index 7f0d42a..fc54ee9 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java
@@ -62,7 +62,7 @@
import Avalara.SDK.JSON;
/**
- * Form 1099-MISC: Miscellaneous Income
+ * Form 1099-MISC: Miscellaneous Income *At least one of the following amounts must be provided:* Rents, Royalties, Other income, Fishing boat proceeds, Medical and health care payments, Substitute payments in lieu of dividends or interest, Crop insurance proceeds, Gross proceeds paid to an attorney, Fish purchased for resale, Section 409A deferrals, Excess golden parachute payments, Nonqualified deferred compensation, Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099Misc {
@@ -127,27 +127,27 @@ public class Form1099Misc {
private Boolean fatcaFilingRequirement;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -229,12 +229,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -706,7 +704,7 @@ public Form1099Misc fatcaFilingRequirement(Boolean fatcaFilingRequirement) {
}
/**
- * FATCA filing requirement
+ * FATCA filing requirement.
* @return fatcaFilingRequirement
*/
@javax.annotation.Nullable
@@ -725,7 +723,7 @@ public Form1099Misc type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -774,7 +772,7 @@ public Form1099Misc issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -812,7 +810,7 @@ public Form1099Misc taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -888,7 +886,7 @@ public Form1099Misc tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1116,7 +1114,7 @@ public Form1099Misc federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1154,7 +1152,7 @@ public Form1099Misc stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1173,7 +1171,7 @@ public Form1099Misc recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1282,7 +1280,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1293,7 +1291,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1304,7 +1302,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1315,7 +1313,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1326,7 +1324,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1337,7 +1335,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java
index 03f1c2e..76112a4 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java
@@ -62,7 +62,7 @@
import Avalara.SDK.JSON;
/**
- * Form1099Nec
+ * Form 1099-NEC: Nonemployee Compensation
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099Nec {
@@ -79,27 +79,27 @@ public class Form1099Nec {
private Double federalIncomeTaxWithheld;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -181,12 +181,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -392,7 +390,7 @@ public Form1099Nec nonemployeeCompensation(Double nonemployeeCompensation) {
}
/**
- * Nonemployee compensation
+ * Nonemployee compensation. Required if DirectSalesIndicator is false.
* @return nonemployeeCompensation
*/
@javax.annotation.Nullable
@@ -411,7 +409,7 @@ public Form1099Nec directSalesIndicator(Boolean directSalesIndicator) {
}
/**
- * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale
+ * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale. Should be true if Nonemployee compensation is not provided.
* @return directSalesIndicator
*/
@javax.annotation.Nullable
@@ -430,7 +428,7 @@ public Form1099Nec federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) {
}
/**
- * Federal income tax withheld
+ * Federal income tax withheld.
* @return federalIncomeTaxWithheld
*/
@javax.annotation.Nullable
@@ -449,7 +447,7 @@ public Form1099Nec type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -498,7 +496,7 @@ public Form1099Nec issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -536,7 +534,7 @@ public Form1099Nec taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -612,7 +610,7 @@ public Form1099Nec tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -840,7 +838,7 @@ public Form1099Nec federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -878,7 +876,7 @@ public Form1099Nec stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -897,7 +895,7 @@ public Form1099Nec recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1006,7 +1004,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1017,7 +1015,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1028,7 +1026,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1039,7 +1037,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1050,7 +1048,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1061,7 +1059,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java
index 5c01c04..a7912c5 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java
@@ -62,7 +62,7 @@
import Avalara.SDK.JSON;
/**
- * Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc.
+ * Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc. *At least one of the following amounts must be provided:* Gross distribution, Taxable amount, Capital gain, Employee contributions/Designated Roth contributions or insurance premiums, Net unrealized appreciation in employer's securities, Other amount, Total employee contributions, Traditional IRA/SEP/SIMPLE or Roth conversion amount, or Amount allocable to IRR within 5 years
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1099R {
@@ -98,13 +98,225 @@ public class Form1099R {
@SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES)
private Double netUnrealizedAppreciationInEmployerSecurities;
+ /**
+ * Distribution code. Available values: - 1: Early distribution, no known exception (in most cases, under age 59½) - 2: Early distribution, exception applies (under age 59½) - 3: Disability - 4: Death - 5: Prohibited transaction - 6: Section 1035 exchange (a tax-free exchange of life insurance, annuity, qualified long-term care insurance, or endowment contracts) - 7: Normal distribution - 8: Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in payment year - 9: Cost of current life insurance protection (premiums paid by a trustee or custodian for current insurance protection) - A: May be eligible for 10-year tax option - B: Designated Roth account distribution - C: Reportable Death Benefits Under Section 6050Y(c) - D: Annuity payments from nonqualified annuity payments and distributions from life insurance contracts that may be subject to tax under section 1411 - E: Distribution under Employee Plans Compliance Resolution System (EPCRS) - F: Charitable gift annuity - G: Direct rollover and rollover contribution - H: Direct rollover of distribution from a designated Roth account to a Roth IRA - J: Early distribution from a Roth IRA (This code may be used with a Code 8 or P) - K: Distribution of IRA Assets Not Having A Readily Available FMV - L: Loans treated as deemed distributions under section 72(p) - M: Qualified Plan Loan Offsets - N: Recharacterized IRA contribution made for year following payment year - P: Excess contributions plus earnings/excess deferrals taxable for year prior to payment year - Q: Qualified distribution from a Roth IRA (Distribution from a Roth IRA when the 5-year holding period has been met, and the recipient has reached 59½, has died, or is disabled) - R: Recharacterized IRA contribution made for year prior to payment year - S: Early distribution from a SIMPLE IRA in first 2 years no known exceptions - T: Roth IRA distribution exception applies because participant has reached 59½, died or is disabled, but it is unknown if the 5-year period has been met - U: Distribution from ESOP under Section 404(k) - W: Charges or payments for purchasing qualified long-term care insurance contracts under combined arrangements
+ */
+ @JsonAdapter(DistributionCodeEnum.Adapter.class)
+ public enum DistributionCodeEnum {
+ _1("1"),
+
+ _2("2"),
+
+ _3("3"),
+
+ _4("4"),
+
+ _5("5"),
+
+ _6("6"),
+
+ _7("7"),
+
+ _8("8"),
+
+ _9("9"),
+
+ A("A"),
+
+ B("B"),
+
+ C("C"),
+
+ D("D"),
+
+ E("E"),
+
+ F("F"),
+
+ G("G"),
+
+ H("H"),
+
+ J("J"),
+
+ K("K"),
+
+ L("L"),
+
+ M("M"),
+
+ N("N"),
+
+ P("P"),
+
+ Q("Q"),
+
+ R("R"),
+
+ S("S"),
+
+ T("T"),
+
+ U("U"),
+
+ W("W");
+
+ private String value;
+
+ DistributionCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static DistributionCodeEnum fromValue(String value) {
+ for (DistributionCodeEnum b : DistributionCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final DistributionCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public DistributionCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return DistributionCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ DistributionCodeEnum.fromValue(value);
+ }
+ }
+
public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode";
@SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE)
- private String distributionCode;
+ private DistributionCodeEnum distributionCode;
+
+ /**
+ * Second distribution code. Must be a valid combination with the first distribution code. See DistributionCode property documentation for code descriptions. Valid combinations based on first distribution code: - 1: _, 8, B, D, K, L, M, P - 2: _, 8, B, D, K, L, M, P - 3: _, D - 4: _, 8, A, B, D, G, H, K, L, M, P - 5: _ - 6: _, W - 7: _, A, B, D, K, L, M - 8: _, 1, 2, 4, B, J, K - 9: _ - A: 4, 7 - B: _, 1, 2, 4, 7, 8, G, L, M, P, U - C: _, D - D: 1, 2, 3, 4, 7, C - E: _ - F: _ - G: _, 4, B, K - H: _, 4 - J: _, 8, P - K: 1, 2, 4, 7, 8, G - L: _, 1, 2, 4, 7, B - M: _, 1, 2, 4, 7, B - N: _ - P: _, 1, 2, 4, B, J - Q: _ - R: _ - S: _ - T: _ - U: _, B - W: _, 6 (_ indicates no second distribution code) (format: firstDistributionCode: availableSecondDistributionCodes)
+ */
+ @JsonAdapter(SecondDistributionCodeEnum.Adapter.class)
+ public enum SecondDistributionCodeEnum {
+ _1("1"),
+
+ _2("2"),
+
+ _3("3"),
+
+ _4("4"),
+
+ _5("5"),
+
+ _6("6"),
+
+ _7("7"),
+
+ _8("8"),
+
+ _9("9"),
+
+ A("A"),
+
+ B("B"),
+
+ C("C"),
+
+ D("D"),
+
+ E("E"),
+
+ F("F"),
+
+ G("G"),
+
+ H("H"),
+
+ J("J"),
+
+ K("K"),
+
+ L("L"),
+
+ M("M"),
+
+ N("N"),
+
+ P("P"),
+
+ Q("Q"),
+
+ R("R"),
+
+ S("S"),
+
+ T("T"),
+
+ U("U"),
+
+ W("W");
+
+ private String value;
+
+ SecondDistributionCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static SecondDistributionCodeEnum fromValue(String value) {
+ for (SecondDistributionCodeEnum b : SecondDistributionCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final SecondDistributionCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public SecondDistributionCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return SecondDistributionCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ SecondDistributionCodeEnum.fromValue(value);
+ }
+ }
public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode";
@SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE)
- private String secondDistributionCode;
+ private SecondDistributionCodeEnum secondDistributionCode;
public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple";
@SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE)
@@ -147,27 +359,27 @@ public class Form1099R {
private Boolean fatcaFilingRequirement;
/**
- * Form type
+ * Form type.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
- _1099_NEC("1099-NEC"),
+ FORM1099_NEC("Form1099Nec"),
- _1099_MISC("1099-MISC"),
+ FORM1099_MISC("Form1099Misc"),
- _1099_DIV("1099-DIV"),
+ FORM1099_DIV("Form1099Div"),
- _1099_R("1099-R"),
+ FORM1099_R("Form1099R"),
- _1099_K("1099-K"),
+ FORM1099_K("Form1099K"),
- _1095_B("1095-B"),
+ FORM1095_B("Form1095B"),
- _1042_S("1042-S"),
+ FORM1042_S("Form1042S"),
- _1095_C("1095-C"),
+ FORM1095_C("Form1095C"),
- _1099_INT("1099-INT");
+ FORM1099_INT("Form1099Int");
private String value;
@@ -249,12 +461,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
private String recipientName;
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
*/
@JsonAdapter(TinTypeEnum.Adapter.class)
public enum TinTypeEnum {
- EMPTY("Empty"),
-
EIN("EIN"),
SSN("SSN"),
@@ -606,40 +816,40 @@ public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealize
}
- public Form1099R distributionCode(String distributionCode) {
+ public Form1099R distributionCode(DistributionCodeEnum distributionCode) {
this.distributionCode = distributionCode;
return this;
}
/**
- * Distribution code
+ * Distribution code. Available values: - 1: Early distribution, no known exception (in most cases, under age 59½) - 2: Early distribution, exception applies (under age 59½) - 3: Disability - 4: Death - 5: Prohibited transaction - 6: Section 1035 exchange (a tax-free exchange of life insurance, annuity, qualified long-term care insurance, or endowment contracts) - 7: Normal distribution - 8: Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in payment year - 9: Cost of current life insurance protection (premiums paid by a trustee or custodian for current insurance protection) - A: May be eligible for 10-year tax option - B: Designated Roth account distribution - C: Reportable Death Benefits Under Section 6050Y(c) - D: Annuity payments from nonqualified annuity payments and distributions from life insurance contracts that may be subject to tax under section 1411 - E: Distribution under Employee Plans Compliance Resolution System (EPCRS) - F: Charitable gift annuity - G: Direct rollover and rollover contribution - H: Direct rollover of distribution from a designated Roth account to a Roth IRA - J: Early distribution from a Roth IRA (This code may be used with a Code 8 or P) - K: Distribution of IRA Assets Not Having A Readily Available FMV - L: Loans treated as deemed distributions under section 72(p) - M: Qualified Plan Loan Offsets - N: Recharacterized IRA contribution made for year following payment year - P: Excess contributions plus earnings/excess deferrals taxable for year prior to payment year - Q: Qualified distribution from a Roth IRA (Distribution from a Roth IRA when the 5-year holding period has been met, and the recipient has reached 59½, has died, or is disabled) - R: Recharacterized IRA contribution made for year prior to payment year - S: Early distribution from a SIMPLE IRA in first 2 years no known exceptions - T: Roth IRA distribution exception applies because participant has reached 59½, died or is disabled, but it is unknown if the 5-year period has been met - U: Distribution from ESOP under Section 404(k) - W: Charges or payments for purchasing qualified long-term care insurance contracts under combined arrangements
* @return distributionCode
*/
@javax.annotation.Nullable
- public String getDistributionCode() {
+ public DistributionCodeEnum getDistributionCode() {
return distributionCode;
}
- public void setDistributionCode(String distributionCode) {
+ public void setDistributionCode(DistributionCodeEnum distributionCode) {
this.distributionCode = distributionCode;
}
- public Form1099R secondDistributionCode(String secondDistributionCode) {
+ public Form1099R secondDistributionCode(SecondDistributionCodeEnum secondDistributionCode) {
this.secondDistributionCode = secondDistributionCode;
return this;
}
/**
- * Second distribution code
+ * Second distribution code. Must be a valid combination with the first distribution code. See DistributionCode property documentation for code descriptions. Valid combinations based on first distribution code: - 1: _, 8, B, D, K, L, M, P - 2: _, 8, B, D, K, L, M, P - 3: _, D - 4: _, 8, A, B, D, G, H, K, L, M, P - 5: _ - 6: _, W - 7: _, A, B, D, K, L, M - 8: _, 1, 2, 4, B, J, K - 9: _ - A: 4, 7 - B: _, 1, 2, 4, 7, 8, G, L, M, P, U - C: _, D - D: 1, 2, 3, 4, 7, C - E: _ - F: _ - G: _, 4, B, K - H: _, 4 - J: _, 8, P - K: 1, 2, 4, 7, 8, G - L: _, 1, 2, 4, 7, B - M: _, 1, 2, 4, 7, B - N: _ - P: _, 1, 2, 4, B, J - Q: _ - R: _ - S: _ - T: _ - U: _, B - W: _, 6 (_ indicates no second distribution code) (format: firstDistributionCode: availableSecondDistributionCodes)
* @return secondDistributionCode
*/
@javax.annotation.Nullable
- public String getSecondDistributionCode() {
+ public SecondDistributionCodeEnum getSecondDistributionCode() {
return secondDistributionCode;
}
- public void setSecondDistributionCode(String secondDistributionCode) {
+ public void setSecondDistributionCode(SecondDistributionCodeEnum secondDistributionCode) {
this.secondDistributionCode = secondDistributionCode;
}
@@ -821,7 +1031,7 @@ public Form1099R fatcaFilingRequirement(Boolean fatcaFilingRequirement) {
}
/**
- * FATCA filing requirement
+ * FATCA filing requirement.
* @return fatcaFilingRequirement
*/
@javax.annotation.Nullable
@@ -840,7 +1050,7 @@ public Form1099R type(TypeEnum type) {
}
/**
- * Form type
+ * Form type.
* @return type
*/
@javax.annotation.Nonnull
@@ -889,7 +1099,7 @@ public Form1099R issuerReferenceId(String issuerReferenceId) {
}
/**
- * Issuer Reference ID - only required when creating forms
+ * Issuer Reference ID - only required when creating forms via $bulk-upsert
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -927,7 +1137,7 @@ public Form1099R taxYear(Integer taxYear) {
}
/**
- * Tax Year - only required when creating forms
+ * Tax Year - only required when creating forms via $bulk-upsert
* @return taxYear
*/
@javax.annotation.Nullable
@@ -1003,7 +1213,7 @@ public Form1099R tinType(TinTypeEnum tinType) {
}
/**
- * Type of TIN (Tax ID Number)
+ * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1231,7 +1441,7 @@ public Form1099R federalEfileDate(LocalDate federalEfileDate) {
}
/**
- * Date when federal e-filing should be scheduled for this form
+ * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return federalEfileDate
*/
@javax.annotation.Nullable
@@ -1269,7 +1479,7 @@ public Form1099R stateEfileDate(LocalDate stateEfileDate) {
}
/**
- * Date when state e-filing should be scheduled for this form
+ * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return stateEfileDate
*/
@javax.annotation.Nullable
@@ -1288,7 +1498,7 @@ public Form1099R recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
}
/**
- * Date when recipient e-delivery should be scheduled for this form
+ * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
* @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
@@ -1397,7 +1607,7 @@ public void setSecondTinNotice(Boolean secondTinNotice) {
/**
- * Federal e-file status
+ * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
* @return federalEfileStatus
*/
@javax.annotation.Nullable
@@ -1408,7 +1618,7 @@ public Form1099StatusDetail getFederalEfileStatus() {
/**
- * State e-file status
+ * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
* @return stateEfileStatus
*/
@javax.annotation.Nullable
@@ -1419,7 +1629,7 @@ public List getStateEfileStatus() {
/**
- * Postal mail to recipient status
+ * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
* @return postalMailStatus
*/
@javax.annotation.Nullable
@@ -1430,7 +1640,7 @@ public Form1099StatusDetail getPostalMailStatus() {
/**
- * TIN Match status
+ * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
* @return tinMatchStatus
*/
@javax.annotation.Nullable
@@ -1441,7 +1651,7 @@ public Form1099StatusDetail getTinMatchStatus() {
/**
- * Address verification status
+ * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
* @return addressVerificationStatus
*/
@javax.annotation.Nullable
@@ -1452,7 +1662,7 @@ public Form1099StatusDetail getAddressVerificationStatus() {
/**
- * EDelivery status
+ * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
* @return eDeliveryStatus
*/
@javax.annotation.Nullable
@@ -1709,6 +1919,7 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("distributionCode");
openapiRequiredFields.add("type");
openapiRequiredFields.add("recipientName");
openapiRequiredFields.add("address");
@@ -1747,9 +1958,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString()));
}
+ // validate the required field `distributionCode`
+ DistributionCodeEnum.validateJsonElement(jsonObj.get("distributionCode"));
if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString()));
}
+ // validate the optional field `secondDistributionCode`
+ if (jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) {
+ SecondDistributionCodeEnum.validateJsonElement(jsonObj.get("secondDistributionCode"));
+ }
if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString()));
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java
index 4c92997..245829e 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java
@@ -62,13 +62,285 @@ public class IntermediaryOrFlowThrough {
@SerializedName(SERIALIZED_NAME_EIN)
private String ein;
+ /**
+ * Chapter 3 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
+ */
+ @JsonAdapter(Chap3StatusCodeEnum.Adapter.class)
+ public enum Chap3StatusCodeEnum {
+ _01("01"),
+
+ _02("02"),
+
+ _34("34"),
+
+ _03("03"),
+
+ _04("04"),
+
+ _05("05"),
+
+ _06("06"),
+
+ _07("07"),
+
+ _08("08"),
+
+ _09("09"),
+
+ _10("10"),
+
+ _11("11"),
+
+ _12("12"),
+
+ _13("13"),
+
+ _14("14"),
+
+ _15("15"),
+
+ _16("16"),
+
+ _17("17"),
+
+ _18("18"),
+
+ _19("19"),
+
+ _20("20"),
+
+ _21("21"),
+
+ _22("22"),
+
+ _23("23"),
+
+ _24("24"),
+
+ _25("25"),
+
+ _26("26"),
+
+ _27("27"),
+
+ _28("28"),
+
+ _29("29"),
+
+ _30("30"),
+
+ _31("31"),
+
+ _32("32"),
+
+ _35("35"),
+
+ _36("36"),
+
+ _37("37"),
+
+ _38("38"),
+
+ _39("39");
+
+ private String value;
+
+ Chap3StatusCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static Chap3StatusCodeEnum fromValue(String value) {
+ for (Chap3StatusCodeEnum b : Chap3StatusCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final Chap3StatusCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public Chap3StatusCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return Chap3StatusCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ Chap3StatusCodeEnum.fromValue(value);
+ }
+ }
+
public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode";
@SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE)
- private String chap3StatusCode;
+ private Chap3StatusCodeEnum chap3StatusCode;
+
+ /**
+ * Chapter 4 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
+ */
+ @JsonAdapter(Chap4StatusCodeEnum.Adapter.class)
+ public enum Chap4StatusCodeEnum {
+ _01("01"),
+
+ _02("02"),
+
+ _03("03"),
+
+ _04("04"),
+
+ _05("05"),
+
+ _06("06"),
+
+ _07("07"),
+
+ _08("08"),
+
+ _09("09"),
+
+ _10("10"),
+
+ _11("11"),
+
+ _12("12"),
+
+ _13("13"),
+
+ _14("14"),
+
+ _15("15"),
+
+ _16("16"),
+
+ _17("17"),
+
+ _18("18"),
+
+ _19("19"),
+
+ _20("20"),
+
+ _21("21"),
+
+ _22("22"),
+
+ _23("23"),
+
+ _24("24"),
+
+ _25("25"),
+
+ _26("26"),
+
+ _27("27"),
+
+ _28("28"),
+
+ _29("29"),
+
+ _30("30"),
+
+ _31("31"),
+
+ _32("32"),
+
+ _33("33"),
+
+ _34("34"),
+
+ _35("35"),
+
+ _36("36"),
+
+ _37("37"),
+
+ _38("38"),
+
+ _39("39"),
+
+ _40("40"),
+
+ _41("41"),
+
+ _42("42"),
+
+ _43("43"),
+
+ _44("44"),
+
+ _45("45"),
+
+ _46("46"),
+
+ _47("47"),
+
+ _48("48"),
+
+ _49("49"),
+
+ _50("50");
+
+ private String value;
+
+ Chap4StatusCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static Chap4StatusCodeEnum fromValue(String value) {
+ for (Chap4StatusCodeEnum b : Chap4StatusCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final Chap4StatusCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public Chap4StatusCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return Chap4StatusCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ Chap4StatusCodeEnum.fromValue(value);
+ }
+ }
public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode";
@SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE)
- private String chap4StatusCode;
+ private Chap4StatusCodeEnum chap4StatusCode;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
@@ -124,40 +396,40 @@ public void setEin(String ein) {
}
- public IntermediaryOrFlowThrough chap3StatusCode(String chap3StatusCode) {
+ public IntermediaryOrFlowThrough chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) {
this.chap3StatusCode = chap3StatusCode;
return this;
}
/**
- * Chapter 3 status code for the intermediary or flow-through entity
+ * Chapter 3 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
* @return chap3StatusCode
*/
@javax.annotation.Nullable
- public String getChap3StatusCode() {
+ public Chap3StatusCodeEnum getChap3StatusCode() {
return chap3StatusCode;
}
- public void setChap3StatusCode(String chap3StatusCode) {
+ public void setChap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) {
this.chap3StatusCode = chap3StatusCode;
}
- public IntermediaryOrFlowThrough chap4StatusCode(String chap4StatusCode) {
+ public IntermediaryOrFlowThrough chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) {
this.chap4StatusCode = chap4StatusCode;
return this;
}
/**
- * Chapter 4 status code for the intermediary or flow-through entity
+ * Chapter 4 status code for the intermediary or flow-through entity. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
* @return chap4StatusCode
*/
@javax.annotation.Nullable
- public String getChap4StatusCode() {
+ public Chap4StatusCodeEnum getChap4StatusCode() {
return chap4StatusCode;
}
- public void setChap4StatusCode(String chap4StatusCode) {
+ public void setChap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) {
this.chap4StatusCode = chap4StatusCode;
}
@@ -433,9 +705,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString()));
}
+ // validate the optional field `chap3StatusCode`
+ if (jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) {
+ Chap3StatusCodeEnum.validateJsonElement(jsonObj.get("chap3StatusCode"));
+ }
if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString()));
}
+ // validate the optional field `chap4StatusCode`
+ if (jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) {
+ Chap4StatusCodeEnum.validateJsonElement(jsonObj.get("chap4StatusCode"));
+ }
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java
new file mode 100644
index 0000000..b9a70c3
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java
@@ -0,0 +1,640 @@
+/*
+ * AvaTax Software Development Kit for Java (JRE)
+ *
+ * (c) 2004-2025 Avalara, Inc.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * Avalara 1099 & W-9 API Definition
+ *
+ * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
+ *
+ * @author Sachin Baijal
+ * @author Jonathan Wenger
+ * @copyright 2004-2025 Avalara, Inc.
+ * @license https://www.apache.org/licenses/LICENSE-2.0
+ * @link https://github.com/avadev/Avalara-SDK-Java
+ */
+
+package Avalara.SDK.model.A1099.V2;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import Avalara.SDK.JSON;
+
+/**
+ * IssuerBase
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class IssuerBase {
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_DBA_NAME = "dbaName";
+ @SerializedName(SERIALIZED_NAME_DBA_NAME)
+ private String dbaName;
+
+ public static final String SERIALIZED_NAME_TIN = "tin";
+ @SerializedName(SERIALIZED_NAME_TIN)
+ private String tin;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_TELEPHONE = "telephone";
+ @SerializedName(SERIALIZED_NAME_TELEPHONE)
+ private String telephone;
+
+ public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear";
+ @SerializedName(SERIALIZED_NAME_TAX_YEAR)
+ private Integer taxYear;
+
+ public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode";
+ @SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
+ private String countryCode;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ADDRESS = "address";
+ @SerializedName(SERIALIZED_NAME_ADDRESS)
+ private String address;
+
+ public static final String SERIALIZED_NAME_CITY = "city";
+ @SerializedName(SERIALIZED_NAME_CITY)
+ private String city;
+
+ public static final String SERIALIZED_NAME_STATE = "state";
+ @SerializedName(SERIALIZED_NAME_STATE)
+ private String state;
+
+ public static final String SERIALIZED_NAME_ZIP = "zip";
+ @SerializedName(SERIALIZED_NAME_ZIP)
+ private String zip;
+
+ public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince";
+ @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE)
+ private String foreignProvince;
+
+ public static final String SERIALIZED_NAME_TRANSFER_AGENT_NAME = "transferAgentName";
+ @SerializedName(SERIALIZED_NAME_TRANSFER_AGENT_NAME)
+ private String transferAgentName;
+
+ public static final String SERIALIZED_NAME_LAST_FILING = "lastFiling";
+ @SerializedName(SERIALIZED_NAME_LAST_FILING)
+ private Boolean lastFiling;
+
+ public IssuerBase() {
+ }
+
+ public IssuerBase name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Legal name. Not the DBA name.
+ * @return name
+ */
+ @javax.annotation.Nullable
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public IssuerBase dbaName(String dbaName) {
+ this.dbaName = dbaName;
+ return this;
+ }
+
+ /**
+ * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.
+ * @return dbaName
+ */
+ @javax.annotation.Nullable
+ public String getDbaName() {
+ return dbaName;
+ }
+
+ public void setDbaName(String dbaName) {
+ this.dbaName = dbaName;
+ }
+
+
+ public IssuerBase tin(String tin) {
+ this.tin = tin;
+ return this;
+ }
+
+ /**
+ * Federal Tax Identification Number (TIN).
+ * @return tin
+ */
+ @javax.annotation.Nullable
+ public String getTin() {
+ return tin;
+ }
+
+ public void setTin(String tin) {
+ this.tin = tin;
+ }
+
+
+ public IssuerBase referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public IssuerBase telephone(String telephone) {
+ this.telephone = telephone;
+ return this;
+ }
+
+ /**
+ * Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.
+ * @return telephone
+ */
+ @javax.annotation.Nullable
+ public String getTelephone() {
+ return telephone;
+ }
+
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
+ }
+
+
+ public IssuerBase taxYear(Integer taxYear) {
+ this.taxYear = taxYear;
+ return this;
+ }
+
+ /**
+ * Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4.
+ * @return taxYear
+ */
+ @javax.annotation.Nullable
+ public Integer getTaxYear() {
+ return taxYear;
+ }
+
+ public void setTaxYear(Integer taxYear) {
+ this.taxYear = taxYear;
+ }
+
+
+ public IssuerBase countryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address.
+ * @return countryCode
+ */
+ @javax.annotation.Nullable
+ public String getCountryCode() {
+ return countryCode;
+ }
+
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ }
+
+
+ public IssuerBase email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Contact email address. For recipient inquiries.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public IssuerBase address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Address.
+ * @return address
+ */
+ @javax.annotation.Nullable
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+
+ public IssuerBase city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * City.
+ * @return city
+ */
+ @javax.annotation.Nullable
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+
+ public IssuerBase state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
+ * @return state
+ */
+ @javax.annotation.Nullable
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+
+ public IssuerBase zip(String zip) {
+ this.zip = zip;
+ return this;
+ }
+
+ /**
+ * ZIP/postal code.
+ * @return zip
+ */
+ @javax.annotation.Nullable
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+
+ public IssuerBase foreignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ return this;
+ }
+
+ /**
+ * Province or region for non-US/CA addresses.
+ * @return foreignProvince
+ */
+ @javax.annotation.Nullable
+ public String getForeignProvince() {
+ return foreignProvince;
+ }
+
+ public void setForeignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ }
+
+
+ public IssuerBase transferAgentName(String transferAgentName) {
+ this.transferAgentName = transferAgentName;
+ return this;
+ }
+
+ /**
+ * Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.
+ * @return transferAgentName
+ */
+ @javax.annotation.Nullable
+ public String getTransferAgentName() {
+ return transferAgentName;
+ }
+
+ public void setTransferAgentName(String transferAgentName) {
+ this.transferAgentName = transferAgentName;
+ }
+
+
+ public IssuerBase lastFiling(Boolean lastFiling) {
+ this.lastFiling = lastFiling;
+ return this;
+ }
+
+ /**
+ * Indicates if this is the issuer's final year filing.
+ * @return lastFiling
+ */
+ @javax.annotation.Nullable
+ public Boolean getLastFiling() {
+ return lastFiling;
+ }
+
+ public void setLastFiling(Boolean lastFiling) {
+ this.lastFiling = lastFiling;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ IssuerBase issuerBase = (IssuerBase) o;
+ return Objects.equals(this.name, issuerBase.name) &&
+ Objects.equals(this.dbaName, issuerBase.dbaName) &&
+ Objects.equals(this.tin, issuerBase.tin) &&
+ Objects.equals(this.referenceId, issuerBase.referenceId) &&
+ Objects.equals(this.telephone, issuerBase.telephone) &&
+ Objects.equals(this.taxYear, issuerBase.taxYear) &&
+ Objects.equals(this.countryCode, issuerBase.countryCode) &&
+ Objects.equals(this.email, issuerBase.email) &&
+ Objects.equals(this.address, issuerBase.address) &&
+ Objects.equals(this.city, issuerBase.city) &&
+ Objects.equals(this.state, issuerBase.state) &&
+ Objects.equals(this.zip, issuerBase.zip) &&
+ Objects.equals(this.foreignProvince, issuerBase.foreignProvince) &&
+ Objects.equals(this.transferAgentName, issuerBase.transferAgentName) &&
+ Objects.equals(this.lastFiling, issuerBase.lastFiling);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class IssuerBase {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n");
+ sb.append(" tin: ").append(toIndentedString(tin)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n");
+ sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n");
+ sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" zip: ").append(toIndentedString(zip)).append("\n");
+ sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n");
+ sb.append(" transferAgentName: ").append(toIndentedString(transferAgentName)).append("\n");
+ sb.append(" lastFiling: ").append(toIndentedString(lastFiling)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("name");
+ openapiFields.add("dbaName");
+ openapiFields.add("tin");
+ openapiFields.add("referenceId");
+ openapiFields.add("telephone");
+ openapiFields.add("taxYear");
+ openapiFields.add("countryCode");
+ openapiFields.add("email");
+ openapiFields.add("address");
+ openapiFields.add("city");
+ openapiFields.add("state");
+ openapiFields.add("zip");
+ openapiFields.add("foreignProvince");
+ openapiFields.add("transferAgentName");
+ openapiFields.add("lastFiling");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("telephone");
+ openapiRequiredFields.add("taxYear");
+ openapiRequiredFields.add("email");
+ openapiRequiredFields.add("address");
+ openapiRequiredFields.add("city");
+ openapiRequiredFields.add("state");
+ openapiRequiredFields.add("zip");
+ openapiRequiredFields.add("lastFiling");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to IssuerBase
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!IssuerBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in IssuerBase is not found in the empty JSON string", IssuerBase.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!IssuerBase.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IssuerBase` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : IssuerBase.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString()));
+ }
+ if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString()));
+ }
+ if ((jsonObj.get("transferAgentName") != null && !jsonObj.get("transferAgentName").isJsonNull()) && !jsonObj.get("transferAgentName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `transferAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferAgentName").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!IssuerBase.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'IssuerBase' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(IssuerBase.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, IssuerBase value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public IssuerBase read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of IssuerBase given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of IssuerBase
+ * @throws IOException if the JSON string is invalid with respect to IssuerBase
+ */
+ public static IssuerBase fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, IssuerBase.class);
+ }
+
+ /**
+ * Convert an instance of IssuerBase to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java
new file mode 100644
index 0000000..09de4a1
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java
@@ -0,0 +1,640 @@
+/*
+ * AvaTax Software Development Kit for Java (JRE)
+ *
+ * (c) 2004-2025 Avalara, Inc.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * Avalara 1099 & W-9 API Definition
+ *
+ * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
+ *
+ * @author Sachin Baijal
+ * @author Jonathan Wenger
+ * @copyright 2004-2025 Avalara, Inc.
+ * @license https://www.apache.org/licenses/LICENSE-2.0
+ * @link https://github.com/avadev/Avalara-SDK-Java
+ */
+
+package Avalara.SDK.model.A1099.V2;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.TypeAdapter;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import java.io.IOException;
+
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import Avalara.SDK.JSON;
+
+/**
+ * IssuerRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class IssuerRequest {
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_DBA_NAME = "dbaName";
+ @SerializedName(SERIALIZED_NAME_DBA_NAME)
+ private String dbaName;
+
+ public static final String SERIALIZED_NAME_TIN = "tin";
+ @SerializedName(SERIALIZED_NAME_TIN)
+ private String tin;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_TELEPHONE = "telephone";
+ @SerializedName(SERIALIZED_NAME_TELEPHONE)
+ private String telephone;
+
+ public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear";
+ @SerializedName(SERIALIZED_NAME_TAX_YEAR)
+ private Integer taxYear;
+
+ public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode";
+ @SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
+ private String countryCode;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ADDRESS = "address";
+ @SerializedName(SERIALIZED_NAME_ADDRESS)
+ private String address;
+
+ public static final String SERIALIZED_NAME_CITY = "city";
+ @SerializedName(SERIALIZED_NAME_CITY)
+ private String city;
+
+ public static final String SERIALIZED_NAME_STATE = "state";
+ @SerializedName(SERIALIZED_NAME_STATE)
+ private String state;
+
+ public static final String SERIALIZED_NAME_ZIP = "zip";
+ @SerializedName(SERIALIZED_NAME_ZIP)
+ private String zip;
+
+ public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince";
+ @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE)
+ private String foreignProvince;
+
+ public static final String SERIALIZED_NAME_TRANSFER_AGENT_NAME = "transferAgentName";
+ @SerializedName(SERIALIZED_NAME_TRANSFER_AGENT_NAME)
+ private String transferAgentName;
+
+ public static final String SERIALIZED_NAME_LAST_FILING = "lastFiling";
+ @SerializedName(SERIALIZED_NAME_LAST_FILING)
+ private Boolean lastFiling;
+
+ public IssuerRequest() {
+ }
+
+ public IssuerRequest name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Legal name. Not the DBA name.
+ * @return name
+ */
+ @javax.annotation.Nullable
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public IssuerRequest dbaName(String dbaName) {
+ this.dbaName = dbaName;
+ return this;
+ }
+
+ /**
+ * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.
+ * @return dbaName
+ */
+ @javax.annotation.Nullable
+ public String getDbaName() {
+ return dbaName;
+ }
+
+ public void setDbaName(String dbaName) {
+ this.dbaName = dbaName;
+ }
+
+
+ public IssuerRequest tin(String tin) {
+ this.tin = tin;
+ return this;
+ }
+
+ /**
+ * Federal Tax Identification Number (TIN).
+ * @return tin
+ */
+ @javax.annotation.Nullable
+ public String getTin() {
+ return tin;
+ }
+
+ public void setTin(String tin) {
+ this.tin = tin;
+ }
+
+
+ public IssuerRequest referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public IssuerRequest telephone(String telephone) {
+ this.telephone = telephone;
+ return this;
+ }
+
+ /**
+ * Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.
+ * @return telephone
+ */
+ @javax.annotation.Nullable
+ public String getTelephone() {
+ return telephone;
+ }
+
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
+ }
+
+
+ public IssuerRequest taxYear(Integer taxYear) {
+ this.taxYear = taxYear;
+ return this;
+ }
+
+ /**
+ * Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4.
+ * @return taxYear
+ */
+ @javax.annotation.Nullable
+ public Integer getTaxYear() {
+ return taxYear;
+ }
+
+ public void setTaxYear(Integer taxYear) {
+ this.taxYear = taxYear;
+ }
+
+
+ public IssuerRequest countryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address.
+ * @return countryCode
+ */
+ @javax.annotation.Nullable
+ public String getCountryCode() {
+ return countryCode;
+ }
+
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ }
+
+
+ public IssuerRequest email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Contact email address. For recipient inquiries.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public IssuerRequest address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Address.
+ * @return address
+ */
+ @javax.annotation.Nullable
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+
+ public IssuerRequest city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * City.
+ * @return city
+ */
+ @javax.annotation.Nullable
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+
+ public IssuerRequest state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
+ * @return state
+ */
+ @javax.annotation.Nullable
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+
+ public IssuerRequest zip(String zip) {
+ this.zip = zip;
+ return this;
+ }
+
+ /**
+ * ZIP/postal code.
+ * @return zip
+ */
+ @javax.annotation.Nullable
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+
+ public IssuerRequest foreignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ return this;
+ }
+
+ /**
+ * Province or region for non-US/CA addresses.
+ * @return foreignProvince
+ */
+ @javax.annotation.Nullable
+ public String getForeignProvince() {
+ return foreignProvince;
+ }
+
+ public void setForeignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ }
+
+
+ public IssuerRequest transferAgentName(String transferAgentName) {
+ this.transferAgentName = transferAgentName;
+ return this;
+ }
+
+ /**
+ * Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.
+ * @return transferAgentName
+ */
+ @javax.annotation.Nullable
+ public String getTransferAgentName() {
+ return transferAgentName;
+ }
+
+ public void setTransferAgentName(String transferAgentName) {
+ this.transferAgentName = transferAgentName;
+ }
+
+
+ public IssuerRequest lastFiling(Boolean lastFiling) {
+ this.lastFiling = lastFiling;
+ return this;
+ }
+
+ /**
+ * Indicates if this is the issuer's final year filing.
+ * @return lastFiling
+ */
+ @javax.annotation.Nullable
+ public Boolean getLastFiling() {
+ return lastFiling;
+ }
+
+ public void setLastFiling(Boolean lastFiling) {
+ this.lastFiling = lastFiling;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ IssuerRequest issuerRequest = (IssuerRequest) o;
+ return Objects.equals(this.name, issuerRequest.name) &&
+ Objects.equals(this.dbaName, issuerRequest.dbaName) &&
+ Objects.equals(this.tin, issuerRequest.tin) &&
+ Objects.equals(this.referenceId, issuerRequest.referenceId) &&
+ Objects.equals(this.telephone, issuerRequest.telephone) &&
+ Objects.equals(this.taxYear, issuerRequest.taxYear) &&
+ Objects.equals(this.countryCode, issuerRequest.countryCode) &&
+ Objects.equals(this.email, issuerRequest.email) &&
+ Objects.equals(this.address, issuerRequest.address) &&
+ Objects.equals(this.city, issuerRequest.city) &&
+ Objects.equals(this.state, issuerRequest.state) &&
+ Objects.equals(this.zip, issuerRequest.zip) &&
+ Objects.equals(this.foreignProvince, issuerRequest.foreignProvince) &&
+ Objects.equals(this.transferAgentName, issuerRequest.transferAgentName) &&
+ Objects.equals(this.lastFiling, issuerRequest.lastFiling);
+ }
+
+ private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
+ return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling);
+ }
+
+ private static int hashCodeNullable(JsonNullable a) {
+ if (a == null) {
+ return 1;
+ }
+ return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class IssuerRequest {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n");
+ sb.append(" tin: ").append(toIndentedString(tin)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n");
+ sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n");
+ sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" zip: ").append(toIndentedString(zip)).append("\n");
+ sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n");
+ sb.append(" transferAgentName: ").append(toIndentedString(transferAgentName)).append("\n");
+ sb.append(" lastFiling: ").append(toIndentedString(lastFiling)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+
+ public static HashSet openapiFields;
+ public static HashSet openapiRequiredFields;
+
+ static {
+ // a set of all properties/fields (JSON key names)
+ openapiFields = new HashSet();
+ openapiFields.add("name");
+ openapiFields.add("dbaName");
+ openapiFields.add("tin");
+ openapiFields.add("referenceId");
+ openapiFields.add("telephone");
+ openapiFields.add("taxYear");
+ openapiFields.add("countryCode");
+ openapiFields.add("email");
+ openapiFields.add("address");
+ openapiFields.add("city");
+ openapiFields.add("state");
+ openapiFields.add("zip");
+ openapiFields.add("foreignProvince");
+ openapiFields.add("transferAgentName");
+ openapiFields.add("lastFiling");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("telephone");
+ openapiRequiredFields.add("taxYear");
+ openapiRequiredFields.add("email");
+ openapiRequiredFields.add("address");
+ openapiRequiredFields.add("city");
+ openapiRequiredFields.add("state");
+ openapiRequiredFields.add("zip");
+ openapiRequiredFields.add("lastFiling");
+ }
+
+ /**
+ * Validates the JSON Element and throws an exception if issues found
+ *
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to IssuerRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!IssuerRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in IssuerRequest is not found in the empty JSON string", IssuerRequest.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!IssuerRequest.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IssuerRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : IssuerRequest.openapiRequiredFields) {
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString()));
+ }
+ if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString()));
+ }
+ if ((jsonObj.get("transferAgentName") != null && !jsonObj.get("transferAgentName").isJsonNull()) && !jsonObj.get("transferAgentName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `transferAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferAgentName").toString()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!IssuerRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'IssuerRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(IssuerRequest.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, IssuerRequest value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public IssuerRequest read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of IssuerRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of IssuerRequest
+ * @throws IOException if the JSON string is invalid with respect to IssuerRequest
+ */
+ public static IssuerRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, IssuerRequest.class);
+ }
+
+ /**
+ * Convert an instance of IssuerRequest to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java
index fc586b1..32f770a 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java
@@ -247,10 +247,10 @@ public W4FormMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -357,7 +357,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields.add("email");
openapiRequiredFields.add("employeeFirstName");
openapiRequiredFields.add("employeeLastName");
- openapiRequiredFields.add("companyId");
}
/**
@@ -407,7 +406,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
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()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
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 579a8ac..4371aa1 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java
@@ -247,7 +247,7 @@ public W4FormRequest employeeFirstName(String employeeFirstName) {
* The first name of the employee.
* @return employeeFirstName
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getEmployeeFirstName() {
return employeeFirstName;
}
@@ -285,7 +285,7 @@ public W4FormRequest employeeLastName(String employeeLastName) {
* The last name of the employee.
* @return employeeLastName
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getEmployeeLastName() {
return employeeLastName;
}
@@ -320,10 +320,10 @@ public W4FormRequest tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getTinType() {
return tinType;
}
@@ -342,7 +342,7 @@ public W4FormRequest tin(String tin) {
* The taxpayer identification number (TIN).
* @return tin
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getTin() {
return tin;
}
@@ -358,7 +358,7 @@ public W4FormRequest address(String address) {
}
/**
- * The address of the employee.
+ * The address of the employee. Required unless exempt.
* @return address
*/
@javax.annotation.Nullable
@@ -377,7 +377,7 @@ public W4FormRequest city(String city) {
}
/**
- * The city of residence of the employee.
+ * The city of residence of the employee. Required unless exempt.
* @return city
*/
@javax.annotation.Nullable
@@ -396,7 +396,7 @@ public W4FormRequest state(String state) {
}
/**
- * The state of residence of the employee.
+ * The state of residence of the employee. Required unless exempt.
* @return state
*/
@javax.annotation.Nullable
@@ -415,7 +415,7 @@ public W4FormRequest zip(String zip) {
}
/**
- * The ZIP code of residence of the employee.
+ * The ZIP code of residence of the employee. Required unless exempt.
* @return zip
*/
@javax.annotation.Nullable
@@ -434,7 +434,7 @@ public W4FormRequest maritalStatus(String maritalStatus) {
}
/**
- * The marital status of the employee.
+ * 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.
* @return maritalStatus
*/
@javax.annotation.Nullable
@@ -643,10 +643,10 @@ public W4FormRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -807,7 +807,10 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
+ openapiRequiredFields.add("employeeFirstName");
+ openapiRequiredFields.add("employeeLastName");
+ openapiRequiredFields.add("tinType");
+ openapiRequiredFields.add("tin");
}
/**
@@ -845,22 +848,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) {
+ if (!jsonObj.get("employeeFirstName").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString()));
}
if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString()));
}
- if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) {
+ if (!jsonObj.get("employeeLastName").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString()));
}
if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString()));
}
- if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ if (!jsonObj.get("tinType").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
}
- if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ if (!jsonObj.get("tin").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
}
if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
@@ -884,7 +887,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java
index 767acf0..827bc4e 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java
@@ -21,7 +21,6 @@
import java.util.Objects;
import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
-import Avalara.SDK.model.A1099.V2.W9FormBaseResponse;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -60,7 +59,69 @@
* W4FormResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class W4FormResponse extends W9FormBaseResponse {
+public class W4FormResponse {
+ /**
+ * The form type (always \"W4\" for this model).
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName";
@SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME)
private String employeeFirstName;
@@ -137,10 +198,79 @@ public class W4FormResponse extends W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_OFFICE_CODE)
private String officeCode;
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus";
+ @SerializedName(SERIALIZED_NAME_ENTRY_STATUS)
+ private EntryStatusResponse entryStatus;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_COMPANY_ID = "companyId";
+ @SerializedName(SERIALIZED_NAME_COMPANY_ID)
+ private String companyId;
+
+ public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName";
+ @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
+ private String displayName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ARCHIVED = "archived";
+ @SerializedName(SERIALIZED_NAME_ARCHIVED)
+ private Boolean archived;
+
+ public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId";
+ @SerializedName(SERIALIZED_NAME_ANCESTOR_ID)
+ private String ancestorId;
+
+ public static final String SERIALIZED_NAME_SIGNATURE = "signature";
+ @SerializedName(SERIALIZED_NAME_SIGNATURE)
+ private String signature;
+
+ public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate";
+ @SerializedName(SERIALIZED_NAME_SIGNED_DATE)
+ private OffsetDateTime signedDate;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT)
+ private OffsetDateTime eDeliveryConsentedAt;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
public W4FormResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W4FormResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type (always \"W4\" for this model).
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W4FormResponse employeeFirstName(String employeeFirstName) {
this.employeeFirstName = employeeFirstName;
return this;
@@ -223,7 +353,7 @@ public W4FormResponse tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
@javax.annotation.Nullable
@@ -502,6 +632,253 @@ public void setOfficeCode(String officeCode) {
}
+ public W4FormResponse id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the form.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public W4FormResponse entryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ return this;
+ }
+
+ /**
+ * The entry status information for the form.
+ * @return entryStatus
+ */
+ @javax.annotation.Nullable
+ public EntryStatusResponse getEntryStatus() {
+ return entryStatus;
+ }
+
+ public void setEntryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ }
+
+
+ public W4FormResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * A reference identifier for the form.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public W4FormResponse companyId(String companyId) {
+ this.companyId = companyId;
+ return this;
+ }
+
+ /**
+ * The ID of the associated company.
+ * @return companyId
+ */
+ @javax.annotation.Nullable
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
+
+
+ public W4FormResponse displayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * The display name associated with the form.
+ * @return displayName
+ */
+ @javax.annotation.Nullable
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+
+ public W4FormResponse email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The email address of the individual associated with the form.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public W4FormResponse archived(Boolean archived) {
+ this.archived = archived;
+ return this;
+ }
+
+ /**
+ * Indicates whether the form is archived.
+ * @return archived
+ */
+ @javax.annotation.Nullable
+ public Boolean getArchived() {
+ return archived;
+ }
+
+ public void setArchived(Boolean archived) {
+ this.archived = archived;
+ }
+
+
+ public W4FormResponse ancestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ return this;
+ }
+
+ /**
+ * Form ID of previous version.
+ * @return ancestorId
+ */
+ @javax.annotation.Nullable
+ public String getAncestorId() {
+ return ancestorId;
+ }
+
+ public void setAncestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ }
+
+
+ public W4FormResponse signature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+ /**
+ * The signature of the form.
+ * @return signature
+ */
+ @javax.annotation.Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+
+ public W4FormResponse signedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ return this;
+ }
+
+ /**
+ * The date the form was signed.
+ * @return signedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSignedDate() {
+ return signedDate;
+ }
+
+ public void setSignedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ }
+
+
+ public W4FormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ return this;
+ }
+
+ /**
+ * The date when e-delivery was consented.
+ * @return eDeliveryConsentedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime geteDeliveryConsentedAt() {
+ return eDeliveryConsentedAt;
+ }
+
+ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ }
+
+
+ public W4FormResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The creation date of the form.
+ * @return createdAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+
+ public W4FormResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The last updated date of the form.
+ * @return updatedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -512,7 +889,8 @@ public boolean equals(Object o) {
return false;
}
W4FormResponse w4FormResponse = (W4FormResponse) o;
- return Objects.equals(this.employeeFirstName, w4FormResponse.employeeFirstName) &&
+ return Objects.equals(this.type, w4FormResponse.type) &&
+ Objects.equals(this.employeeFirstName, w4FormResponse.employeeFirstName) &&
Objects.equals(this.employeeMiddleName, w4FormResponse.employeeMiddleName) &&
Objects.equals(this.employeeLastName, w4FormResponse.employeeLastName) &&
Objects.equals(this.employeeNameSuffix, w4FormResponse.employeeNameSuffix) &&
@@ -531,7 +909,19 @@ public boolean equals(Object o) {
Objects.equals(this.additionalWithheld, w4FormResponse.additionalWithheld) &&
Objects.equals(this.exemptFromWithholding, w4FormResponse.exemptFromWithholding) &&
Objects.equals(this.officeCode, w4FormResponse.officeCode) &&
- super.equals(o);
+ Objects.equals(this.id, w4FormResponse.id) &&
+ Objects.equals(this.entryStatus, w4FormResponse.entryStatus) &&
+ Objects.equals(this.referenceId, w4FormResponse.referenceId) &&
+ Objects.equals(this.companyId, w4FormResponse.companyId) &&
+ Objects.equals(this.displayName, w4FormResponse.displayName) &&
+ Objects.equals(this.email, w4FormResponse.email) &&
+ Objects.equals(this.archived, w4FormResponse.archived) &&
+ Objects.equals(this.ancestorId, w4FormResponse.ancestorId) &&
+ Objects.equals(this.signature, w4FormResponse.signature) &&
+ Objects.equals(this.signedDate, w4FormResponse.signedDate) &&
+ Objects.equals(this.eDeliveryConsentedAt, w4FormResponse.eDeliveryConsentedAt) &&
+ Objects.equals(this.createdAt, w4FormResponse.createdAt) &&
+ Objects.equals(this.updatedAt, w4FormResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -540,7 +930,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, super.hashCode());
+ return Objects.hash(type, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -554,7 +944,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W4FormResponse {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n");
sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n");
sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n");
@@ -574,6 +964,19 @@ public String toString() {
sb.append(" additionalWithheld: ").append(toIndentedString(additionalWithheld)).append("\n");
sb.append(" exemptFromWithholding: ").append(toIndentedString(exemptFromWithholding)).append("\n");
sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
+ sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
+ sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
+ sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
+ sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n");
+ sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -596,6 +999,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
openapiFields.add("id");
openapiFields.add("entryStatus");
openapiFields.add("referenceId");
@@ -609,7 +1013,6 @@ private String toIndentedString(Object o) {
openapiFields.add("eDeliveryConsentedAt");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");
- openapiFields.add("type");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -635,6 +1038,75 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W4FormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString()));
+ }
+ if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString()));
+ }
+ if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString()));
+ }
+ if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString()));
+ }
+ if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java
index 05ed60a..eaa518d 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java
@@ -224,10 +224,10 @@ public W8BenEFormMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -331,7 +331,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields = new HashSet();
openapiRequiredFields.add("email");
openapiRequiredFields.add("name");
- openapiRequiredFields.add("companyId");
}
/**
@@ -378,7 +377,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java
index fd7982f..8eeb7ef 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java
@@ -555,7 +555,7 @@ public W8BenEFormRequest name(String name) {
* The name of the individual or entity associated with the form.
* @return name
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getName() {
return name;
}
@@ -574,7 +574,7 @@ public W8BenEFormRequest citizenshipCountry(String citizenshipCountry) {
* The country of citizenship.
* @return citizenshipCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getCitizenshipCountry() {
return citizenshipCountry;
}
@@ -609,10 +609,10 @@ public W8BenEFormRequest entityType(String entityType) {
}
/**
- * The entity type.
+ * The entity type. Available values: - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part
* @return entityType
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getEntityType() {
return entityType;
}
@@ -647,10 +647,10 @@ public W8BenEFormRequest fatcaStatus(String fatcaStatus) {
}
/**
- * The FATCA status.
+ * The FATCA status. Available values: - 1: Nonparticipating FFI (including a limited FFI or an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner) - 2: Participating FFI - 3: Reporting Model 1 FFI - 4: Reporting Model 2 FFI - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XII) - 6: Sponsored FFI that has not obtained a GIIN - 7: Certified deemed-compliant nonregistering local bank - 8: Certified deemed-compliant FFI with only low-value accounts - 9: Certified deemed-compliant sponsored, closely held investment vehicle - 10: Certified deemed-compliant limited life debt investment entity - 11: Certified deemed-compliant investment advisors and investment managers - 12: Owner-documented FFI - 13: Restricted distributor - 14: Nonreporting IGA FFI - 15: Foreign government, government of a U.S. possession, or foreign central bank of issue - 16: International organization - 17: Exempt retirement plans - 18: Entity wholly owned by exempt beneficial owners - 19: Territory financial institution - 20: Nonfinancial group entity - 21: Excepted nonfinancial start-up company - 22: Excepted nonfinancial entity in liquidation or bankruptcy - 23: 501(c) organization - 24: Nonprofit organization - 25: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation - 26: Excepted territory NFFE - 27: Active NFFE - 28: Passive NFFE - 29: Excepted inter-affiliate FFI - 30: Direct reporting NFFE - 31: Sponsored direct reporting NFFE - 32: Account that is not a financial account
* @return fatcaStatus
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getFatcaStatus() {
return fatcaStatus;
}
@@ -745,7 +745,7 @@ public W8BenEFormRequest residenceCountry(String residenceCountry) {
* The country of residence.
* @return residenceCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getResidenceCountry() {
return residenceCountry;
}
@@ -970,7 +970,7 @@ public W8BenEFormRequest disregardedEntityFatcaStatus(String disregardedEntityFa
}
/**
- * The FATCA status of disregarded entity or branch receiving payment.
+ * The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Limited Branch - 2: U.S. Branch - 3: Participating FFI - 4: Reporting Model 1 FFI - 5: Reporting Model 2 FFI
* @return disregardedEntityFatcaStatus
*/
@javax.annotation.Nullable
@@ -1160,7 +1160,7 @@ public W8BenEFormRequest benefitLimitation(String benefitLimitation) {
}
/**
- * The benefit limitation for tax treaty claims.
+ * The benefit limitation for tax treaty claims. Available values: - 1: Government - 2: Tax exempt pension trust or pension fund - 3: Other tax exempt organization - 4: Publicly traded corporation - 5: Subsidiary of a publicly traded corporation - 6: Company that meets the ownership and base erosion test - 7: Company that meets the derivative benefits test - 8: Company with an item of income that meets active trade or business test - 9: Favorable discretionary determination by the U.S. competent authority received - 10: Other
* @return benefitLimitation
*/
@javax.annotation.Nullable
@@ -1616,7 +1616,7 @@ public W8BenEFormRequest igaModel(String igaModel) {
}
/**
- * The applicable IGA model.
+ * The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA
* @return igaModel
*/
@javax.annotation.Nullable
@@ -2403,10 +2403,10 @@ public W8BenEFormRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -2719,7 +2719,11 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("citizenshipCountry");
+ openapiRequiredFields.add("entityType");
+ openapiRequiredFields.add("fatcaStatus");
+ openapiRequiredFields.add("residenceCountry");
}
/**
@@ -2757,19 +2761,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
- if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
}
if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString()));
}
- if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) {
+ 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()));
}
- if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) {
+ if (!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()));
}
if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) {
@@ -2784,7 +2788,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
}
- if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("residenceCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
}
if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
@@ -2903,7 +2907,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java
index da2d884..c9394eb 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java
@@ -22,7 +22,6 @@
import java.util.Objects;
import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
import Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse;
-import Avalara.SDK.model.A1099.V2.W9FormBaseResponse;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -64,7 +63,69 @@
* W8BenEFormResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class W8BenEFormResponse extends W9FormBaseResponse {
+public class W8BenEFormResponse {
+ /**
+ * The form type (always \"W8BenE\" for this model).
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
@@ -449,10 +510,79 @@ public class W8BenEFormResponse extends W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION)
private Boolean capacityToSignCertification;
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus";
+ @SerializedName(SERIALIZED_NAME_ENTRY_STATUS)
+ private EntryStatusResponse entryStatus;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_COMPANY_ID = "companyId";
+ @SerializedName(SERIALIZED_NAME_COMPANY_ID)
+ private String companyId;
+
+ public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName";
+ @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
+ private String displayName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ARCHIVED = "archived";
+ @SerializedName(SERIALIZED_NAME_ARCHIVED)
+ private Boolean archived;
+
+ public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId";
+ @SerializedName(SERIALIZED_NAME_ANCESTOR_ID)
+ private String ancestorId;
+
+ public static final String SERIALIZED_NAME_SIGNATURE = "signature";
+ @SerializedName(SERIALIZED_NAME_SIGNATURE)
+ private String signature;
+
+ public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate";
+ @SerializedName(SERIALIZED_NAME_SIGNED_DATE)
+ private OffsetDateTime signedDate;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT)
+ private OffsetDateTime eDeliveryConsentedAt;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
public W8BenEFormResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W8BenEFormResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type (always \"W8BenE\" for this model).
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W8BenEFormResponse name(String name) {
this.name = name;
return this;
@@ -782,7 +912,7 @@ public W8BenEFormResponse tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
@javax.annotation.Nullable
@@ -2285,6 +2415,253 @@ public void setCapacityToSignCertification(Boolean capacityToSignCertification)
}
+ public W8BenEFormResponse id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the form.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public W8BenEFormResponse entryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ return this;
+ }
+
+ /**
+ * The entry status information for the form.
+ * @return entryStatus
+ */
+ @javax.annotation.Nullable
+ public EntryStatusResponse getEntryStatus() {
+ return entryStatus;
+ }
+
+ public void setEntryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ }
+
+
+ public W8BenEFormResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * A reference identifier for the form.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public W8BenEFormResponse companyId(String companyId) {
+ this.companyId = companyId;
+ return this;
+ }
+
+ /**
+ * The ID of the associated company.
+ * @return companyId
+ */
+ @javax.annotation.Nullable
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
+
+
+ public W8BenEFormResponse displayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * The display name associated with the form.
+ * @return displayName
+ */
+ @javax.annotation.Nullable
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+
+ public W8BenEFormResponse email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The email address of the individual associated with the form.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public W8BenEFormResponse archived(Boolean archived) {
+ this.archived = archived;
+ return this;
+ }
+
+ /**
+ * Indicates whether the form is archived.
+ * @return archived
+ */
+ @javax.annotation.Nullable
+ public Boolean getArchived() {
+ return archived;
+ }
+
+ public void setArchived(Boolean archived) {
+ this.archived = archived;
+ }
+
+
+ public W8BenEFormResponse ancestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ return this;
+ }
+
+ /**
+ * Form ID of previous version.
+ * @return ancestorId
+ */
+ @javax.annotation.Nullable
+ public String getAncestorId() {
+ return ancestorId;
+ }
+
+ public void setAncestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ }
+
+
+ public W8BenEFormResponse signature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+ /**
+ * The signature of the form.
+ * @return signature
+ */
+ @javax.annotation.Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+
+ public W8BenEFormResponse signedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ return this;
+ }
+
+ /**
+ * The date the form was signed.
+ * @return signedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSignedDate() {
+ return signedDate;
+ }
+
+ public void setSignedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ }
+
+
+ public W8BenEFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ return this;
+ }
+
+ /**
+ * The date when e-delivery was consented.
+ * @return eDeliveryConsentedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime geteDeliveryConsentedAt() {
+ return eDeliveryConsentedAt;
+ }
+
+ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ }
+
+
+ public W8BenEFormResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The creation date of the form.
+ * @return createdAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+
+ public W8BenEFormResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The last updated date of the form.
+ * @return updatedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -2295,7 +2672,8 @@ public boolean equals(Object o) {
return false;
}
W8BenEFormResponse w8BenEFormResponse = (W8BenEFormResponse) o;
- return Objects.equals(this.name, w8BenEFormResponse.name) &&
+ return Objects.equals(this.type, w8BenEFormResponse.type) &&
+ Objects.equals(this.name, w8BenEFormResponse.name) &&
Objects.equals(this.citizenshipCountry, w8BenEFormResponse.citizenshipCountry) &&
Objects.equals(this.disregardedEntity, w8BenEFormResponse.disregardedEntity) &&
Objects.equals(this.entityType, w8BenEFormResponse.entityType) &&
@@ -2391,7 +2769,19 @@ public boolean equals(Object o) {
Objects.equals(this.substantialUsOwners, w8BenEFormResponse.substantialUsOwners) &&
Objects.equals(this.signerName, w8BenEFormResponse.signerName) &&
Objects.equals(this.capacityToSignCertification, w8BenEFormResponse.capacityToSignCertification) &&
- super.equals(o);
+ Objects.equals(this.id, w8BenEFormResponse.id) &&
+ Objects.equals(this.entryStatus, w8BenEFormResponse.entryStatus) &&
+ Objects.equals(this.referenceId, w8BenEFormResponse.referenceId) &&
+ Objects.equals(this.companyId, w8BenEFormResponse.companyId) &&
+ Objects.equals(this.displayName, w8BenEFormResponse.displayName) &&
+ Objects.equals(this.email, w8BenEFormResponse.email) &&
+ Objects.equals(this.archived, w8BenEFormResponse.archived) &&
+ Objects.equals(this.ancestorId, w8BenEFormResponse.ancestorId) &&
+ Objects.equals(this.signature, w8BenEFormResponse.signature) &&
+ Objects.equals(this.signedDate, w8BenEFormResponse.signedDate) &&
+ Objects.equals(this.eDeliveryConsentedAt, w8BenEFormResponse.eDeliveryConsentedAt) &&
+ Objects.equals(this.createdAt, w8BenEFormResponse.createdAt) &&
+ Objects.equals(this.updatedAt, w8BenEFormResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -2400,7 +2790,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, super.hashCode());
+ return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -2414,7 +2804,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W8BenEFormResponse {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n");
sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n");
@@ -2511,6 +2901,19 @@ public String toString() {
sb.append(" substantialUsOwners: ").append(toIndentedString(substantialUsOwners)).append("\n");
sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n");
sb.append(" capacityToSignCertification: ").append(toIndentedString(capacityToSignCertification)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
+ sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
+ sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
+ sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
+ sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n");
+ sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -2533,6 +2936,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
openapiFields.add("id");
openapiFields.add("entryStatus");
openapiFields.add("referenceId");
@@ -2546,7 +2950,6 @@ private String toIndentedString(Object o) {
openapiFields.add("eDeliveryConsentedAt");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");
- openapiFields.add("type");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -2572,6 +2975,185 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenEFormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
+ }
+ if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString()));
+ }
+ if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !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()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString()));
+ }
+ if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString()));
+ }
+ if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
+ }
+ if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
+ }
+ if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString()));
+ }
+ if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString()));
+ }
+ if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString()));
+ }
+ if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString()));
+ }
+ if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString()));
+ }
+ if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString()));
+ }
+ if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString()));
+ }
+ if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("disregardedCity") != null && !jsonObj.get("disregardedCity").isJsonNull()) && !jsonObj.get("disregardedCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCity").toString()));
+ }
+ if ((jsonObj.get("disregardedState") != null && !jsonObj.get("disregardedState").isJsonNull()) && !jsonObj.get("disregardedState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedState").toString()));
+ }
+ if ((jsonObj.get("disregardedZip") != null && !jsonObj.get("disregardedZip").isJsonNull()) && !jsonObj.get("disregardedZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedZip").toString()));
+ }
+ if ((jsonObj.get("disregardedCountry") != null && !jsonObj.get("disregardedCountry").isJsonNull()) && !jsonObj.get("disregardedCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCountry").toString()));
+ }
+ if ((jsonObj.get("disregardedEntityGiin") != null && !jsonObj.get("disregardedEntityGiin").isJsonNull()) && !jsonObj.get("disregardedEntityGiin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityGiin").toString()));
+ }
+ if ((jsonObj.get("treatyCountry") != null && !jsonObj.get("treatyCountry").isJsonNull()) && !jsonObj.get("treatyCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyCountry").toString()));
+ }
+ if ((jsonObj.get("benefitLimitation") != null && !jsonObj.get("benefitLimitation").isJsonNull()) && !jsonObj.get("benefitLimitation").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `benefitLimitation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("benefitLimitation").toString()));
+ }
+ if ((jsonObj.get("treatyArticle") != null && !jsonObj.get("treatyArticle").isJsonNull()) && !jsonObj.get("treatyArticle").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyArticle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyArticle").toString()));
+ }
+ if ((jsonObj.get("withholdingRate") != null && !jsonObj.get("withholdingRate").isJsonNull()) && !jsonObj.get("withholdingRate").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `withholdingRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingRate").toString()));
+ }
+ if ((jsonObj.get("incomeType") != null && !jsonObj.get("incomeType").isJsonNull()) && !jsonObj.get("incomeType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `incomeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeType").toString()));
+ }
+ if ((jsonObj.get("treatyReasons") != null && !jsonObj.get("treatyReasons").isJsonNull()) && !jsonObj.get("treatyReasons").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyReasons` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyReasons").toString()));
+ }
+ if ((jsonObj.get("ffiSponsoringEntity") != null && !jsonObj.get("ffiSponsoringEntity").isJsonNull()) && !jsonObj.get("ffiSponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ffiSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ffiSponsoringEntity").toString()));
+ }
+ if ((jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity") != null && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonNull()) && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `sponsoredCloselyHeldEntitySponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").toString()));
+ }
+ if ((jsonObj.get("igaCountry") != null && !jsonObj.get("igaCountry").isJsonNull()) && !jsonObj.get("igaCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `igaCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaCountry").toString()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("igaFfiTrusteeOrSponsor") != null && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonNull()) && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `igaFfiTrusteeOrSponsor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaFfiTrusteeOrSponsor").toString()));
+ }
+ if ((jsonObj.get("publiclyTradedNffeSecuritiesMarket") != null && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonNull()) && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedNffeSecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedNffeSecuritiesMarket").toString()));
+ }
+ if ((jsonObj.get("publiclyTradedEntity") != null && !jsonObj.get("publiclyTradedEntity").isJsonNull()) && !jsonObj.get("publiclyTradedEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedEntity").toString()));
+ }
+ if ((jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") != null && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonNull()) && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").toString()));
+ }
+ if ((jsonObj.get("directReportingNffeSponsoringEntity") != null && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonNull()) && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `directReportingNffeSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directReportingNffeSponsoringEntity").toString()));
+ }
+ if (jsonObj.get("substantialUsOwners") != null && !jsonObj.get("substantialUsOwners").isJsonNull()) {
+ JsonArray jsonArraysubstantialUsOwners = jsonObj.getAsJsonArray("substantialUsOwners");
+ if (jsonArraysubstantialUsOwners != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("substantialUsOwners").isJsonArray()) {
+ throw new IllegalArgumentException(String.format("Expected the field `substantialUsOwners` to be an array in the JSON string but got `%s`", jsonObj.get("substantialUsOwners").toString()));
+ }
+
+ // validate the optional field `substantialUsOwners` (array)
+ for (int i = 0; i < jsonArraysubstantialUsOwners.size(); i++) {
+ SubstantialUsOwnerResponse.validateJsonElement(jsonArraysubstantialUsOwners.get(i));
+ };
+ }
+ }
+ if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString()));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java
index fc4028a..3c7c0d8 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java
@@ -224,10 +224,10 @@ public W8BenFormMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -331,7 +331,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields = new HashSet();
openapiRequiredFields.add("email");
openapiRequiredFields.add("name");
- openapiRequiredFields.add("companyId");
}
/**
@@ -378,7 +377,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java
index e9a1a22..33b3f77 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java
@@ -268,7 +268,7 @@ public W8BenFormRequest name(String name) {
* The name of the individual or entity associated with the form.
* @return name
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getName() {
return name;
}
@@ -287,7 +287,7 @@ public W8BenFormRequest citizenshipCountry(String citizenshipCountry) {
* The country of citizenship.
* @return citizenshipCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getCitizenshipCountry() {
return citizenshipCountry;
}
@@ -382,7 +382,7 @@ public W8BenFormRequest residenceCountry(String residenceCountry) {
* The country of residence.
* @return residenceCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getResidenceCountry() {
return residenceCountry;
}
@@ -759,10 +759,10 @@ public W8BenFormRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -933,7 +933,10 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("citizenshipCountry");
+ openapiRequiredFields.add("residenceCountry");
+ openapiRequiredFields.add("mailingCountry");
}
/**
@@ -971,10 +974,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
- if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
}
if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) {
@@ -989,7 +992,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
}
- if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("residenceCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
}
if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
@@ -1037,7 +1040,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java
index 85fa345..9c7d84d 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java
@@ -21,7 +21,6 @@
import java.util.Objects;
import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
-import Avalara.SDK.model.A1099.V2.W9FormBaseResponse;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -61,7 +60,69 @@
* W8BenFormResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class W8BenFormResponse extends W9FormBaseResponse {
+public class W8BenFormResponse {
+ /**
+ * The form type (always \"W8Ben\" for this model).
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
@@ -166,10 +227,79 @@ public class W8BenFormResponse extends W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_SIGNER_CAPACITY)
private String signerCapacity;
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus";
+ @SerializedName(SERIALIZED_NAME_ENTRY_STATUS)
+ private EntryStatusResponse entryStatus;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_COMPANY_ID = "companyId";
+ @SerializedName(SERIALIZED_NAME_COMPANY_ID)
+ private String companyId;
+
+ public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName";
+ @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
+ private String displayName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ARCHIVED = "archived";
+ @SerializedName(SERIALIZED_NAME_ARCHIVED)
+ private Boolean archived;
+
+ public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId";
+ @SerializedName(SERIALIZED_NAME_ANCESTOR_ID)
+ private String ancestorId;
+
+ public static final String SERIALIZED_NAME_SIGNATURE = "signature";
+ @SerializedName(SERIALIZED_NAME_SIGNATURE)
+ private String signature;
+
+ public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate";
+ @SerializedName(SERIALIZED_NAME_SIGNED_DATE)
+ private OffsetDateTime signedDate;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT)
+ private OffsetDateTime eDeliveryConsentedAt;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
public W8BenFormResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W8BenFormResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type (always \"W8Ben\" for this model).
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W8BenFormResponse name(String name) {
this.name = name;
return this;
@@ -423,7 +553,7 @@ public W8BenFormResponse tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
@javax.annotation.Nullable
@@ -664,6 +794,253 @@ public void setSignerCapacity(String signerCapacity) {
}
+ public W8BenFormResponse id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the form.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public W8BenFormResponse entryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ return this;
+ }
+
+ /**
+ * The entry status information for the form.
+ * @return entryStatus
+ */
+ @javax.annotation.Nullable
+ public EntryStatusResponse getEntryStatus() {
+ return entryStatus;
+ }
+
+ public void setEntryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ }
+
+
+ public W8BenFormResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * A reference identifier for the form.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public W8BenFormResponse companyId(String companyId) {
+ this.companyId = companyId;
+ return this;
+ }
+
+ /**
+ * The ID of the associated company.
+ * @return companyId
+ */
+ @javax.annotation.Nullable
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
+
+
+ public W8BenFormResponse displayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * The display name associated with the form.
+ * @return displayName
+ */
+ @javax.annotation.Nullable
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+
+ public W8BenFormResponse email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The email address of the individual associated with the form.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public W8BenFormResponse archived(Boolean archived) {
+ this.archived = archived;
+ return this;
+ }
+
+ /**
+ * Indicates whether the form is archived.
+ * @return archived
+ */
+ @javax.annotation.Nullable
+ public Boolean getArchived() {
+ return archived;
+ }
+
+ public void setArchived(Boolean archived) {
+ this.archived = archived;
+ }
+
+
+ public W8BenFormResponse ancestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ return this;
+ }
+
+ /**
+ * Form ID of previous version.
+ * @return ancestorId
+ */
+ @javax.annotation.Nullable
+ public String getAncestorId() {
+ return ancestorId;
+ }
+
+ public void setAncestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ }
+
+
+ public W8BenFormResponse signature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+ /**
+ * The signature of the form.
+ * @return signature
+ */
+ @javax.annotation.Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+
+ public W8BenFormResponse signedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ return this;
+ }
+
+ /**
+ * The date the form was signed.
+ * @return signedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSignedDate() {
+ return signedDate;
+ }
+
+ public void setSignedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ }
+
+
+ public W8BenFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ return this;
+ }
+
+ /**
+ * The date when e-delivery was consented.
+ * @return eDeliveryConsentedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime geteDeliveryConsentedAt() {
+ return eDeliveryConsentedAt;
+ }
+
+ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ }
+
+
+ public W8BenFormResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The creation date of the form.
+ * @return createdAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+
+ public W8BenFormResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The last updated date of the form.
+ * @return updatedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -674,7 +1051,8 @@ public boolean equals(Object o) {
return false;
}
W8BenFormResponse w8BenFormResponse = (W8BenFormResponse) o;
- return Objects.equals(this.name, w8BenFormResponse.name) &&
+ return Objects.equals(this.type, w8BenFormResponse.type) &&
+ Objects.equals(this.name, w8BenFormResponse.name) &&
Objects.equals(this.citizenshipCountry, w8BenFormResponse.citizenshipCountry) &&
Objects.equals(this.residenceAddress, w8BenFormResponse.residenceAddress) &&
Objects.equals(this.residenceCity, w8BenFormResponse.residenceCity) &&
@@ -700,7 +1078,19 @@ public boolean equals(Object o) {
Objects.equals(this.incomeType, w8BenFormResponse.incomeType) &&
Objects.equals(this.signerName, w8BenFormResponse.signerName) &&
Objects.equals(this.signerCapacity, w8BenFormResponse.signerCapacity) &&
- super.equals(o);
+ Objects.equals(this.id, w8BenFormResponse.id) &&
+ Objects.equals(this.entryStatus, w8BenFormResponse.entryStatus) &&
+ Objects.equals(this.referenceId, w8BenFormResponse.referenceId) &&
+ Objects.equals(this.companyId, w8BenFormResponse.companyId) &&
+ Objects.equals(this.displayName, w8BenFormResponse.displayName) &&
+ Objects.equals(this.email, w8BenFormResponse.email) &&
+ Objects.equals(this.archived, w8BenFormResponse.archived) &&
+ Objects.equals(this.ancestorId, w8BenFormResponse.ancestorId) &&
+ Objects.equals(this.signature, w8BenFormResponse.signature) &&
+ Objects.equals(this.signedDate, w8BenFormResponse.signedDate) &&
+ Objects.equals(this.eDeliveryConsentedAt, w8BenFormResponse.eDeliveryConsentedAt) &&
+ Objects.equals(this.createdAt, w8BenFormResponse.createdAt) &&
+ Objects.equals(this.updatedAt, w8BenFormResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -709,7 +1099,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, signerCapacity, super.hashCode());
+ return Objects.hash(type, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, signerCapacity, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -723,7 +1113,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W8BenFormResponse {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n");
sb.append(" residenceAddress: ").append(toIndentedString(residenceAddress)).append("\n");
@@ -750,6 +1140,19 @@ public String toString() {
sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n");
sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n");
sb.append(" signerCapacity: ").append(toIndentedString(signerCapacity)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
+ sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
+ sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
+ sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
+ sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n");
+ sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -772,6 +1175,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
openapiFields.add("id");
openapiFields.add("entryStatus");
openapiFields.add("referenceId");
@@ -785,7 +1189,6 @@ private String toIndentedString(Object o) {
openapiFields.add("eDeliveryConsentedAt");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");
- openapiFields.add("type");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -811,6 +1214,108 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenFormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString()));
+ }
+ if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString()));
+ }
+ if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
+ }
+ if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
+ }
+ if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString()));
+ }
+ if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString()));
+ }
+ if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString()));
+ }
+ if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString()));
+ }
+ if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString()));
+ }
+ if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString()));
+ }
+ if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
+ }
+ if ((jsonObj.get("treatyCountry") != null && !jsonObj.get("treatyCountry").isJsonNull()) && !jsonObj.get("treatyCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyCountry").toString()));
+ }
+ if ((jsonObj.get("treatyArticle") != null && !jsonObj.get("treatyArticle").isJsonNull()) && !jsonObj.get("treatyArticle").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyArticle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyArticle").toString()));
+ }
+ if ((jsonObj.get("treatyReasons") != null && !jsonObj.get("treatyReasons").isJsonNull()) && !jsonObj.get("treatyReasons").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `treatyReasons` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyReasons").toString()));
+ }
+ if ((jsonObj.get("withholdingRate") != null && !jsonObj.get("withholdingRate").isJsonNull()) && !jsonObj.get("withholdingRate").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `withholdingRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingRate").toString()));
+ }
+ if ((jsonObj.get("incomeType") != null && !jsonObj.get("incomeType").isJsonNull()) && !jsonObj.get("incomeType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `incomeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeType").toString()));
+ }
+ if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString()));
+ }
+ if ((jsonObj.get("signerCapacity") != null && !jsonObj.get("signerCapacity").isJsonNull()) && !jsonObj.get("signerCapacity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signerCapacity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerCapacity").toString()));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java
index 3d117a1..08945b2 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java
@@ -224,10 +224,10 @@ public W8ImyFormMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -331,7 +331,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields = new HashSet();
openapiRequiredFields.add("email");
openapiRequiredFields.add("name");
- openapiRequiredFields.add("companyId");
}
/**
@@ -378,7 +377,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
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 8ef761e..2766f0c 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java
@@ -616,7 +616,7 @@ public W8ImyFormRequest name(String name) {
* The name of the individual or entity associated with the form.
* @return name
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getName() {
return name;
}
@@ -635,7 +635,7 @@ public W8ImyFormRequest citizenshipCountry(String citizenshipCountry) {
* The country of citizenship.
* @return citizenshipCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getCitizenshipCountry() {
return citizenshipCountry;
}
@@ -670,10 +670,10 @@ public W8ImyFormRequest entityType(String entityType) {
}
/**
- * The entity type.
+ * 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.
* @return entityType
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getEntityType() {
return entityType;
}
@@ -689,7 +689,7 @@ public W8ImyFormRequest fatcaStatus(String fatcaStatus) {
}
/**
- * The FATCA status.
+ * 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.
* @return fatcaStatus
*/
@javax.annotation.Nullable
@@ -787,7 +787,7 @@ public W8ImyFormRequest residenceCountry(String residenceCountry) {
* The country of residence.
* @return residenceCountry
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getResidenceCountry() {
return residenceCountry;
}
@@ -917,7 +917,7 @@ public W8ImyFormRequest tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number
* @return tinType
*/
@javax.annotation.Nullable
@@ -1012,7 +1012,7 @@ public W8ImyFormRequest disregardedEntityFatcaStatus(String disregardedEntityFat
}
/**
- * The FATCA status of disregarded entity or branch receiving payment.
+ * 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
* @return disregardedEntityFatcaStatus
*/
@javax.annotation.Nullable
@@ -2228,7 +2228,7 @@ public W8ImyFormRequest igaModel(String igaModel) {
}
/**
- * The applicable IGA model.
+ * The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA
* @return igaModel
*/
@javax.annotation.Nullable
@@ -2760,10 +2760,10 @@ public W8ImyFormRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -3108,7 +3108,10 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("citizenshipCountry");
+ openapiRequiredFields.add("entityType");
+ openapiRequiredFields.add("residenceCountry");
}
/**
@@ -3146,16 +3149,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
- if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
}
if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString()));
}
- if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) {
+ 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()));
}
if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) {
@@ -3173,7 +3176,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
}
- if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ if (!jsonObj.get("residenceCountry").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
}
if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
@@ -3263,7 +3266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java
index 392d96f..91cbf23 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java
@@ -21,7 +21,6 @@
import java.util.Objects;
import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
-import Avalara.SDK.model.A1099.V2.W9FormBaseResponse;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -61,7 +60,69 @@
* W8ImyFormResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class W8ImyFormResponse extends W9FormBaseResponse {
+public class W8ImyFormResponse {
+ /**
+ * The form type (always \"W8Imy\" for this model).
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
@@ -506,10 +567,79 @@ public class W8ImyFormResponse extends W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_SIGNER_NAME)
private String signerName;
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus";
+ @SerializedName(SERIALIZED_NAME_ENTRY_STATUS)
+ private EntryStatusResponse entryStatus;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_COMPANY_ID = "companyId";
+ @SerializedName(SERIALIZED_NAME_COMPANY_ID)
+ private String companyId;
+
+ public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName";
+ @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
+ private String displayName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ARCHIVED = "archived";
+ @SerializedName(SERIALIZED_NAME_ARCHIVED)
+ private Boolean archived;
+
+ public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId";
+ @SerializedName(SERIALIZED_NAME_ANCESTOR_ID)
+ private String ancestorId;
+
+ public static final String SERIALIZED_NAME_SIGNATURE = "signature";
+ @SerializedName(SERIALIZED_NAME_SIGNATURE)
+ private String signature;
+
+ public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate";
+ @SerializedName(SERIALIZED_NAME_SIGNED_DATE)
+ private OffsetDateTime signedDate;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT)
+ private OffsetDateTime eDeliveryConsentedAt;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
public W8ImyFormResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W8ImyFormResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type (always \"W8Imy\" for this model).
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W8ImyFormResponse name(String name) {
this.name = name;
return this;
@@ -820,7 +950,7 @@ public W8ImyFormResponse tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
@javax.annotation.Nullable
@@ -2619,6 +2749,253 @@ public void setSignerName(String signerName) {
}
+ public W8ImyFormResponse id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the form.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public W8ImyFormResponse entryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ return this;
+ }
+
+ /**
+ * The entry status information for the form.
+ * @return entryStatus
+ */
+ @javax.annotation.Nullable
+ public EntryStatusResponse getEntryStatus() {
+ return entryStatus;
+ }
+
+ public void setEntryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ }
+
+
+ public W8ImyFormResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * A reference identifier for the form.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public W8ImyFormResponse companyId(String companyId) {
+ this.companyId = companyId;
+ return this;
+ }
+
+ /**
+ * The ID of the associated company.
+ * @return companyId
+ */
+ @javax.annotation.Nullable
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
+
+
+ public W8ImyFormResponse displayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * The display name associated with the form.
+ * @return displayName
+ */
+ @javax.annotation.Nullable
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+
+ public W8ImyFormResponse email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The email address of the individual associated with the form.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public W8ImyFormResponse archived(Boolean archived) {
+ this.archived = archived;
+ return this;
+ }
+
+ /**
+ * Indicates whether the form is archived.
+ * @return archived
+ */
+ @javax.annotation.Nullable
+ public Boolean getArchived() {
+ return archived;
+ }
+
+ public void setArchived(Boolean archived) {
+ this.archived = archived;
+ }
+
+
+ public W8ImyFormResponse ancestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ return this;
+ }
+
+ /**
+ * Form ID of previous version.
+ * @return ancestorId
+ */
+ @javax.annotation.Nullable
+ public String getAncestorId() {
+ return ancestorId;
+ }
+
+ public void setAncestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ }
+
+
+ public W8ImyFormResponse signature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+ /**
+ * The signature of the form.
+ * @return signature
+ */
+ @javax.annotation.Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+
+ public W8ImyFormResponse signedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ return this;
+ }
+
+ /**
+ * The date the form was signed.
+ * @return signedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSignedDate() {
+ return signedDate;
+ }
+
+ public void setSignedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ }
+
+
+ public W8ImyFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ return this;
+ }
+
+ /**
+ * The date when e-delivery was consented.
+ * @return eDeliveryConsentedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime geteDeliveryConsentedAt() {
+ return eDeliveryConsentedAt;
+ }
+
+ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ }
+
+
+ public W8ImyFormResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The creation date of the form.
+ * @return createdAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+
+ public W8ImyFormResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The last updated date of the form.
+ * @return updatedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -2629,7 +3006,8 @@ public boolean equals(Object o) {
return false;
}
W8ImyFormResponse w8ImyFormResponse = (W8ImyFormResponse) o;
- return Objects.equals(this.name, w8ImyFormResponse.name) &&
+ return Objects.equals(this.type, w8ImyFormResponse.type) &&
+ Objects.equals(this.name, w8ImyFormResponse.name) &&
Objects.equals(this.citizenshipCountry, w8ImyFormResponse.citizenshipCountry) &&
Objects.equals(this.disregardedEntity, w8ImyFormResponse.disregardedEntity) &&
Objects.equals(this.entityType, w8ImyFormResponse.entityType) &&
@@ -2740,7 +3118,19 @@ public boolean equals(Object o) {
Objects.equals(this.sponsoredDirectReportingNffeCertification, w8ImyFormResponse.sponsoredDirectReportingNffeCertification) &&
Objects.equals(this.directReportingNffeSponsoringEntity, w8ImyFormResponse.directReportingNffeSponsoringEntity) &&
Objects.equals(this.signerName, w8ImyFormResponse.signerName) &&
- super.equals(o);
+ Objects.equals(this.id, w8ImyFormResponse.id) &&
+ Objects.equals(this.entryStatus, w8ImyFormResponse.entryStatus) &&
+ Objects.equals(this.referenceId, w8ImyFormResponse.referenceId) &&
+ Objects.equals(this.companyId, w8ImyFormResponse.companyId) &&
+ Objects.equals(this.displayName, w8ImyFormResponse.displayName) &&
+ Objects.equals(this.email, w8ImyFormResponse.email) &&
+ Objects.equals(this.archived, w8ImyFormResponse.archived) &&
+ Objects.equals(this.ancestorId, w8ImyFormResponse.ancestorId) &&
+ Objects.equals(this.signature, w8ImyFormResponse.signature) &&
+ Objects.equals(this.signedDate, w8ImyFormResponse.signedDate) &&
+ Objects.equals(this.eDeliveryConsentedAt, w8ImyFormResponse.eDeliveryConsentedAt) &&
+ Objects.equals(this.createdAt, w8ImyFormResponse.createdAt) &&
+ Objects.equals(this.updatedAt, w8ImyFormResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -2749,7 +3139,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, super.hashCode());
+ return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -2763,7 +3153,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W8ImyFormResponse {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n");
sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n");
@@ -2875,6 +3265,19 @@ public String toString() {
sb.append(" sponsoredDirectReportingNffeCertification: ").append(toIndentedString(sponsoredDirectReportingNffeCertification)).append("\n");
sb.append(" directReportingNffeSponsoringEntity: ").append(toIndentedString(directReportingNffeSponsoringEntity)).append("\n");
sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
+ sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
+ sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
+ sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
+ sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n");
+ sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -2897,6 +3300,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
openapiFields.add("id");
openapiFields.add("entryStatus");
openapiFields.add("referenceId");
@@ -2910,7 +3314,6 @@ private String toIndentedString(Object o) {
openapiFields.add("eDeliveryConsentedAt");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");
- openapiFields.add("type");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -2936,6 +3339,153 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8ImyFormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString()));
+ }
+ if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString()));
+ }
+ if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !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()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString()));
+ }
+ if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString()));
+ }
+ if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString()));
+ }
+ if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString()));
+ }
+ if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString()));
+ }
+ if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString()));
+ }
+ if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString()));
+ }
+ if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString()));
+ }
+ if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString()));
+ }
+ if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString()));
+ }
+ if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString()));
+ }
+ if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("disregardedCity") != null && !jsonObj.get("disregardedCity").isJsonNull()) && !jsonObj.get("disregardedCity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCity").toString()));
+ }
+ if ((jsonObj.get("disregardedState") != null && !jsonObj.get("disregardedState").isJsonNull()) && !jsonObj.get("disregardedState").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedState").toString()));
+ }
+ if ((jsonObj.get("disregardedZip") != null && !jsonObj.get("disregardedZip").isJsonNull()) && !jsonObj.get("disregardedZip").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedZip").toString()));
+ }
+ if ((jsonObj.get("disregardedCountry") != null && !jsonObj.get("disregardedCountry").isJsonNull()) && !jsonObj.get("disregardedCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCountry").toString()));
+ }
+ if ((jsonObj.get("disregardedEntityGiin") != null && !jsonObj.get("disregardedEntityGiin").isJsonNull()) && !jsonObj.get("disregardedEntityGiin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityGiin").toString()));
+ }
+ if ((jsonObj.get("ffiSponsoringEntity") != null && !jsonObj.get("ffiSponsoringEntity").isJsonNull()) && !jsonObj.get("ffiSponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ffiSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ffiSponsoringEntity").toString()));
+ }
+ if ((jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity") != null && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonNull()) && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `sponsoredCloselyHeldEntitySponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").toString()));
+ }
+ if ((jsonObj.get("igaCountry") != null && !jsonObj.get("igaCountry").isJsonNull()) && !jsonObj.get("igaCountry").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `igaCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaCountry").toString()));
+ }
+ 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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("igaFfiTrusteeOrSponsor") != null && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonNull()) && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `igaFfiTrusteeOrSponsor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaFfiTrusteeOrSponsor").toString()));
+ }
+ if ((jsonObj.get("publiclyTradedNffeSecuritiesMarket") != null && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonNull()) && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedNffeSecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedNffeSecuritiesMarket").toString()));
+ }
+ if ((jsonObj.get("publiclyTradedEntity") != null && !jsonObj.get("publiclyTradedEntity").isJsonNull()) && !jsonObj.get("publiclyTradedEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedEntity").toString()));
+ }
+ if ((jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") != null && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonNull()) && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").toString()));
+ }
+ if ((jsonObj.get("directReportingNffeSponsoringEntity") != null && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonNull()) && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `directReportingNffeSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directReportingNffeSponsoringEntity").toString()));
+ }
+ if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString()));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java
index 9a24b6e..6dafa13 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java
@@ -159,10 +159,10 @@ public W9FormBaseMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -279,7 +279,6 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
}
/**
@@ -302,13 +301,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
-
- // check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : W9FormBaseMinimalRequest.openapiRequiredFields) {
- if (jsonElement.getAsJsonObject().get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
- }
- }
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
@@ -317,7 +309,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java
index b45ffd7..8849cd4 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java
@@ -206,10 +206,10 @@ public W9FormBaseRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -330,7 +330,6 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
}
/**
@@ -353,13 +352,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
-
- // check to make sure all required properties/fields are present in the JSON string
- for (String requiredField : W9FormBaseRequest.openapiRequiredFields) {
- if (jsonElement.getAsJsonObject().get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
- }
- }
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
@@ -371,7 +363,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java
index e771063..09793a4 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java
@@ -60,6 +60,68 @@
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class W9FormBaseResponse {
+ /**
+ * The form type.
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
@@ -112,14 +174,27 @@ public class W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_UPDATED_AT)
private OffsetDateTime updatedAt;
- public static final String SERIALIZED_NAME_TYPE = "type";
- @SerializedName(SERIALIZED_NAME_TYPE)
- protected String type;
-
public W9FormBaseResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W9FormBaseResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type.
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W9FormBaseResponse id(String id) {
this.id = id;
return this;
@@ -367,25 +442,6 @@ public void setUpdatedAt(OffsetDateTime updatedAt) {
}
- public W9FormBaseResponse type(String type) {
- this.type = type;
- return this;
- }
-
- /**
- * The type of the response object.
- * @return type
- */
- @javax.annotation.Nullable
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
-
@Override
public boolean equals(Object o) {
@@ -396,7 +452,8 @@ public boolean equals(Object o) {
return false;
}
W9FormBaseResponse w9FormBaseResponse = (W9FormBaseResponse) o;
- return Objects.equals(this.id, w9FormBaseResponse.id) &&
+ return Objects.equals(this.type, w9FormBaseResponse.type) &&
+ Objects.equals(this.id, w9FormBaseResponse.id) &&
Objects.equals(this.entryStatus, w9FormBaseResponse.entryStatus) &&
Objects.equals(this.referenceId, w9FormBaseResponse.referenceId) &&
Objects.equals(this.companyId, w9FormBaseResponse.companyId) &&
@@ -408,8 +465,7 @@ public boolean equals(Object o) {
Objects.equals(this.signedDate, w9FormBaseResponse.signedDate) &&
Objects.equals(this.eDeliveryConsentedAt, w9FormBaseResponse.eDeliveryConsentedAt) &&
Objects.equals(this.createdAt, w9FormBaseResponse.createdAt) &&
- Objects.equals(this.updatedAt, w9FormBaseResponse.updatedAt) &&
- Objects.equals(this.type, w9FormBaseResponse.type);
+ Objects.equals(this.updatedAt, w9FormBaseResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -418,7 +474,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt, type);
+ return Objects.hash(type, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -432,6 +488,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W9FormBaseResponse {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
@@ -445,7 +502,6 @@ public String toString() {
sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -468,6 +524,20 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
+ openapiFields.add("id");
+ openapiFields.add("entryStatus");
+ openapiFields.add("referenceId");
+ openapiFields.add("companyId");
+ openapiFields.add("displayName");
+ openapiFields.add("email");
+ openapiFields.add("archived");
+ openapiFields.add("ancestorId");
+ openapiFields.add("signature");
+ openapiFields.add("signedDate");
+ openapiFields.add("eDeliveryConsentedAt");
+ openapiFields.add("createdAt");
+ openapiFields.add("updatedAt");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -486,28 +556,76 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString();
- switch (discriminatorValue) {
- case "W4FormResponse":
- W4FormResponse.validateJsonElement(jsonElement);
- break;
- case "W8BenEFormResponse":
- W8BenEFormResponse.validateJsonElement(jsonElement);
- break;
- case "W8BenFormResponse":
- W8BenFormResponse.validateJsonElement(jsonElement);
- break;
- case "W8ImyFormResponse":
- W8ImyFormResponse.validateJsonElement(jsonElement);
- break;
- case "W9FormResponse":
- W9FormResponse.validateJsonElement(jsonElement);
- break;
- default:
- throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue));
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!W9FormBaseResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
}
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!W9FormBaseResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'W9FormBaseResponse' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(W9FormBaseResponse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, W9FormBaseResponse value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public W9FormBaseResponse read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
/**
* Create an instance of W9FormBaseResponse given an JSON string
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java
index 2a5ae9c..9274547 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java
@@ -224,10 +224,10 @@ public W9FormMinimalRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -331,7 +331,6 @@ private String toIndentedString(Object o) {
openapiRequiredFields = new HashSet();
openapiRequiredFields.add("email");
openapiRequiredFields.add("name");
- openapiRequiredFields.add("companyId");
}
/**
@@ -378,7 +377,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
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 5b6c274..23ede97 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java
@@ -243,7 +243,7 @@ public W9FormRequest name(String name) {
* The name of the individual or entity associated with the form.
* @return name
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getName() {
return name;
}
@@ -278,10 +278,10 @@ public W9FormRequest businessClassification(String businessClassification) {
}
/**
- * The classification of the business.
+ * 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)
* @return businessClassification
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getBusinessClassification() {
return businessClassification;
}
@@ -395,7 +395,7 @@ public W9FormRequest address(String address) {
* The address of the individual or entity.
* @return address
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getAddress() {
return address;
}
@@ -506,10 +506,10 @@ public W9FormRequest tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses).
* @return tinType
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getTinType() {
return tinType;
}
@@ -528,7 +528,7 @@ public W9FormRequest tin(String tin) {
* The taxpayer identification number (TIN).
* @return tin
*/
- @javax.annotation.Nullable
+ @javax.annotation.Nonnull
public String getTin() {
return tin;
}
@@ -620,10 +620,10 @@ public W9FormRequest companyId(String companyId) {
}
/**
- * The ID of the associated company.
+ * The ID of the associated company. Required when creating a form.
* @return companyId
*/
- @javax.annotation.Nonnull
+ @javax.annotation.Nullable
public String getCompanyId() {
return companyId;
}
@@ -782,7 +782,14 @@ private String toIndentedString(Object o) {
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
- openapiRequiredFields.add("companyId");
+ openapiRequiredFields.add("name");
+ openapiRequiredFields.add("businessClassification");
+ openapiRequiredFields.add("address");
+ openapiRequiredFields.add("city");
+ openapiRequiredFields.add("state");
+ openapiRequiredFields.add("zip");
+ openapiRequiredFields.add("tinType");
+ openapiRequiredFields.add("tin");
}
/**
@@ -820,13 +827,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
TypeEnum.validateJsonElement(jsonObj.get("type"));
}
- if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
}
if ((jsonObj.get("businessName") != null && !jsonObj.get("businessName").isJsonNull()) && !jsonObj.get("businessName").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `businessName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName").toString()));
}
- if ((jsonObj.get("businessClassification") != null && !jsonObj.get("businessClassification").isJsonNull()) && !jsonObj.get("businessClassification").isJsonPrimitive()) {
+ 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()));
}
if ((jsonObj.get("businessOther") != null && !jsonObj.get("businessOther").isJsonNull()) && !jsonObj.get("businessOther").isJsonPrimitive()) {
@@ -838,7 +845,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("exemptFatcaCode") != null && !jsonObj.get("exemptFatcaCode").isJsonNull()) && !jsonObj.get("exemptFatcaCode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `exemptFatcaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptFatcaCode").toString()));
}
- if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ if (!jsonObj.get("address").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
}
if ((jsonObj.get("foreignAddress") != null && !jsonObj.get("foreignAddress").isJsonNull()) && !jsonObj.get("foreignAddress").isJsonPrimitive()) {
@@ -856,16 +863,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString()));
}
- if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ if (!jsonObj.get("tinType").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
}
- if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ if (!jsonObj.get("tin").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
}
if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
}
- if (!jsonObj.get("companyId").isJsonPrimitive()) {
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
}
if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java
index 5798a81..da7f003 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java
@@ -22,7 +22,6 @@
import java.util.Objects;
import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
import Avalara.SDK.model.A1099.V2.TinMatchStatusResponse;
-import Avalara.SDK.model.A1099.V2.W9FormBaseResponse;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -61,7 +60,69 @@
* W9FormResponse
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class W9FormResponse extends W9FormBaseResponse {
+public class W9FormResponse {
+ /**
+ * The form type (always \"W9\" for this model).
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ W4("W4"),
+
+ W8_BEN("W8Ben"),
+
+ W8_BEN_E("W8BenE"),
+
+ W8_IMY("W8Imy"),
+
+ W9("W9");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.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 TypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private TypeEnum type;
+
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
@@ -138,10 +199,79 @@ public class W9FormResponse extends W9FormBaseResponse {
@SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS)
private TinMatchStatusResponse tinMatchStatus;
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus";
+ @SerializedName(SERIALIZED_NAME_ENTRY_STATUS)
+ private EntryStatusResponse entryStatus;
+
+ public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
+ @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
+ private String referenceId;
+
+ public static final String SERIALIZED_NAME_COMPANY_ID = "companyId";
+ @SerializedName(SERIALIZED_NAME_COMPANY_ID)
+ private String companyId;
+
+ public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName";
+ @SerializedName(SERIALIZED_NAME_DISPLAY_NAME)
+ private String displayName;
+
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ARCHIVED = "archived";
+ @SerializedName(SERIALIZED_NAME_ARCHIVED)
+ private Boolean archived;
+
+ public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId";
+ @SerializedName(SERIALIZED_NAME_ANCESTOR_ID)
+ private String ancestorId;
+
+ public static final String SERIALIZED_NAME_SIGNATURE = "signature";
+ @SerializedName(SERIALIZED_NAME_SIGNATURE)
+ private String signature;
+
+ public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate";
+ @SerializedName(SERIALIZED_NAME_SIGNED_DATE)
+ private OffsetDateTime signedDate;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT)
+ private OffsetDateTime eDeliveryConsentedAt;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
public W9FormResponse() {
- this.type = this.getClass().getSimpleName();
}
+ public W9FormResponse(
+ TypeEnum type
+ ) {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * The form type (always \"W9\" for this model).
+ * @return type
+ */
+ @javax.annotation.Nullable
+ public TypeEnum getType() {
+ return type;
+ }
+
+
+
public W9FormResponse name(String name) {
this.name = name;
return this;
@@ -414,7 +544,7 @@ public W9FormResponse tinType(String tinType) {
}
/**
- * The type of TIN provided.
+ * Tax Identification Number (TIN) type.
* @return tinType
*/
@javax.annotation.Nullable
@@ -503,6 +633,253 @@ public void setTinMatchStatus(TinMatchStatusResponse tinMatchStatus) {
}
+ public W9FormResponse id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the form.
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ public W9FormResponse entryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ return this;
+ }
+
+ /**
+ * The entry status information for the form.
+ * @return entryStatus
+ */
+ @javax.annotation.Nullable
+ public EntryStatusResponse getEntryStatus() {
+ return entryStatus;
+ }
+
+ public void setEntryStatus(EntryStatusResponse entryStatus) {
+ this.entryStatus = entryStatus;
+ }
+
+
+ public W9FormResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
+ return this;
+ }
+
+ /**
+ * A reference identifier for the form.
+ * @return referenceId
+ */
+ @javax.annotation.Nullable
+ public String getReferenceId() {
+ return referenceId;
+ }
+
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
+ }
+
+
+ public W9FormResponse companyId(String companyId) {
+ this.companyId = companyId;
+ return this;
+ }
+
+ /**
+ * The ID of the associated company.
+ * @return companyId
+ */
+ @javax.annotation.Nullable
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ this.companyId = companyId;
+ }
+
+
+ public W9FormResponse displayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * The display name associated with the form.
+ * @return displayName
+ */
+ @javax.annotation.Nullable
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+
+ public W9FormResponse email(String email) {
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * The email address of the individual associated with the form.
+ * @return email
+ */
+ @javax.annotation.Nullable
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ public W9FormResponse archived(Boolean archived) {
+ this.archived = archived;
+ return this;
+ }
+
+ /**
+ * Indicates whether the form is archived.
+ * @return archived
+ */
+ @javax.annotation.Nullable
+ public Boolean getArchived() {
+ return archived;
+ }
+
+ public void setArchived(Boolean archived) {
+ this.archived = archived;
+ }
+
+
+ public W9FormResponse ancestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ return this;
+ }
+
+ /**
+ * Form ID of previous version.
+ * @return ancestorId
+ */
+ @javax.annotation.Nullable
+ public String getAncestorId() {
+ return ancestorId;
+ }
+
+ public void setAncestorId(String ancestorId) {
+ this.ancestorId = ancestorId;
+ }
+
+
+ public W9FormResponse signature(String signature) {
+ this.signature = signature;
+ return this;
+ }
+
+ /**
+ * The signature of the form.
+ * @return signature
+ */
+ @javax.annotation.Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ public void setSignature(String signature) {
+ this.signature = signature;
+ }
+
+
+ public W9FormResponse signedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ return this;
+ }
+
+ /**
+ * The date the form was signed.
+ * @return signedDate
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getSignedDate() {
+ return signedDate;
+ }
+
+ public void setSignedDate(OffsetDateTime signedDate) {
+ this.signedDate = signedDate;
+ }
+
+
+ public W9FormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ return this;
+ }
+
+ /**
+ * The date when e-delivery was consented.
+ * @return eDeliveryConsentedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime geteDeliveryConsentedAt() {
+ return eDeliveryConsentedAt;
+ }
+
+ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) {
+ this.eDeliveryConsentedAt = eDeliveryConsentedAt;
+ }
+
+
+ public W9FormResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * The creation date of the form.
+ * @return createdAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+
+ public W9FormResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * The last updated date of the form.
+ * @return updatedAt
+ */
+ @javax.annotation.Nullable
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -513,7 +890,8 @@ public boolean equals(Object o) {
return false;
}
W9FormResponse w9FormResponse = (W9FormResponse) o;
- return Objects.equals(this.name, w9FormResponse.name) &&
+ return Objects.equals(this.type, w9FormResponse.type) &&
+ Objects.equals(this.name, w9FormResponse.name) &&
Objects.equals(this.businessName, w9FormResponse.businessName) &&
Objects.equals(this.businessClassification, w9FormResponse.businessClassification) &&
Objects.equals(this.businessOther, w9FormResponse.businessOther) &&
@@ -532,7 +910,19 @@ public boolean equals(Object o) {
Objects.equals(this.backupWithholding, w9FormResponse.backupWithholding) &&
Objects.equals(this.is1099able, w9FormResponse.is1099able) &&
Objects.equals(this.tinMatchStatus, w9FormResponse.tinMatchStatus) &&
- super.equals(o);
+ Objects.equals(this.id, w9FormResponse.id) &&
+ Objects.equals(this.entryStatus, w9FormResponse.entryStatus) &&
+ Objects.equals(this.referenceId, w9FormResponse.referenceId) &&
+ Objects.equals(this.companyId, w9FormResponse.companyId) &&
+ Objects.equals(this.displayName, w9FormResponse.displayName) &&
+ Objects.equals(this.email, w9FormResponse.email) &&
+ Objects.equals(this.archived, w9FormResponse.archived) &&
+ Objects.equals(this.ancestorId, w9FormResponse.ancestorId) &&
+ Objects.equals(this.signature, w9FormResponse.signature) &&
+ Objects.equals(this.signedDate, w9FormResponse.signedDate) &&
+ Objects.equals(this.eDeliveryConsentedAt, w9FormResponse.eDeliveryConsentedAt) &&
+ Objects.equals(this.createdAt, w9FormResponse.createdAt) &&
+ Objects.equals(this.updatedAt, w9FormResponse.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -541,7 +931,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, super.hashCode());
+ return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -555,7 +945,7 @@ private static int hashCodeNullable(JsonNullable a) {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class W9FormResponse {\n");
- sb.append(" ").append(toIndentedString(super.toString())).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n");
sb.append(" businessClassification: ").append(toIndentedString(businessClassification)).append("\n");
@@ -575,6 +965,19 @@ public String toString() {
sb.append(" backupWithholding: ").append(toIndentedString(backupWithholding)).append("\n");
sb.append(" is1099able: ").append(toIndentedString(is1099able)).append("\n");
sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n");
+ sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
+ sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n");
+ sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
+ sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n");
+ sb.append(" signature: ").append(toIndentedString(signature)).append("\n");
+ sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n");
+ sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -597,6 +1000,7 @@ private String toIndentedString(Object o) {
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet();
+ openapiFields.add("type");
openapiFields.add("id");
openapiFields.add("entryStatus");
openapiFields.add("referenceId");
@@ -610,7 +1014,6 @@ private String toIndentedString(Object o) {
openapiFields.add("eDeliveryConsentedAt");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");
- openapiFields.add("type");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -636,6 +1039,85 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
+ }
+ // validate the optional field `type`
+ if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) {
+ TypeEnum.validateJsonElement(jsonObj.get("type"));
+ }
+ if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
+ }
+ if ((jsonObj.get("businessName") != null && !jsonObj.get("businessName").isJsonNull()) && !jsonObj.get("businessName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `businessName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName").toString()));
+ }
+ if ((jsonObj.get("businessClassification") != null && !jsonObj.get("businessClassification").isJsonNull()) && !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()));
+ }
+ 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()));
+ }
+ if ((jsonObj.get("exemptPayeeCode") != null && !jsonObj.get("exemptPayeeCode").isJsonNull()) && !jsonObj.get("exemptPayeeCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `exemptPayeeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptPayeeCode").toString()));
+ }
+ if ((jsonObj.get("exemptFatcaCode") != null && !jsonObj.get("exemptFatcaCode").isJsonNull()) && !jsonObj.get("exemptFatcaCode").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `exemptFatcaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptFatcaCode").toString()));
+ }
+ if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString()));
+ }
+ if ((jsonObj.get("foreignAddress") != null && !jsonObj.get("foreignAddress").isJsonNull()) && !jsonObj.get("foreignAddress").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `foreignAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignAddress").toString()));
+ }
+ if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString()));
+ }
+ 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()));
+ }
+ 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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString()));
+ }
+ if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString()));
+ }
+ if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString()));
+ }
+ // validate the optional field `tinMatchStatus`
+ if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) {
+ TinMatchStatusResponse.validateJsonElement(jsonObj.get("tinMatchStatus"));
+ }
+ if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
+ }
+ // validate the optional field `entryStatus`
+ if (jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) {
+ EntryStatusResponse.validateJsonElement(jsonObj.get("entryStatus"));
+ }
+ if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString()));
+ }
+ if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString()));
+ }
+ if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString()));
+ }
+ if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString()));
+ }
+ if ((jsonObj.get("ancestorId") != null && !jsonObj.get("ancestorId").isJsonNull()) && !jsonObj.get("ancestorId").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `ancestorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ancestorId").toString()));
+ }
+ if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString()));
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {