(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
@@ -1070,6 +1259,7 @@ public SendW9FormEmailRequest getSendW9FormEmailRequest() {
| 200 | The updated W9/W4/W8 form | - |
| 400 | Bad request (e.g., invalid sort key) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call updateW9FormCall(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1118,7 +1308,7 @@ public okhttp3.Call updateW9FormCall(UpdateW9FormRequest requestParameters, fina
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1164,6 +1354,7 @@ private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestP
| 200 | The updated W9/W4/W8 form | - |
| 400 | Bad request (e.g., invalid sort key) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException {
@@ -1183,6 +1374,7 @@ public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters
| 200 | The updated W9/W4/W8 form | - |
| 400 | Bad request (e.g., invalid sort key) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException {
@@ -1204,6 +1396,7 @@ public ApiResponse updateW9FormWithHttpInfo(UpdateW9Form
| 200 | The updated W9/W4/W8 form | - |
| 400 | Bad request (e.g., invalid sort key) | - |
| 401 | Authentication failed | - |
+ | 404 | W9/W4/W8 form not found | - |
*/
public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException {
@@ -1317,7 +1510,7 @@ public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, fi
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1452,7 +1645,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 d96c3b6..0f84317 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.IssuerCommand;
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.getIssuerCommand();
+ Object localVarPostBody = requestParameters.getCreateIssuerRequest();
// create path and map variables
String localVarPath = "/1099/issuers";
@@ -136,7 +136,7 @@ public okhttp3.Call createIssuerCall(CreateIssuerRequest requestParameters, fina
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -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 issuerCommand The issuer to create (optional)
+ * @param createIssuerRequest The issuer to create (optional)
*/
public class CreateIssuerRequest {
private String avalaraVersion;
private String xCorrelationId;
private String xAvalaraClient;
- private IssuerCommand issuerCommand;
+ private CreateIssuerRequest createIssuerRequest;
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 IssuerCommand getIssuerCommand() { return issuerCommand; }
- public void setIssuerCommand(IssuerCommand issuerCommand) { this.issuerCommand = issuerCommand; }
+ public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; }
+ public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; }
}
/**
@@ -321,7 +321,7 @@ public okhttp3.Call deleteIssuerCall(DeleteIssuerRequest requestParameters, fina
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -507,7 +507,7 @@ public okhttp3.Call getIssuerCall(GetIssuerRequest requestParameters, final ApiC
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -722,7 +722,7 @@ public okhttp3.Call getIssuersCall(GetIssuersRequest requestParameters, final Ap
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -906,7 +906,7 @@ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, fina
basePath = null;
}
- Object localVarPostBody = requestParameters.getIssuerCommand();
+ Object localVarPostBody = requestParameters.getCreateIssuerRequest();
// create path and map variables
String localVarPath = "/1099/issuers/{id}"
@@ -934,7 +934,7 @@ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, fina
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -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 issuerCommand The issuer to update (optional)
+ * @param createIssuerRequest The issuer to update (optional)
*/
public class UpdateIssuerRequest {
private String id;
private String avalaraVersion;
private String xCorrelationId;
private String xAvalaraClient;
- private IssuerCommand issuerCommand;
+ private CreateIssuerRequest createIssuerRequest;
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 IssuerCommand getIssuerCommand() { return issuerCommand; }
- public void setIssuerCommand(IssuerCommand issuerCommand) { this.issuerCommand = issuerCommand; }
+ public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; }
+ public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; }
}
/**
@@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java
index 2d09c2a..1504b07 100644
--- a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java
+++ b/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java
@@ -137,7 +137,7 @@ public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallbac
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("");
}
}
diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java
new file mode 100644
index 0000000..063d99d
--- /dev/null
+++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java
@@ -0,0 +1,281 @@
+/*
+ * 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.api.A1099.V2;
+
+import Avalara.SDK.ApiCallback;
+import Avalara.SDK.ApiClient;
+import Avalara.SDK.ApiException;
+import Avalara.SDK.ApiResponse;
+import Avalara.SDK.Configuration;
+import Avalara.SDK.Pair;
+import Avalara.SDK.ProgressRequestBody;
+import Avalara.SDK.ProgressResponseBody;
+import Avalara.SDK.AvalaraMicroservice;
+
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+import java.util.*;
+
+
+import Avalara.SDK.model.A1099.V2.ErrorResponse;
+import Avalara.SDK.model.A1099.V2.JobResponse;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class JobsApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public JobsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ SetConfiguration(apiClient);
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for getJob
+ * @param requestOptions Object which represents the options available for a given API/request
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Success | - |
+ | 400 | Bad Request | - |
+ | 404 | Not Found | - |
+ | 500 | Server Error | - |
+ | 401 | Unauthorized | - |
+
+ */
+ public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ //OAuth2 Scopes
+ String requiredScopes = "";
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/jobs/{id}"
+ .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (requestParameters.getAvalaraVersion() != null) {
+ localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
+ }
+
+ if (requestParameters.getXCorrelationId() != null) {
+ localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId()));
+ }
+
+ if (requestParameters.getXAvalaraClient() != null) {
+ localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+ String[] localVarAuthNames = new String[] { "OAuth", "bearer" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'requestParameters.id' is set
+ if (requestParameters.getId() == null) {
+ throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getJob(Async)");
+ }
+
+ // verify the required parameter 'requestParameters.avalaraVersion' is set
+ if (requestParameters.getAvalaraVersion() == null) {
+ throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getJob(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = getJobCall(requestParameters, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Retrieves information about the job
+ * Retrieves information about the job
+ * @param requestOptions Object which represents the options available for a given API/request
+ * @return JobResponse
+ * @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 | Success | - |
+ | 400 | Bad Request | - |
+ | 404 | Not Found | - |
+ | 500 | Server Error | - |
+ | 401 | Unauthorized | - |
+
+ */
+ public JobResponse getJob(GetJobRequest requestParameters) throws ApiException {
+ ApiResponse localVarResp = getJobWithHttpInfo(requestParameters);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Retrieves information about the job
+ * Retrieves information about the job
+ * @param requestOptions Object which represents the options available for a given API/request
+ * @return ApiResponse<JobResponse>
+ * @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 | Success | - |
+ | 400 | Bad Request | - |
+ | 404 | Not Found | - |
+ | 500 | Server Error | - |
+ | 401 | Unauthorized | - |
+
+ */
+ public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters) throws ApiException {
+ okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Retrieves information about the job (asynchronously)
+ * Retrieves information about the job
+ * @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
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Success | - |
+ | 400 | Bad Request | - |
+ | 404 | Not Found | - |
+ | 500 | Server Error | - |
+ | 401 | Unauthorized | - |
+
+ */
+ public okhttp3.Call getJobAsync(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Represents the Request object for the GetJob API
+ *
+ * @param id Job id obtained from other API responses, like `/1099/bulk-upsert`.
+ * @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)
+ */
+ public class GetJobRequest {
+ private String id;
+ private String avalaraVersion;
+ private String xCorrelationId;
+ private String xAvalaraClient;
+
+ public GetJobRequest () {
+ }
+
+ public String getId() { return id; }
+ public void setId(String id) { this.id = id; }
+ public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; }
+ public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
+ public String getXCorrelationId() { return xCorrelationId; }
+ public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; }
+ public String getXAvalaraClient() { return xAvalaraClient; }
+ public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
+ }
+
+ /**
+ * Getter function to instantiate Request class
+ * @returns GetJobRequest
+ */
+ public GetJobRequest getGetJobRequest() {
+ return this.new GetJobRequest();
+ }
+
+ private void SetConfiguration(ApiClient client) {
+ if (client == null) throw new MissingFormatArgumentException("client");
+ this.localVarApiClient.setSdkVersion("25.8.3");
+ }
+}
+
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 73a00e4..bf1883f 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java
@@ -152,7 +152,7 @@ public okhttp3.Call getDataInputFieldsCall(GetDataInputFieldsRequest requestPara
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 531d0e6..2100ede 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java
@@ -149,7 +149,7 @@ public okhttp3.Call downloadDocumentCall(DownloadDocumentRequest requestParamete
"application/pdf", "application/xml", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -346,7 +346,7 @@ public okhttp3.Call fetchDocumentsCall(FetchDocumentsRequest requestParameters,
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -563,7 +563,7 @@ public okhttp3.Call getDocumentListCall(GetDocumentListRequest requestParameters
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -772,7 +772,7 @@ public okhttp3.Call getDocumentStatusCall(GetDocumentStatusRequest requestParame
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -965,7 +965,7 @@ public okhttp3.Call submitDocumentCall(SubmitDocumentRequest requestParameters,
"application/json", "text/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1105,7 +1105,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 d133bde..1e8659e 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java
@@ -149,7 +149,7 @@ public okhttp3.Call submitInteropDocumentCall(SubmitInteropDocumentRequest reque
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 ead2247..4672dfd 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java
@@ -146,7 +146,7 @@ public okhttp3.Call getMandateDataInputFieldsCall(GetMandateDataInputFieldsReque
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -376,7 +376,7 @@ public okhttp3.Call getMandatesCall(GetMandatesRequest requestParameters, final
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 af363c5..25a1e9c 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java
@@ -138,7 +138,7 @@ public okhttp3.Call createWebhookSubscriptionCall(CreateWebhookSubscriptionReque
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -332,7 +332,7 @@ public okhttp3.Call deleteWebhookSubscriptionCall(DeleteWebhookSubscriptionReque
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -522,7 +522,7 @@ public okhttp3.Call getWebhookSubscriptionCall(GetWebhookSubscriptionRequest req
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -731,7 +731,7 @@ public okhttp3.Call listWebhookSubscriptionsCall(ListWebhookSubscriptionsRequest
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -873,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 984fd9c..b5e2c83 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java
@@ -146,7 +146,7 @@ public okhttp3.Call taxIdentifierSchemaByCountryCall(TaxIdentifierSchemaByCountr
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -348,7 +348,7 @@ public okhttp3.Call validateTaxIdentifierCall(ValidateTaxIdentifierRequest reque
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -489,7 +489,7 @@ public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
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 4074d60..1609bdd 100644
--- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java
+++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java
@@ -157,7 +157,7 @@ public okhttp3.Call batchSearchParticipantsCall(BatchSearchParticipantsRequest r
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -373,7 +373,7 @@ public okhttp3.Call createTradingPartnerCall(CreateTradingPartnerRequest request
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -575,7 +575,7 @@ public okhttp3.Call createTradingPartnersBatchCall(CreateTradingPartnersBatchReq
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -779,7 +779,7 @@ public okhttp3.Call deleteTradingPartnerCall(DeleteTradingPartnerRequest request
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -973,7 +973,7 @@ public okhttp3.Call downloadBatchSearchReportCall(DownloadBatchSearchReportReque
"text/csv", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1171,7 +1171,7 @@ public okhttp3.Call getBatchSearchDetailCall(GetBatchSearchDetailRequest request
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1388,7 +1388,7 @@ public okhttp3.Call listBatchSearchesCall(ListBatchSearchesRequest requestParame
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1620,7 +1620,7 @@ public okhttp3.Call searchParticipantsCall(SearchParticipantsRequest requestPara
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1840,7 +1840,7 @@ public okhttp3.Call updateTradingPartnerCall(UpdateTradingPartnerRequest request
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
+ if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) {
localVarHeaderParams.put("Accept", localVarAccept);
}
@@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() {
private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
- this.localVarApiClient.setSdkVersion("25.8.2");
+ this.localVarApiClient.setSdkVersion("25.8.3");
}
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java
index 2f28f64..686ea5f 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java
@@ -62,6 +62,10 @@ public class CompanyCreateUpdateRequestModel {
@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;
@@ -90,10 +94,6 @@ public class CompanyCreateUpdateRequestModel {
@SerializedName(SERIALIZED_NAME_TIN)
private String tin;
- public static final String SERIALIZED_NAME_DBA_NAME = "dbaName";
- @SerializedName(SERIALIZED_NAME_DBA_NAME)
- private String dbaName;
-
public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
@SerializedName(SERIALIZED_NAME_REFERENCE_ID)
private String referenceId;
@@ -135,7 +135,7 @@ public CompanyCreateUpdateRequestModel name(String name) {
}
/**
- * Get name
+ * Legal name. Not the DBA name.
* @return name
*/
@javax.annotation.Nullable
@@ -148,13 +148,32 @@ public void setName(String name) {
}
+ public CompanyCreateUpdateRequestModel 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 CompanyCreateUpdateRequestModel email(String email) {
this.email = email;
return this;
}
/**
- * Get email
+ * Contact email address. For inquiries by vendors/employees.
* @return email
*/
@javax.annotation.Nullable
@@ -173,7 +192,7 @@ public CompanyCreateUpdateRequestModel address(String address) {
}
/**
- * Get address
+ * Address.
* @return address
*/
@javax.annotation.Nullable
@@ -192,7 +211,7 @@ public CompanyCreateUpdateRequestModel city(String city) {
}
/**
- * Get city
+ * City.
* @return city
*/
@javax.annotation.Nullable
@@ -211,7 +230,7 @@ public CompanyCreateUpdateRequestModel state(String state) {
}
/**
- * Get state
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
* @return state
*/
@javax.annotation.Nullable
@@ -230,7 +249,7 @@ public CompanyCreateUpdateRequestModel zip(String zip) {
}
/**
- * Get zip
+ * ZIP/postal code.
* @return zip
*/
@javax.annotation.Nullable
@@ -249,7 +268,7 @@ public CompanyCreateUpdateRequestModel telephone(String telephone) {
}
/**
- * Get telephone
+ * Contact phone number (must contain at least 10 digits, max 15 characters).
* @return telephone
*/
@javax.annotation.Nullable
@@ -268,7 +287,7 @@ public CompanyCreateUpdateRequestModel tin(String tin) {
}
/**
- * Get tin
+ * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies).
* @return tin
*/
@javax.annotation.Nullable
@@ -281,32 +300,13 @@ public void setTin(String tin) {
}
- public CompanyCreateUpdateRequestModel dbaName(String dbaName) {
- this.dbaName = dbaName;
- return this;
- }
-
- /**
- * Get dbaName
- * @return dbaName
- */
- @javax.annotation.Nullable
- public String getDbaName() {
- return dbaName;
- }
-
- public void setDbaName(String dbaName) {
- this.dbaName = dbaName;
- }
-
-
public CompanyCreateUpdateRequestModel referenceId(String referenceId) {
this.referenceId = referenceId;
return this;
}
/**
- * Get referenceId
+ * Internal reference ID. Never shown to any agency or recipient.
* @return referenceId
*/
@javax.annotation.Nullable
@@ -325,7 +325,7 @@ public CompanyCreateUpdateRequestModel doTinMatch(Boolean doTinMatch) {
}
/**
- * Get doTinMatch
+ * Indicates whether the company authorizes IRS TIN matching.
* @return doTinMatch
*/
@javax.annotation.Nullable
@@ -344,7 +344,7 @@ public CompanyCreateUpdateRequestModel groupName(String groupName) {
}
/**
- * Get groupName
+ * Group name for organizing companies (creates or finds group by name).
* @return groupName
*/
@javax.annotation.Nullable
@@ -363,7 +363,7 @@ public CompanyCreateUpdateRequestModel foreignProvince(String foreignProvince) {
}
/**
- * Get foreignProvince
+ * Province or region for non-US/CA addresses.
* @return foreignProvince
*/
@javax.annotation.Nullable
@@ -382,7 +382,7 @@ public CompanyCreateUpdateRequestModel countryCode(String countryCode) {
}
/**
- * Get countryCode
+ * 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
@@ -401,7 +401,7 @@ public CompanyCreateUpdateRequestModel resendRequests(Boolean resendRequests) {
}
/**
- * Get resendRequests
+ * Boolean to enable automatic reminder emails (default: false).
* @return resendRequests
*/
@javax.annotation.Nullable
@@ -420,7 +420,7 @@ public CompanyCreateUpdateRequestModel resendIntervalDays(Integer resendInterval
}
/**
- * Get resendIntervalDays
+ * Days between reminder emails (7-365, required if resendRequests is true).
* @return resendIntervalDays
*/
@javax.annotation.Nullable
@@ -439,7 +439,7 @@ public CompanyCreateUpdateRequestModel maxReminderAttempts(Integer maxReminderAt
}
/**
- * Get maxReminderAttempts
+ * Maximum number of reminder attempts (1-52, required if resendRequests is true).
* @return maxReminderAttempts
*/
@javax.annotation.Nullable
@@ -463,6 +463,7 @@ public boolean equals(Object o) {
}
CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = (CompanyCreateUpdateRequestModel) o;
return Objects.equals(this.name, companyCreateUpdateRequestModel.name) &&
+ Objects.equals(this.dbaName, companyCreateUpdateRequestModel.dbaName) &&
Objects.equals(this.email, companyCreateUpdateRequestModel.email) &&
Objects.equals(this.address, companyCreateUpdateRequestModel.address) &&
Objects.equals(this.city, companyCreateUpdateRequestModel.city) &&
@@ -470,7 +471,6 @@ public boolean equals(Object o) {
Objects.equals(this.zip, companyCreateUpdateRequestModel.zip) &&
Objects.equals(this.telephone, companyCreateUpdateRequestModel.telephone) &&
Objects.equals(this.tin, companyCreateUpdateRequestModel.tin) &&
- Objects.equals(this.dbaName, companyCreateUpdateRequestModel.dbaName) &&
Objects.equals(this.referenceId, companyCreateUpdateRequestModel.referenceId) &&
Objects.equals(this.doTinMatch, companyCreateUpdateRequestModel.doTinMatch) &&
Objects.equals(this.groupName, companyCreateUpdateRequestModel.groupName) &&
@@ -487,7 +487,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(name, email, address, city, state, zip, telephone, tin, dbaName, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts);
+ 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) {
@@ -502,6 +502,7 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CompanyCreateUpdateRequestModel {\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");
@@ -509,7 +510,6 @@ public String toString() {
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(" dbaName: ").append(toIndentedString(dbaName)).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");
@@ -541,6 +541,7 @@ private String toIndentedString(Object o) {
// 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");
@@ -548,7 +549,6 @@ private String toIndentedString(Object o) {
openapiFields.add("zip");
openapiFields.add("telephone");
openapiFields.add("tin");
- openapiFields.add("dbaName");
openapiFields.add("referenceId");
openapiFields.add("doTinMatch");
openapiFields.add("groupName");
@@ -560,6 +560,14 @@ private String toIndentedString(Object o) {
// 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");
}
/**
@@ -582,10 +590,20 @@ 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 `CompanyCreateUpdateRequestModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CompanyCreateUpdateRequestModel.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()));
}
@@ -607,9 +625,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
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("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("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()));
}
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java
index fe54e4e..6d5c0ca 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java
@@ -63,13 +63,13 @@ public class CompanyResponse {
@SerializedName(SERIALIZED_NAME_ID)
private String id;
- public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
- @SerializedName(SERIALIZED_NAME_REFERENCE_ID)
- private String referenceId;
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
- public static final String SERIALIZED_NAME_GROUP_NAME = "groupName";
- @SerializedName(SERIALIZED_NAME_GROUP_NAME)
- private String groupName;
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
@@ -79,6 +79,10 @@ public class CompanyResponse {
@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;
@@ -91,22 +95,10 @@ public class CompanyResponse {
@SerializedName(SERIALIZED_NAME_STATE)
private String state;
- public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince";
- @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE)
- private String foreignProvince;
-
public static final String SERIALIZED_NAME_ZIP = "zip";
@SerializedName(SERIALIZED_NAME_ZIP)
private String zip;
- 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_TELEPHONE = "telephone";
@SerializedName(SERIALIZED_NAME_TELEPHONE)
private String telephone;
@@ -115,10 +107,26 @@ public class CompanyResponse {
@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;
@@ -131,14 +139,6 @@ public class CompanyResponse {
@SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS)
private Integer maxReminderAttempts;
- 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 CompanyResponse() {
}
@@ -148,7 +148,7 @@ public CompanyResponse id(String id) {
}
/**
- * Get id
+ * Unique identifier set when the record is created.
* @return id
*/
@javax.annotation.Nullable
@@ -161,41 +161,41 @@ public void setId(String id) {
}
- public CompanyResponse referenceId(String referenceId) {
- this.referenceId = referenceId;
+ public CompanyResponse createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
return this;
}
/**
- * Get referenceId
- * @return referenceId
+ * Date time when the record was created.
+ * @return createdAt
*/
@javax.annotation.Nullable
- public String getReferenceId() {
- return referenceId;
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
}
- public void setReferenceId(String referenceId) {
- this.referenceId = referenceId;
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
}
- public CompanyResponse groupName(String groupName) {
- this.groupName = groupName;
+ public CompanyResponse updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
return this;
}
/**
- * Get groupName
- * @return groupName
+ * Date time when the record was last updated.
+ * @return updatedAt
*/
@javax.annotation.Nullable
- public String getGroupName() {
- return groupName;
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
}
- public void setGroupName(String groupName) {
- this.groupName = groupName;
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
}
@@ -205,7 +205,7 @@ public CompanyResponse name(String name) {
}
/**
- * Get name
+ * Legal name. Not the DBA name.
* @return name
*/
@javax.annotation.Nullable
@@ -224,7 +224,7 @@ public CompanyResponse dbaName(String dbaName) {
}
/**
- * Get dbaName
+ * Doing Business As (DBA) name or continuation of a long legal name.
* @return dbaName
*/
@javax.annotation.Nullable
@@ -237,13 +237,32 @@ public void setDbaName(String dbaName) {
}
+ public CompanyResponse 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 CompanyResponse address(String address) {
this.address = address;
return this;
}
/**
- * Get address
+ * Address.
* @return address
*/
@javax.annotation.Nullable
@@ -262,7 +281,7 @@ public CompanyResponse city(String city) {
}
/**
- * Get city
+ * City.
* @return city
*/
@javax.annotation.Nullable
@@ -281,7 +300,7 @@ public CompanyResponse state(String state) {
}
/**
- * Get state
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
* @return state
*/
@javax.annotation.Nullable
@@ -294,136 +313,155 @@ public void setState(String state) {
}
- public CompanyResponse foreignProvince(String foreignProvince) {
- this.foreignProvince = foreignProvince;
+ public CompanyResponse zip(String zip) {
+ this.zip = zip;
return this;
}
/**
- * Get foreignProvince
- * @return foreignProvince
+ * ZIP/postal code.
+ * @return zip
*/
@javax.annotation.Nullable
- public String getForeignProvince() {
- return foreignProvince;
+ public String getZip() {
+ return zip;
}
- public void setForeignProvince(String foreignProvince) {
- this.foreignProvince = foreignProvince;
+ public void setZip(String zip) {
+ this.zip = zip;
}
- public CompanyResponse zip(String zip) {
- this.zip = zip;
+ public CompanyResponse telephone(String telephone) {
+ this.telephone = telephone;
return this;
}
/**
- * Get zip
- * @return zip
+ * Contact phone number (must contain at least 10 digits, max 15 characters).
+ * @return telephone
*/
@javax.annotation.Nullable
- public String getZip() {
- return zip;
+ public String getTelephone() {
+ return telephone;
}
- public void setZip(String zip) {
- this.zip = zip;
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
}
- public CompanyResponse countryCode(String countryCode) {
- this.countryCode = countryCode;
+ public CompanyResponse tin(String tin) {
+ this.tin = tin;
return this;
}
/**
- * Get countryCode
- * @return countryCode
+ * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies).
+ * @return tin
*/
@javax.annotation.Nullable
- public String getCountryCode() {
- return countryCode;
+ public String getTin() {
+ return tin;
}
- public void setCountryCode(String countryCode) {
- this.countryCode = countryCode;
+ public void setTin(String tin) {
+ this.tin = tin;
}
- public CompanyResponse email(String email) {
- this.email = email;
+ public CompanyResponse referenceId(String referenceId) {
+ this.referenceId = referenceId;
return this;
}
/**
- * Get email
- * @return email
+ * Internal reference ID. Never shown to any agency or recipient.
+ * @return referenceId
*/
@javax.annotation.Nullable
- public String getEmail() {
- return email;
+ public String getReferenceId() {
+ return referenceId;
}
- public void setEmail(String email) {
- this.email = email;
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
}
- public CompanyResponse telephone(String telephone) {
- this.telephone = telephone;
+ public CompanyResponse doTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
return this;
}
/**
- * Get telephone
- * @return telephone
+ * Indicates whether the company authorizes IRS TIN matching.
+ * @return doTinMatch
*/
@javax.annotation.Nullable
- public String getTelephone() {
- return telephone;
+ public Boolean getDoTinMatch() {
+ return doTinMatch;
}
- public void setTelephone(String telephone) {
- this.telephone = telephone;
+ public void setDoTinMatch(Boolean doTinMatch) {
+ this.doTinMatch = doTinMatch;
}
- public CompanyResponse tin(String tin) {
- this.tin = tin;
+ public CompanyResponse groupName(String groupName) {
+ this.groupName = groupName;
return this;
}
/**
- * Get tin
- * @return tin
+ * Group name for organizing companies (creates or finds group by name).
+ * @return groupName
*/
@javax.annotation.Nullable
- public String getTin() {
- return tin;
+ public String getGroupName() {
+ return groupName;
}
- public void setTin(String tin) {
- this.tin = tin;
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
}
- public CompanyResponse doTinMatch(Boolean doTinMatch) {
- this.doTinMatch = doTinMatch;
+ public CompanyResponse foreignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
return this;
}
/**
- * Get doTinMatch
- * @return doTinMatch
+ * Province or region for non-US/CA addresses.
+ * @return foreignProvince
*/
@javax.annotation.Nullable
- public Boolean getDoTinMatch() {
- return doTinMatch;
+ public String getForeignProvince() {
+ return foreignProvince;
}
- public void setDoTinMatch(Boolean doTinMatch) {
- this.doTinMatch = doTinMatch;
+ public void setForeignProvince(String foreignProvince) {
+ this.foreignProvince = foreignProvince;
+ }
+
+
+ public CompanyResponse 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;
}
@@ -433,7 +471,7 @@ public CompanyResponse resendRequests(Boolean resendRequests) {
}
/**
- * Get resendRequests
+ * Boolean to enable automatic reminder emails (default: false).
* @return resendRequests
*/
@javax.annotation.Nullable
@@ -452,7 +490,7 @@ public CompanyResponse resendIntervalDays(Integer resendIntervalDays) {
}
/**
- * Get resendIntervalDays
+ * Days between reminder emails (7-365, required if resendRequests is true).
* @return resendIntervalDays
*/
@javax.annotation.Nullable
@@ -471,7 +509,7 @@ public CompanyResponse maxReminderAttempts(Integer maxReminderAttempts) {
}
/**
- * Get maxReminderAttempts
+ * Maximum number of reminder attempts (1-52, required if resendRequests is true).
* @return maxReminderAttempts
*/
@javax.annotation.Nullable
@@ -484,44 +522,6 @@ public void setMaxReminderAttempts(Integer maxReminderAttempts) {
}
- public CompanyResponse createdAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
-
- /**
- * Get createdAt
- * @return createdAt
- */
- @javax.annotation.Nullable
- public OffsetDateTime getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- }
-
-
- public CompanyResponse updatedAt(OffsetDateTime updatedAt) {
- this.updatedAt = updatedAt;
- return this;
- }
-
- /**
- * Get updatedAt
- * @return updatedAt
- */
- @javax.annotation.Nullable
- public OffsetDateTime getUpdatedAt() {
- return updatedAt;
- }
-
- public void setUpdatedAt(OffsetDateTime updatedAt) {
- this.updatedAt = updatedAt;
- }
-
-
@Override
public boolean equals(Object o) {
@@ -533,25 +533,25 @@ public boolean equals(Object o) {
}
CompanyResponse companyResponse = (CompanyResponse) o;
return Objects.equals(this.id, companyResponse.id) &&
- Objects.equals(this.referenceId, companyResponse.referenceId) &&
- Objects.equals(this.groupName, companyResponse.groupName) &&
+ Objects.equals(this.createdAt, companyResponse.createdAt) &&
+ Objects.equals(this.updatedAt, companyResponse.updatedAt) &&
Objects.equals(this.name, companyResponse.name) &&
Objects.equals(this.dbaName, companyResponse.dbaName) &&
+ Objects.equals(this.email, companyResponse.email) &&
Objects.equals(this.address, companyResponse.address) &&
Objects.equals(this.city, companyResponse.city) &&
Objects.equals(this.state, companyResponse.state) &&
- Objects.equals(this.foreignProvince, companyResponse.foreignProvince) &&
Objects.equals(this.zip, companyResponse.zip) &&
- Objects.equals(this.countryCode, companyResponse.countryCode) &&
- Objects.equals(this.email, companyResponse.email) &&
Objects.equals(this.telephone, companyResponse.telephone) &&
Objects.equals(this.tin, companyResponse.tin) &&
+ Objects.equals(this.referenceId, companyResponse.referenceId) &&
Objects.equals(this.doTinMatch, companyResponse.doTinMatch) &&
+ Objects.equals(this.groupName, companyResponse.groupName) &&
+ Objects.equals(this.foreignProvince, companyResponse.foreignProvince) &&
+ Objects.equals(this.countryCode, companyResponse.countryCode) &&
Objects.equals(this.resendRequests, companyResponse.resendRequests) &&
Objects.equals(this.resendIntervalDays, companyResponse.resendIntervalDays) &&
- Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts) &&
- Objects.equals(this.createdAt, companyResponse.createdAt) &&
- Objects.equals(this.updatedAt, companyResponse.updatedAt);
+ Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -560,7 +560,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(id, referenceId, groupName, name, dbaName, address, city, state, foreignProvince, zip, countryCode, email, telephone, tin, doTinMatch, resendRequests, resendIntervalDays, maxReminderAttempts, createdAt, updatedAt);
+ return Objects.hash(id, createdAt, updatedAt, name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -575,25 +575,25 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CompanyResponse {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n");
- sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n");
sb.append(" zip: ").append(toIndentedString(zip)).append("\n");
- sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
- sb.append(" email: ").append(toIndentedString(email)).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(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
- sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -616,9 +616,34 @@ private String toIndentedString(Object o) {
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");
}
/**
@@ -641,22 +666,26 @@ 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 `CompanyResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CompanyResponse.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("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()));
}
- 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("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()));
}
@@ -666,24 +695,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString()));
}
- 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("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("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("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 {
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java
new file mode 100644
index 0000000..c645bf3
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java
@@ -0,0 +1,742 @@
+/*
+ * 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.time.LocalDate;
+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;
+
+/**
+ * Covered individual information for health coverage forms
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CoveredIndividual {
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
+
+ public static final String SERIALIZED_NAME_FIRST_NAME = "firstName";
+ @SerializedName(SERIALIZED_NAME_FIRST_NAME)
+ private String firstName;
+
+ public static final String SERIALIZED_NAME_MIDDLE_NAME = "middleName";
+ @SerializedName(SERIALIZED_NAME_MIDDLE_NAME)
+ private String middleName;
+
+ public static final String SERIALIZED_NAME_LAST_NAME = "lastName";
+ @SerializedName(SERIALIZED_NAME_LAST_NAME)
+ private String lastName;
+
+ public static final String SERIALIZED_NAME_NAME_SUFFIX = "nameSuffix";
+ @SerializedName(SERIALIZED_NAME_NAME_SUFFIX)
+ private String nameSuffix;
+
+ public static final String SERIALIZED_NAME_TIN = "tin";
+ @SerializedName(SERIALIZED_NAME_TIN)
+ private String tin;
+
+ public static final String SERIALIZED_NAME_BIRTH_DATE = "birthDate";
+ @SerializedName(SERIALIZED_NAME_BIRTH_DATE)
+ private LocalDate birthDate;
+
+ public static final String SERIALIZED_NAME_COVERED_ALL_MONTHS = "coveredAllMonths";
+ @SerializedName(SERIALIZED_NAME_COVERED_ALL_MONTHS)
+ private Boolean coveredAllMonths;
+
+ public static final String SERIALIZED_NAME_COVERED_JANUARY = "coveredJanuary";
+ @SerializedName(SERIALIZED_NAME_COVERED_JANUARY)
+ private Boolean coveredJanuary;
+
+ public static final String SERIALIZED_NAME_COVERED_FEBRUARY = "coveredFebruary";
+ @SerializedName(SERIALIZED_NAME_COVERED_FEBRUARY)
+ private Boolean coveredFebruary;
+
+ public static final String SERIALIZED_NAME_COVERED_MARCH = "coveredMarch";
+ @SerializedName(SERIALIZED_NAME_COVERED_MARCH)
+ private Boolean coveredMarch;
+
+ public static final String SERIALIZED_NAME_COVERED_APRIL = "coveredApril";
+ @SerializedName(SERIALIZED_NAME_COVERED_APRIL)
+ private Boolean coveredApril;
+
+ public static final String SERIALIZED_NAME_COVERED_MAY = "coveredMay";
+ @SerializedName(SERIALIZED_NAME_COVERED_MAY)
+ private Boolean coveredMay;
+
+ public static final String SERIALIZED_NAME_COVERED_JUNE = "coveredJune";
+ @SerializedName(SERIALIZED_NAME_COVERED_JUNE)
+ private Boolean coveredJune;
+
+ public static final String SERIALIZED_NAME_COVERED_JULY = "coveredJuly";
+ @SerializedName(SERIALIZED_NAME_COVERED_JULY)
+ private Boolean coveredJuly;
+
+ public static final String SERIALIZED_NAME_COVERED_AUGUST = "coveredAugust";
+ @SerializedName(SERIALIZED_NAME_COVERED_AUGUST)
+ private Boolean coveredAugust;
+
+ public static final String SERIALIZED_NAME_COVERED_SEPTEMBER = "coveredSeptember";
+ @SerializedName(SERIALIZED_NAME_COVERED_SEPTEMBER)
+ private Boolean coveredSeptember;
+
+ public static final String SERIALIZED_NAME_COVERED_OCTOBER = "coveredOctober";
+ @SerializedName(SERIALIZED_NAME_COVERED_OCTOBER)
+ private Boolean coveredOctober;
+
+ public static final String SERIALIZED_NAME_COVERED_NOVEMBER = "coveredNovember";
+ @SerializedName(SERIALIZED_NAME_COVERED_NOVEMBER)
+ private Boolean coveredNovember;
+
+ public static final String SERIALIZED_NAME_COVERED_DECEMBER = "coveredDecember";
+ @SerializedName(SERIALIZED_NAME_COVERED_DECEMBER)
+ private Boolean coveredDecember;
+
+ public CoveredIndividual() {
+ }
+
+ public CoveredIndividual(
+ String id
+ ) {
+ this();
+ this.id = id;
+ }
+
+ /**
+ * Covered individual's ID
+ * @return id
+ */
+ @javax.annotation.Nullable
+ public String getId() {
+ return id;
+ }
+
+
+
+ public CoveredIndividual firstName(String firstName) {
+ this.firstName = firstName;
+ return this;
+ }
+
+ /**
+ * Covered individual's first name
+ * @return firstName
+ */
+ @javax.annotation.Nullable
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+
+ public CoveredIndividual middleName(String middleName) {
+ this.middleName = middleName;
+ return this;
+ }
+
+ /**
+ * Covered individual's middle name
+ * @return middleName
+ */
+ @javax.annotation.Nullable
+ public String getMiddleName() {
+ return middleName;
+ }
+
+ public void setMiddleName(String middleName) {
+ this.middleName = middleName;
+ }
+
+
+ public CoveredIndividual lastName(String lastName) {
+ this.lastName = lastName;
+ return this;
+ }
+
+ /**
+ * Covered individual's last name
+ * @return lastName
+ */
+ @javax.annotation.Nullable
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+
+ public CoveredIndividual nameSuffix(String nameSuffix) {
+ this.nameSuffix = nameSuffix;
+ return this;
+ }
+
+ /**
+ * Covered individual's name suffix
+ * @return nameSuffix
+ */
+ @javax.annotation.Nullable
+ public String getNameSuffix() {
+ return nameSuffix;
+ }
+
+ public void setNameSuffix(String nameSuffix) {
+ this.nameSuffix = nameSuffix;
+ }
+
+
+ public CoveredIndividual tin(String tin) {
+ this.tin = tin;
+ return this;
+ }
+
+ /**
+ * Covered individual's Federal Tax Identification Number (TIN).. SSN or ITIN. Required unless unavailable.
+ * @return tin
+ */
+ @javax.annotation.Nullable
+ public String getTin() {
+ return tin;
+ }
+
+ public void setTin(String tin) {
+ this.tin = tin;
+ }
+
+
+ public CoveredIndividual birthDate(LocalDate birthDate) {
+ this.birthDate = birthDate;
+ return this;
+ }
+
+ /**
+ * Covered individual's date of birth - Required when SSN is missing.
+ * @return birthDate
+ */
+ @javax.annotation.Nullable
+ public LocalDate getBirthDate() {
+ return birthDate;
+ }
+
+ public void setBirthDate(LocalDate birthDate) {
+ this.birthDate = birthDate;
+ }
+
+
+ public CoveredIndividual coveredAllMonths(Boolean coveredAllMonths) {
+ this.coveredAllMonths = coveredAllMonths;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for all 12 months
+ * @return coveredAllMonths
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredAllMonths() {
+ return coveredAllMonths;
+ }
+
+ public void setCoveredAllMonths(Boolean coveredAllMonths) {
+ this.coveredAllMonths = coveredAllMonths;
+ }
+
+
+ public CoveredIndividual coveredJanuary(Boolean coveredJanuary) {
+ this.coveredJanuary = coveredJanuary;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for January
+ * @return coveredJanuary
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredJanuary() {
+ return coveredJanuary;
+ }
+
+ public void setCoveredJanuary(Boolean coveredJanuary) {
+ this.coveredJanuary = coveredJanuary;
+ }
+
+
+ public CoveredIndividual coveredFebruary(Boolean coveredFebruary) {
+ this.coveredFebruary = coveredFebruary;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for February
+ * @return coveredFebruary
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredFebruary() {
+ return coveredFebruary;
+ }
+
+ public void setCoveredFebruary(Boolean coveredFebruary) {
+ this.coveredFebruary = coveredFebruary;
+ }
+
+
+ public CoveredIndividual coveredMarch(Boolean coveredMarch) {
+ this.coveredMarch = coveredMarch;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for March
+ * @return coveredMarch
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredMarch() {
+ return coveredMarch;
+ }
+
+ public void setCoveredMarch(Boolean coveredMarch) {
+ this.coveredMarch = coveredMarch;
+ }
+
+
+ public CoveredIndividual coveredApril(Boolean coveredApril) {
+ this.coveredApril = coveredApril;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for April
+ * @return coveredApril
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredApril() {
+ return coveredApril;
+ }
+
+ public void setCoveredApril(Boolean coveredApril) {
+ this.coveredApril = coveredApril;
+ }
+
+
+ public CoveredIndividual coveredMay(Boolean coveredMay) {
+ this.coveredMay = coveredMay;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for May
+ * @return coveredMay
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredMay() {
+ return coveredMay;
+ }
+
+ public void setCoveredMay(Boolean coveredMay) {
+ this.coveredMay = coveredMay;
+ }
+
+
+ public CoveredIndividual coveredJune(Boolean coveredJune) {
+ this.coveredJune = coveredJune;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for June
+ * @return coveredJune
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredJune() {
+ return coveredJune;
+ }
+
+ public void setCoveredJune(Boolean coveredJune) {
+ this.coveredJune = coveredJune;
+ }
+
+
+ public CoveredIndividual coveredJuly(Boolean coveredJuly) {
+ this.coveredJuly = coveredJuly;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for July
+ * @return coveredJuly
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredJuly() {
+ return coveredJuly;
+ }
+
+ public void setCoveredJuly(Boolean coveredJuly) {
+ this.coveredJuly = coveredJuly;
+ }
+
+
+ public CoveredIndividual coveredAugust(Boolean coveredAugust) {
+ this.coveredAugust = coveredAugust;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for August
+ * @return coveredAugust
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredAugust() {
+ return coveredAugust;
+ }
+
+ public void setCoveredAugust(Boolean coveredAugust) {
+ this.coveredAugust = coveredAugust;
+ }
+
+
+ public CoveredIndividual coveredSeptember(Boolean coveredSeptember) {
+ this.coveredSeptember = coveredSeptember;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for September
+ * @return coveredSeptember
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredSeptember() {
+ return coveredSeptember;
+ }
+
+ public void setCoveredSeptember(Boolean coveredSeptember) {
+ this.coveredSeptember = coveredSeptember;
+ }
+
+
+ public CoveredIndividual coveredOctober(Boolean coveredOctober) {
+ this.coveredOctober = coveredOctober;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for October
+ * @return coveredOctober
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredOctober() {
+ return coveredOctober;
+ }
+
+ public void setCoveredOctober(Boolean coveredOctober) {
+ this.coveredOctober = coveredOctober;
+ }
+
+
+ public CoveredIndividual coveredNovember(Boolean coveredNovember) {
+ this.coveredNovember = coveredNovember;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for November
+ * @return coveredNovember
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredNovember() {
+ return coveredNovember;
+ }
+
+ public void setCoveredNovember(Boolean coveredNovember) {
+ this.coveredNovember = coveredNovember;
+ }
+
+
+ public CoveredIndividual coveredDecember(Boolean coveredDecember) {
+ this.coveredDecember = coveredDecember;
+ return this;
+ }
+
+ /**
+ * Coverage indicator for December
+ * @return coveredDecember
+ */
+ @javax.annotation.Nullable
+ public Boolean getCoveredDecember() {
+ return coveredDecember;
+ }
+
+ public void setCoveredDecember(Boolean coveredDecember) {
+ this.coveredDecember = coveredDecember;
+ }
+
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CoveredIndividual coveredIndividual = (CoveredIndividual) o;
+ return Objects.equals(this.id, coveredIndividual.id) &&
+ Objects.equals(this.firstName, coveredIndividual.firstName) &&
+ Objects.equals(this.middleName, coveredIndividual.middleName) &&
+ Objects.equals(this.lastName, coveredIndividual.lastName) &&
+ Objects.equals(this.nameSuffix, coveredIndividual.nameSuffix) &&
+ Objects.equals(this.tin, coveredIndividual.tin) &&
+ Objects.equals(this.birthDate, coveredIndividual.birthDate) &&
+ Objects.equals(this.coveredAllMonths, coveredIndividual.coveredAllMonths) &&
+ Objects.equals(this.coveredJanuary, coveredIndividual.coveredJanuary) &&
+ Objects.equals(this.coveredFebruary, coveredIndividual.coveredFebruary) &&
+ Objects.equals(this.coveredMarch, coveredIndividual.coveredMarch) &&
+ Objects.equals(this.coveredApril, coveredIndividual.coveredApril) &&
+ Objects.equals(this.coveredMay, coveredIndividual.coveredMay) &&
+ Objects.equals(this.coveredJune, coveredIndividual.coveredJune) &&
+ Objects.equals(this.coveredJuly, coveredIndividual.coveredJuly) &&
+ Objects.equals(this.coveredAugust, coveredIndividual.coveredAugust) &&
+ Objects.equals(this.coveredSeptember, coveredIndividual.coveredSeptember) &&
+ Objects.equals(this.coveredOctober, coveredIndividual.coveredOctober) &&
+ Objects.equals(this.coveredNovember, coveredIndividual.coveredNovember) &&
+ Objects.equals(this.coveredDecember, coveredIndividual.coveredDecember);
+ }
+
+ 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(id, firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredAllMonths, coveredJanuary, coveredFebruary, coveredMarch, coveredApril, coveredMay, coveredJune, coveredJuly, coveredAugust, coveredSeptember, coveredOctober, coveredNovember, coveredDecember);
+ }
+
+ 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 CoveredIndividual {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
+ sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n");
+ sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
+ sb.append(" nameSuffix: ").append(toIndentedString(nameSuffix)).append("\n");
+ sb.append(" tin: ").append(toIndentedString(tin)).append("\n");
+ sb.append(" birthDate: ").append(toIndentedString(birthDate)).append("\n");
+ sb.append(" coveredAllMonths: ").append(toIndentedString(coveredAllMonths)).append("\n");
+ sb.append(" coveredJanuary: ").append(toIndentedString(coveredJanuary)).append("\n");
+ sb.append(" coveredFebruary: ").append(toIndentedString(coveredFebruary)).append("\n");
+ sb.append(" coveredMarch: ").append(toIndentedString(coveredMarch)).append("\n");
+ sb.append(" coveredApril: ").append(toIndentedString(coveredApril)).append("\n");
+ sb.append(" coveredMay: ").append(toIndentedString(coveredMay)).append("\n");
+ sb.append(" coveredJune: ").append(toIndentedString(coveredJune)).append("\n");
+ sb.append(" coveredJuly: ").append(toIndentedString(coveredJuly)).append("\n");
+ sb.append(" coveredAugust: ").append(toIndentedString(coveredAugust)).append("\n");
+ sb.append(" coveredSeptember: ").append(toIndentedString(coveredSeptember)).append("\n");
+ sb.append(" coveredOctober: ").append(toIndentedString(coveredOctober)).append("\n");
+ sb.append(" coveredNovember: ").append(toIndentedString(coveredNovember)).append("\n");
+ sb.append(" coveredDecember: ").append(toIndentedString(coveredDecember)).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("id");
+ openapiFields.add("firstName");
+ openapiFields.add("middleName");
+ openapiFields.add("lastName");
+ openapiFields.add("nameSuffix");
+ openapiFields.add("tin");
+ openapiFields.add("birthDate");
+ openapiFields.add("coveredAllMonths");
+ openapiFields.add("coveredJanuary");
+ openapiFields.add("coveredFebruary");
+ openapiFields.add("coveredMarch");
+ openapiFields.add("coveredApril");
+ openapiFields.add("coveredMay");
+ openapiFields.add("coveredJune");
+ openapiFields.add("coveredJuly");
+ openapiFields.add("coveredAugust");
+ openapiFields.add("coveredSeptember");
+ openapiFields.add("coveredOctober");
+ openapiFields.add("coveredNovember");
+ openapiFields.add("coveredDecember");
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet();
+ openapiRequiredFields.add("firstName");
+ openapiRequiredFields.add("lastName");
+ }
+
+ /**
+ * 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 CoveredIndividual
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CoveredIndividual.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividual is not found in the empty JSON string", CoveredIndividual.openapiRequiredFields.toString()));
+ }
+ }
+
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
+ // check to see if the JSON string contains additional fields
+ for (Map.Entry entry : entries) {
+ if (!CoveredIndividual.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividual` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : CoveredIndividual.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("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()));
+ }
+ if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString()));
+ }
+ if ((jsonObj.get("middleName") != null && !jsonObj.get("middleName").isJsonNull()) && !jsonObj.get("middleName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `middleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middleName").toString()));
+ }
+ if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString()));
+ }
+ if ((jsonObj.get("nameSuffix") != null && !jsonObj.get("nameSuffix").isJsonNull()) && !jsonObj.get("nameSuffix").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format("Expected the field `nameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameSuffix").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()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CoveredIndividual.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CoveredIndividual' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividual.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CoveredIndividual value) throws IOException {
+ JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ elementAdapter.write(out, obj);
+ }
+
+ @Override
+ public CoveredIndividual read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
+ }
+
+ }.nullSafe();
+ }
+ }
+
+ /**
+ * Create an instance of CoveredIndividual given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CoveredIndividual
+ * @throws IOException if the JSON string is invalid with respect to CoveredIndividual
+ */
+ public static CoveredIndividual fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CoveredIndividual.class);
+ }
+
+ /**
+ * Convert an instance of CoveredIndividual 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/CreateAndSendW9FormEmailRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java
new file mode 100644
index 0000000..116b349
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java
@@ -0,0 +1,413 @@
+/*
+ * 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 Avalara.SDK.model.A1099.V2.W4FormMinimalRequest;
+import Avalara.SDK.model.A1099.V2.W8BenEFormMinimalRequest;
+import Avalara.SDK.model.A1099.V2.W8BenFormMinimalRequest;
+import Avalara.SDK.model.A1099.V2.W8ImyFormMinimalRequest;
+import Avalara.SDK.model.A1099.V2.W9FormMinimalRequest;
+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 java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.JsonPrimitive;
+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 com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonParseException;
+
+import Avalara.SDK.JSON;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CreateAndSendW9FormEmailRequest extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(CreateAndSendW9FormEmailRequest.class.getName());
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CreateAndSendW9FormEmailRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreateAndSendW9FormEmailRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter adapterW4FormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W4FormMinimalRequest.class));
+ final TypeAdapter adapterW8BenEFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormMinimalRequest.class));
+ final TypeAdapter adapterW8BenFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormMinimalRequest.class));
+ final TypeAdapter adapterW8ImyFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormMinimalRequest.class));
+ final TypeAdapter adapterW9FormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W9FormMinimalRequest.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CreateAndSendW9FormEmailRequest value) throws IOException {
+ if (value == null || value.getActualInstance() == null) {
+ elementAdapter.write(out, null);
+ return;
+ }
+
+ // check if the actual instance is of the type `W4FormMinimalRequest`
+ if (value.getActualInstance() instanceof W4FormMinimalRequest) {
+ JsonElement element = adapterW4FormMinimalRequest.toJsonTree((W4FormMinimalRequest)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `W8BenEFormMinimalRequest`
+ if (value.getActualInstance() instanceof W8BenEFormMinimalRequest) {
+ JsonElement element = adapterW8BenEFormMinimalRequest.toJsonTree((W8BenEFormMinimalRequest)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `W8BenFormMinimalRequest`
+ if (value.getActualInstance() instanceof W8BenFormMinimalRequest) {
+ JsonElement element = adapterW8BenFormMinimalRequest.toJsonTree((W8BenFormMinimalRequest)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `W8ImyFormMinimalRequest`
+ if (value.getActualInstance() instanceof W8ImyFormMinimalRequest) {
+ JsonElement element = adapterW8ImyFormMinimalRequest.toJsonTree((W8ImyFormMinimalRequest)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `W9FormMinimalRequest`
+ if (value.getActualInstance() instanceof W9FormMinimalRequest) {
+ JsonElement element = adapterW9FormMinimalRequest.toJsonTree((W9FormMinimalRequest)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest");
+ }
+
+ @Override
+ public CreateAndSendW9FormEmailRequest read(JsonReader in) throws IOException {
+ Object deserialized = null;
+ JsonElement jsonElement = elementAdapter.read(in);
+
+ int match = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ TypeAdapter actualAdapter = elementAdapter;
+
+ // deserialize W4FormMinimalRequest
+ try {
+ // validate the JSON object to see if any exception is thrown
+ W4FormMinimalRequest.validateJsonElement(jsonElement);
+ actualAdapter = adapterW4FormMinimalRequest;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'W4FormMinimalRequest'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for W4FormMinimalRequest failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'W4FormMinimalRequest'", e);
+ }
+ // deserialize W8BenEFormMinimalRequest
+ try {
+ // validate the JSON object to see if any exception is thrown
+ W8BenEFormMinimalRequest.validateJsonElement(jsonElement);
+ actualAdapter = adapterW8BenEFormMinimalRequest;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'W8BenEFormMinimalRequest'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for W8BenEFormMinimalRequest failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'W8BenEFormMinimalRequest'", e);
+ }
+ // deserialize W8BenFormMinimalRequest
+ try {
+ // validate the JSON object to see if any exception is thrown
+ W8BenFormMinimalRequest.validateJsonElement(jsonElement);
+ actualAdapter = adapterW8BenFormMinimalRequest;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'W8BenFormMinimalRequest'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for W8BenFormMinimalRequest failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'W8BenFormMinimalRequest'", e);
+ }
+ // deserialize W8ImyFormMinimalRequest
+ try {
+ // validate the JSON object to see if any exception is thrown
+ W8ImyFormMinimalRequest.validateJsonElement(jsonElement);
+ actualAdapter = adapterW8ImyFormMinimalRequest;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'W8ImyFormMinimalRequest'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for W8ImyFormMinimalRequest failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'W8ImyFormMinimalRequest'", e);
+ }
+ // deserialize W9FormMinimalRequest
+ try {
+ // validate the JSON object to see if any exception is thrown
+ W9FormMinimalRequest.validateJsonElement(jsonElement);
+ actualAdapter = adapterW9FormMinimalRequest;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'W9FormMinimalRequest'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for W9FormMinimalRequest failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'W9FormMinimalRequest'", e);
+ }
+
+ if (match == 1) {
+ CreateAndSendW9FormEmailRequest ret = new CreateAndSendW9FormEmailRequest();
+ ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement));
+ return ret;
+ }
+
+ throw new IOException(String.format("Failed deserialization for CreateAndSendW9FormEmailRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString()));
+ }
+ }.nullSafe();
+ }
+ }
+
+ // store a list of schema names defined in oneOf
+ public static final Map> schemas = new HashMap>();
+
+ public CreateAndSendW9FormEmailRequest() {
+ super("oneOf", Boolean.FALSE);
+ }
+
+ public CreateAndSendW9FormEmailRequest(Object o) {
+ super("oneOf", Boolean.FALSE);
+ setActualInstance(o);
+ }
+
+ static {
+ schemas.put("W4FormMinimalRequest", W4FormMinimalRequest.class);
+ schemas.put("W8BenEFormMinimalRequest", W8BenEFormMinimalRequest.class);
+ schemas.put("W8BenFormMinimalRequest", W8BenFormMinimalRequest.class);
+ schemas.put("W8ImyFormMinimalRequest", W8ImyFormMinimalRequest.class);
+ schemas.put("W9FormMinimalRequest", W9FormMinimalRequest.class);
+ }
+
+ @Override
+ public Map> getSchemas() {
+ return CreateAndSendW9FormEmailRequest.schemas;
+ }
+
+ /**
+ * Set the instance that matches the oneOf child schema, check
+ * the instance parameter is valid against the oneOf child schemas:
+ * W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest
+ *
+ * It could be an instance of the 'oneOf' schemas.
+ */
+ @Override
+ public void setActualInstance(Object instance) {
+ if (instance instanceof W4FormMinimalRequest) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof W8BenEFormMinimalRequest) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof W8BenFormMinimalRequest) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof W8ImyFormMinimalRequest) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof W9FormMinimalRequest) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ throw new RuntimeException("Invalid instance type. Must be W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest");
+ }
+
+ /**
+ * Get the actual instance, which can be the following:
+ * W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest
+ *
+ * @return The actual instance (W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest)
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getActualInstance() {
+ return super.getActualInstance();
+ }
+
+ /**
+ * Get the actual instance of `W4FormMinimalRequest`. If the actual instance is not `W4FormMinimalRequest`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `W4FormMinimalRequest`
+ * @throws ClassCastException if the instance is not `W4FormMinimalRequest`
+ */
+ public W4FormMinimalRequest getW4FormMinimalRequest() throws ClassCastException {
+ return (W4FormMinimalRequest)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `W8BenEFormMinimalRequest`. If the actual instance is not `W8BenEFormMinimalRequest`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `W8BenEFormMinimalRequest`
+ * @throws ClassCastException if the instance is not `W8BenEFormMinimalRequest`
+ */
+ public W8BenEFormMinimalRequest getW8BenEFormMinimalRequest() throws ClassCastException {
+ return (W8BenEFormMinimalRequest)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `W8BenFormMinimalRequest`. If the actual instance is not `W8BenFormMinimalRequest`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `W8BenFormMinimalRequest`
+ * @throws ClassCastException if the instance is not `W8BenFormMinimalRequest`
+ */
+ public W8BenFormMinimalRequest getW8BenFormMinimalRequest() throws ClassCastException {
+ return (W8BenFormMinimalRequest)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `W8ImyFormMinimalRequest`. If the actual instance is not `W8ImyFormMinimalRequest`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `W8ImyFormMinimalRequest`
+ * @throws ClassCastException if the instance is not `W8ImyFormMinimalRequest`
+ */
+ public W8ImyFormMinimalRequest getW8ImyFormMinimalRequest() throws ClassCastException {
+ return (W8ImyFormMinimalRequest)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `W9FormMinimalRequest`. If the actual instance is not `W9FormMinimalRequest`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `W9FormMinimalRequest`
+ * @throws ClassCastException if the instance is not `W9FormMinimalRequest`
+ */
+ public W9FormMinimalRequest getW9FormMinimalRequest() throws ClassCastException {
+ return (W9FormMinimalRequest)super.getActualInstance();
+ }
+
+ /**
+ * 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 CreateAndSendW9FormEmailRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ // validate oneOf schemas one by one
+ int validCount = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ // validate the json string with W4FormMinimalRequest
+ try {
+ W4FormMinimalRequest.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for W4FormMinimalRequest failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with W8BenEFormMinimalRequest
+ try {
+ W8BenEFormMinimalRequest.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for W8BenEFormMinimalRequest failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with W8BenFormMinimalRequest
+ try {
+ W8BenFormMinimalRequest.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for W8BenFormMinimalRequest failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with W8ImyFormMinimalRequest
+ try {
+ W8ImyFormMinimalRequest.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for W8ImyFormMinimalRequest failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with W9FormMinimalRequest
+ try {
+ W9FormMinimalRequest.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for W9FormMinimalRequest failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ if (validCount != 1) {
+ throw new IOException(String.format("The JSON string is invalid for CreateAndSendW9FormEmailRequest with oneOf schemas: W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString()));
+ }
+ }
+
+ /**
+ * Create an instance of CreateAndSendW9FormEmailRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CreateAndSendW9FormEmailRequest
+ * @throws IOException if the JSON string is invalid with respect to CreateAndSendW9FormEmailRequest
+ */
+ public static CreateAndSendW9FormEmailRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CreateAndSendW9FormEmailRequest.class);
+ }
+
+ /**
+ * Convert an instance of CreateAndSendW9FormEmailRequest 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/CreateCompanyRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateCompanyRequest.java
new file mode 100644
index 0000000..3902762
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateCompanyRequest.java
@@ -0,0 +1,282 @@
+/*
+ * 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 Avalara.SDK.model.A1099.V2.CompanyCreateUpdateRequestModel;
+import Avalara.SDK.model.A1099.V2.CompanyResponse;
+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.time.OffsetDateTime;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.JsonPrimitive;
+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 com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonParseException;
+
+import Avalara.SDK.JSON;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CreateCompanyRequest extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(CreateCompanyRequest.class.getName());
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CreateCompanyRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreateCompanyRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter adapterCompanyCreateUpdateRequestModel = gson.getDelegateAdapter(this, TypeToken.get(CompanyCreateUpdateRequestModel.class));
+ final TypeAdapter adapterCompanyResponse = gson.getDelegateAdapter(this, TypeToken.get(CompanyResponse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CreateCompanyRequest value) throws IOException {
+ if (value == null || value.getActualInstance() == null) {
+ elementAdapter.write(out, null);
+ return;
+ }
+
+ // check if the actual instance is of the type `CompanyCreateUpdateRequestModel`
+ if (value.getActualInstance() instanceof CompanyCreateUpdateRequestModel) {
+ JsonElement element = adapterCompanyCreateUpdateRequestModel.toJsonTree((CompanyCreateUpdateRequestModel)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `CompanyResponse`
+ if (value.getActualInstance() instanceof CompanyResponse) {
+ JsonElement element = adapterCompanyResponse.toJsonTree((CompanyResponse)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CompanyCreateUpdateRequestModel, CompanyResponse");
+ }
+
+ @Override
+ public CreateCompanyRequest read(JsonReader in) throws IOException {
+ Object deserialized = null;
+ JsonElement jsonElement = elementAdapter.read(in);
+
+ int match = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ TypeAdapter actualAdapter = elementAdapter;
+
+ // deserialize CompanyCreateUpdateRequestModel
+ try {
+ // validate the JSON object to see if any exception is thrown
+ CompanyCreateUpdateRequestModel.validateJsonElement(jsonElement);
+ actualAdapter = adapterCompanyCreateUpdateRequestModel;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'CompanyCreateUpdateRequestModel'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for CompanyCreateUpdateRequestModel failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'CompanyCreateUpdateRequestModel'", e);
+ }
+ // deserialize CompanyResponse
+ try {
+ // validate the JSON object to see if any exception is thrown
+ CompanyResponse.validateJsonElement(jsonElement);
+ actualAdapter = adapterCompanyResponse;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'CompanyResponse'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for CompanyResponse failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'CompanyResponse'", e);
+ }
+
+ if (match == 1) {
+ CreateCompanyRequest ret = new CreateCompanyRequest();
+ ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement));
+ return ret;
+ }
+
+ throw new IOException(String.format("Failed deserialization for CreateCompanyRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString()));
+ }
+ }.nullSafe();
+ }
+ }
+
+ // store a list of schema names defined in oneOf
+ public static final Map> schemas = new HashMap>();
+
+ public CreateCompanyRequest() {
+ super("oneOf", Boolean.FALSE);
+ }
+
+ public CreateCompanyRequest(Object o) {
+ super("oneOf", Boolean.FALSE);
+ setActualInstance(o);
+ }
+
+ static {
+ schemas.put("CompanyCreateUpdateRequestModel", CompanyCreateUpdateRequestModel.class);
+ schemas.put("CompanyResponse", CompanyResponse.class);
+ }
+
+ @Override
+ public Map> getSchemas() {
+ return CreateCompanyRequest.schemas;
+ }
+
+ /**
+ * Set the instance that matches the oneOf child schema, check
+ * the instance parameter is valid against the oneOf child schemas:
+ * CompanyCreateUpdateRequestModel, CompanyResponse
+ *
+ * It could be an instance of the 'oneOf' schemas.
+ */
+ @Override
+ public void setActualInstance(Object instance) {
+ if (instance instanceof CompanyCreateUpdateRequestModel) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof CompanyResponse) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ throw new RuntimeException("Invalid instance type. Must be CompanyCreateUpdateRequestModel, CompanyResponse");
+ }
+
+ /**
+ * Get the actual instance, which can be the following:
+ * CompanyCreateUpdateRequestModel, CompanyResponse
+ *
+ * @return The actual instance (CompanyCreateUpdateRequestModel, CompanyResponse)
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getActualInstance() {
+ return super.getActualInstance();
+ }
+
+ /**
+ * Get the actual instance of `CompanyCreateUpdateRequestModel`. If the actual instance is not `CompanyCreateUpdateRequestModel`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `CompanyCreateUpdateRequestModel`
+ * @throws ClassCastException if the instance is not `CompanyCreateUpdateRequestModel`
+ */
+ public CompanyCreateUpdateRequestModel getCompanyCreateUpdateRequestModel() throws ClassCastException {
+ return (CompanyCreateUpdateRequestModel)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `CompanyResponse`. If the actual instance is not `CompanyResponse`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `CompanyResponse`
+ * @throws ClassCastException if the instance is not `CompanyResponse`
+ */
+ public CompanyResponse getCompanyResponse() throws ClassCastException {
+ return (CompanyResponse)super.getActualInstance();
+ }
+
+ /**
+ * 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 CreateCompanyRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ // validate oneOf schemas one by one
+ int validCount = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ // validate the json string with CompanyCreateUpdateRequestModel
+ try {
+ CompanyCreateUpdateRequestModel.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for CompanyCreateUpdateRequestModel failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with CompanyResponse
+ try {
+ CompanyResponse.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for CompanyResponse failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ if (validCount != 1) {
+ throw new IOException(String.format("The JSON string is invalid for CreateCompanyRequest with oneOf schemas: CompanyCreateUpdateRequestModel, CompanyResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString()));
+ }
+ }
+
+ /**
+ * Create an instance of CreateCompanyRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CreateCompanyRequest
+ * @throws IOException if the JSON string is invalid with respect to CreateCompanyRequest
+ */
+ public static CreateCompanyRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CreateCompanyRequest.class);
+ }
+
+ /**
+ * Convert an instance of CreateCompanyRequest 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/CreateIssuerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateIssuerRequest.java
new file mode 100644
index 0000000..5475e6d
--- /dev/null
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateIssuerRequest.java
@@ -0,0 +1,282 @@
+/*
+ * 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 Avalara.SDK.model.A1099.V2.IssuerCommand;
+import Avalara.SDK.model.A1099.V2.IssuerResponse;
+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.time.OffsetDateTime;
+import java.util.Arrays;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.JsonPrimitive;
+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 com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonParseException;
+
+import Avalara.SDK.JSON;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
+public class CreateIssuerRequest extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(CreateIssuerRequest.class.getName());
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!CreateIssuerRequest.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'CreateIssuerRequest' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter adapterIssuerCommand = gson.getDelegateAdapter(this, TypeToken.get(IssuerCommand.class));
+ final TypeAdapter adapterIssuerResponse = gson.getDelegateAdapter(this, TypeToken.get(IssuerResponse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, CreateIssuerRequest value) throws IOException {
+ if (value == null || value.getActualInstance() == null) {
+ elementAdapter.write(out, null);
+ return;
+ }
+
+ // check if the actual instance is of the type `IssuerCommand`
+ if (value.getActualInstance() instanceof IssuerCommand) {
+ JsonElement element = adapterIssuerCommand.toJsonTree((IssuerCommand)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ // check if the actual instance is of the type `IssuerResponse`
+ if (value.getActualInstance() instanceof IssuerResponse) {
+ JsonElement element = adapterIssuerResponse.toJsonTree((IssuerResponse)value.getActualInstance());
+ elementAdapter.write(out, element);
+ return;
+ }
+ throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IssuerCommand, IssuerResponse");
+ }
+
+ @Override
+ public CreateIssuerRequest read(JsonReader in) throws IOException {
+ Object deserialized = null;
+ JsonElement jsonElement = elementAdapter.read(in);
+
+ int match = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ TypeAdapter actualAdapter = elementAdapter;
+
+ // deserialize IssuerCommand
+ try {
+ // validate the JSON object to see if any exception is thrown
+ IssuerCommand.validateJsonElement(jsonElement);
+ actualAdapter = adapterIssuerCommand;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'IssuerCommand'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for IssuerCommand failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'IssuerCommand'", e);
+ }
+ // deserialize IssuerResponse
+ try {
+ // validate the JSON object to see if any exception is thrown
+ IssuerResponse.validateJsonElement(jsonElement);
+ actualAdapter = adapterIssuerResponse;
+ match++;
+ log.log(Level.FINER, "Input data matches schema 'IssuerResponse'");
+ } catch (Exception e) {
+ // deserialization failed, continue
+ errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage()));
+ log.log(Level.FINER, "Input data does not match schema 'IssuerResponse'", e);
+ }
+
+ if (match == 1) {
+ CreateIssuerRequest ret = new CreateIssuerRequest();
+ ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement));
+ return ret;
+ }
+
+ throw new IOException(String.format("Failed deserialization for CreateIssuerRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString()));
+ }
+ }.nullSafe();
+ }
+ }
+
+ // store a list of schema names defined in oneOf
+ public static final Map> schemas = new HashMap>();
+
+ public CreateIssuerRequest() {
+ super("oneOf", Boolean.FALSE);
+ }
+
+ public CreateIssuerRequest(Object o) {
+ super("oneOf", Boolean.FALSE);
+ setActualInstance(o);
+ }
+
+ static {
+ schemas.put("IssuerCommand", IssuerCommand.class);
+ schemas.put("IssuerResponse", IssuerResponse.class);
+ }
+
+ @Override
+ public Map> getSchemas() {
+ return CreateIssuerRequest.schemas;
+ }
+
+ /**
+ * Set the instance that matches the oneOf child schema, check
+ * the instance parameter is valid against the oneOf child schemas:
+ * IssuerCommand, IssuerResponse
+ *
+ * It could be an instance of the 'oneOf' schemas.
+ */
+ @Override
+ public void setActualInstance(Object instance) {
+ if (instance instanceof IssuerCommand) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ if (instance instanceof IssuerResponse) {
+ super.setActualInstance(instance);
+ return;
+ }
+
+ throw new RuntimeException("Invalid instance type. Must be IssuerCommand, IssuerResponse");
+ }
+
+ /**
+ * Get the actual instance, which can be the following:
+ * IssuerCommand, IssuerResponse
+ *
+ * @return The actual instance (IssuerCommand, IssuerResponse)
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getActualInstance() {
+ return super.getActualInstance();
+ }
+
+ /**
+ * Get the actual instance of `IssuerCommand`. If the actual instance is not `IssuerCommand`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `IssuerCommand`
+ * @throws ClassCastException if the instance is not `IssuerCommand`
+ */
+ public IssuerCommand getIssuerCommand() throws ClassCastException {
+ return (IssuerCommand)super.getActualInstance();
+ }
+ /**
+ * Get the actual instance of `IssuerResponse`. If the actual instance is not `IssuerResponse`,
+ * the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `IssuerResponse`
+ * @throws ClassCastException if the instance is not `IssuerResponse`
+ */
+ public IssuerResponse getIssuerResponse() throws ClassCastException {
+ return (IssuerResponse)super.getActualInstance();
+ }
+
+ /**
+ * 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 CreateIssuerRequest
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ // validate oneOf schemas one by one
+ int validCount = 0;
+ ArrayList errorMessages = new ArrayList<>();
+ // validate the json string with IssuerCommand
+ try {
+ IssuerCommand.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for IssuerCommand failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ // validate the json string with IssuerResponse
+ try {
+ IssuerResponse.validateJsonElement(jsonElement);
+ validCount++;
+ } catch (Exception e) {
+ errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage()));
+ // continue to the next one
+ }
+ if (validCount != 1) {
+ throw new IOException(String.format("The JSON string is invalid for CreateIssuerRequest with oneOf schemas: IssuerCommand, IssuerResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString()));
+ }
+ }
+
+ /**
+ * Create an instance of CreateIssuerRequest given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of CreateIssuerRequest
+ * @throws IOException if the JSON string is invalid with respect to CreateIssuerRequest
+ */
+ public static CreateIssuerRequest fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, CreateIssuerRequest.class);
+ }
+
+ /**
+ * Convert an instance of CreateIssuerRequest 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/CreateW9Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java
index 19ae7f9..09dd31a 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java
@@ -20,6 +20,7 @@
package Avalara.SDK.model.A1099.V2;
import java.util.Objects;
+import Avalara.SDK.model.A1099.V2.EntryStatusResponse;
import Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse;
import Avalara.SDK.model.A1099.V2.TinMatchStatusResponse;
import Avalara.SDK.model.A1099.V2.W4FormResponse;
diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java
similarity index 58%
rename from src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java
rename to src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java
index 6662749..3caad6b 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java
@@ -8,7 +8,7 @@
*
* Avalara 1099 & W-9 API Definition
*
- * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
+ * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget)
*
* @author Sachin Baijal
* @author Jonathan Wenger
@@ -26,6 +26,7 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.time.OffsetDateTime;
import java.util.Arrays;
import org.openapitools.jackson.nullable.JsonNullable;
@@ -54,32 +55,28 @@
import Avalara.SDK.JSON;
/**
- * StateEfileStatusDetailApp
+ * Represents the entry status information for a W9 form.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
-public class StateEfileStatusDetailApp {
+public class EntryStatusResponse {
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private String status;
public static final String SERIALIZED_NAME_TIME = "time";
@SerializedName(SERIALIZED_NAME_TIME)
- private String time;
+ private OffsetDateTime time;
- public static final String SERIALIZED_NAME_JURISDICTION = "jurisdiction";
- @SerializedName(SERIALIZED_NAME_JURISDICTION)
- private String jurisdiction;
-
- public StateEfileStatusDetailApp() {
+ public EntryStatusResponse() {
}
- public StateEfileStatusDetailApp status(String status) {
+ public EntryStatusResponse status(String status) {
this.status = status;
return this;
}
/**
- * Get status
+ * The form status.
* @return status
*/
@javax.annotation.Nullable
@@ -92,44 +89,25 @@ public void setStatus(String status) {
}
- public StateEfileStatusDetailApp time(String time) {
+ public EntryStatusResponse time(OffsetDateTime time) {
this.time = time;
return this;
}
/**
- * Get time
+ * The timestamp for the latest status update.
* @return time
*/
@javax.annotation.Nullable
- public String getTime() {
+ public OffsetDateTime getTime() {
return time;
}
- public void setTime(String time) {
+ public void setTime(OffsetDateTime time) {
this.time = time;
}
- public StateEfileStatusDetailApp jurisdiction(String jurisdiction) {
- this.jurisdiction = jurisdiction;
- return this;
- }
-
- /**
- * Get jurisdiction
- * @return jurisdiction
- */
- @javax.annotation.Nullable
- public String getJurisdiction() {
- return jurisdiction;
- }
-
- public void setJurisdiction(String jurisdiction) {
- this.jurisdiction = jurisdiction;
- }
-
-
@Override
public boolean equals(Object o) {
@@ -139,10 +117,9 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- StateEfileStatusDetailApp stateEfileStatusDetailApp = (StateEfileStatusDetailApp) o;
- return Objects.equals(this.status, stateEfileStatusDetailApp.status) &&
- Objects.equals(this.time, stateEfileStatusDetailApp.time) &&
- Objects.equals(this.jurisdiction, stateEfileStatusDetailApp.jurisdiction);
+ EntryStatusResponse entryStatusResponse = (EntryStatusResponse) o;
+ return Objects.equals(this.status, entryStatusResponse.status) &&
+ Objects.equals(this.time, entryStatusResponse.time);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -151,7 +128,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(status, time, jurisdiction);
+ return Objects.hash(status, time);
}
private static int hashCodeNullable(JsonNullable a) {
@@ -164,10 +141,9 @@ private static int hashCodeNullable(JsonNullable a) {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class StateEfileStatusDetailApp {\n");
+ sb.append("class EntryStatusResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" time: ").append(toIndentedString(time)).append("\n");
- sb.append(" jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -192,7 +168,6 @@ private String toIndentedString(Object o) {
openapiFields = new HashSet();
openapiFields.add("status");
openapiFields.add("time");
- openapiFields.add("jurisdiction");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -202,54 +177,48 @@ private String toIndentedString(Object o) {
* 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 StateEfileStatusDetailApp
+ * @throws IOException if the JSON Element is invalid with respect to EntryStatusResponse
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!StateEfileStatusDetailApp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
- throw new IllegalArgumentException(String.format("The required field(s) %s in StateEfileStatusDetailApp is not found in the empty JSON string", StateEfileStatusDetailApp.openapiRequiredFields.toString()));
+ if (!EntryStatusResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format("The required field(s) %s in EntryStatusResponse is not found in the empty JSON string", EntryStatusResponse.openapiRequiredFields.toString()));
}
}
Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
for (Map.Entry entry : entries) {
- if (!StateEfileStatusDetailApp.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateEfileStatusDetailApp` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
+ if (!EntryStatusResponse.openapiFields.contains(entry.getKey())) {
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EntryStatusResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString()));
}
- if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString()));
- }
- if ((jsonObj.get("jurisdiction") != null && !jsonObj.get("jurisdiction").isJsonNull()) && !jsonObj.get("jurisdiction").isJsonPrimitive()) {
- throw new IllegalArgumentException(String.format("Expected the field `jurisdiction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jurisdiction").toString()));
- }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!StateEfileStatusDetailApp.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'StateEfileStatusDetailApp' and its subtypes
+ if (!EntryStatusResponse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EntryStatusResponse' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter
- = gson.getDelegateAdapter(this, TypeToken.get(StateEfileStatusDetailApp.class));
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EntryStatusResponse.class));
- return (TypeAdapter) new TypeAdapter() {
+ return (TypeAdapter) new TypeAdapter() {
@Override
- public void write(JsonWriter out, StateEfileStatusDetailApp value) throws IOException {
+ public void write(JsonWriter out, EntryStatusResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}
@Override
- public StateEfileStatusDetailApp read(JsonReader in) throws IOException {
+ public EntryStatusResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
return thisAdapter.fromJsonTree(jsonElement);
@@ -260,18 +229,18 @@ public StateEfileStatusDetailApp read(JsonReader in) throws IOException {
}
/**
- * Create an instance of StateEfileStatusDetailApp given an JSON string
+ * Create an instance of EntryStatusResponse given an JSON string
*
* @param jsonString JSON string
- * @return An instance of StateEfileStatusDetailApp
- * @throws IOException if the JSON string is invalid with respect to StateEfileStatusDetailApp
+ * @return An instance of EntryStatusResponse
+ * @throws IOException if the JSON string is invalid with respect to EntryStatusResponse
*/
- public static StateEfileStatusDetailApp fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, StateEfileStatusDetailApp.class);
+ public static EntryStatusResponse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EntryStatusResponse.class);
}
/**
- * Convert an instance of StateEfileStatusDetailApp to an JSON string
+ * Convert an instance of EntryStatusResponse to an JSON string
*
* @return JSON string
*/
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 26703d9..70e4f1d 100644
--- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java
+++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java
@@ -32,6 +32,7 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
@@ -63,17 +64,79 @@
import Avalara.SDK.JSON;
/**
- * Form1042S
+ * Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class Form1042S {
+ /**
+ * Gets or Sets tinType
+ */
+ @JsonAdapter(TinTypeEnum.Adapter.class)
+ public enum TinTypeEnum {
+ EMPTY("Empty"),
+
+ EIN("EIN"),
+
+ SSN("SSN"),
+
+ ITIN("ITIN"),
+
+ ATIN("ATIN");
+
+ private String value;
+
+ TinTypeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TinTypeEnum fromValue(String value) {
+ for (TinTypeEnum b : TinTypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TinTypeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TinTypeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TinTypeEnum.fromValue(value);
+ }
+ }
+
+ public static final String SERIALIZED_NAME_TIN_TYPE = "tinType";
+ @SerializedName(SERIALIZED_NAME_TIN_TYPE)
+ private TinTypeEnum tinType;
+
public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId";
@SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID)
private String uniqueFormId;
public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth";
@SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH)
- private OffsetDateTime recipientDateOfBirth;
+ private LocalDate recipientDateOfBirth;
public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin";
@SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN)
@@ -83,37 +146,553 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN)
private String recipientForeignTin;
+ /**
+ * Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty
+ */
+ @JsonAdapter(LobCodeEnum.Adapter.class)
+ public enum LobCodeEnum {
+ _01("01"),
+
+ _02("02"),
+
+ _03("03"),
+
+ _04("04"),
+
+ _05("05"),
+
+ _06("06"),
+
+ _07("07"),
+
+ _08("08"),
+
+ _09("09"),
+
+ _10("10"),
+
+ _11("11"),
+
+ _12("12");
+
+ private String value;
+
+ LobCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static LobCodeEnum fromValue(String value) {
+ for (LobCodeEnum b : LobCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final LobCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public LobCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return LobCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ LobCodeEnum.fromValue(value);
+ }
+ }
+
public static final String SERIALIZED_NAME_LOB_CODE = "lobCode";
@SerializedName(SERIALIZED_NAME_LOB_CODE)
- private String lobCode;
+ private LobCodeEnum lobCode;
+
+ /**
+ * Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined
+ */
+ @JsonAdapter(IncomeCodeEnum.Adapter.class)
+ public enum IncomeCodeEnum {
+ _01("01"),
+
+ _02("02"),
+
+ _03("03"),
+
+ _04("04"),
+
+ _05("05"),
+
+ _22("22"),
+
+ _29("29"),
+
+ _30("30"),
+
+ _31("31"),
+
+ _33("33"),
+
+ _51("51"),
+
+ _54("54"),
+
+ _06("06"),
+
+ _07("07"),
+
+ _08("08"),
+
+ _34("34"),
+
+ _40("40"),
+
+ _52("52"),
+
+ _53("53"),
+
+ _56("56"),
+
+ _09("09"),
+
+ _10("10"),
+
+ _11("11"),
+
+ _12("12"),
+
+ _13("13"),
+
+ _14("14"),
+
+ _15("15"),
+
+ _16("16"),
+
+ _17("17"),
+
+ _18("18"),
+
+ _19("19"),
+
+ _20("20"),
+
+ _23("23"),
+
+ _24("24"),
+
+ _25("25"),
+
+ _26("26"),
+
+ _27("27"),
+
+ _28("28"),
+
+ _32("32"),
+
+ _35("35"),
+
+ _36("36"),
+
+ _37("37"),
+
+ _38("38"),
+
+ _39("39"),
+
+ _41("41"),
+
+ _42("42"),
+
+ _43("43"),
+
+ _44("44"),
+
+ _50("50"),
+
+ _55("55"),
+
+ _57("57"),
+
+ _58("58");
+
+ private String value;
+
+ IncomeCodeEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static IncomeCodeEnum fromValue(String value) {
+ for (IncomeCodeEnum b : IncomeCodeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final IncomeCodeEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public IncomeCodeEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return IncomeCodeEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ IncomeCodeEnum.fromValue(value);
+ }
+ }
public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode";
@SerializedName(SERIALIZED_NAME_INCOME_CODE)
- private String incomeCode;
+ private IncomeCodeEnum incomeCode;
public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome";
@SerializedName(SERIALIZED_NAME_GROSS_INCOME)
private Double grossIncome;
+ /**
+ * Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4
+ */
+ @JsonAdapter(WithholdingIndicatorEnum.Adapter.class)
+ public enum WithholdingIndicatorEnum {
+ _3("3"),
+
+ _4("4");
+
+ private String value;
+
+ WithholdingIndicatorEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static WithholdingIndicatorEnum fromValue(String value) {
+ for (WithholdingIndicatorEnum b : WithholdingIndicatorEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final WithholdingIndicatorEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public WithholdingIndicatorEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return WithholdingIndicatorEnum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ WithholdingIndicatorEnum.fromValue(value);
+ }
+ }
+
public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator";
@SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR)
- private String withholdingIndicator;
+ private WithholdingIndicatorEnum withholdingIndicator;
public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode";
@SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE)
private String taxCountryCode;
+ /**
+ * Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892
+ */
+ @JsonAdapter(ExemptionCodeChap3Enum.Adapter.class)
+ public enum ExemptionCodeChap3Enum {
+ _00("00"),
+
+ _01("01"),
+
+ _02("02"),
+
+ _03("03"),
+
+ _04("04"),
+
+ _05("05"),
+
+ _06("06"),
+
+ _07("07"),
+
+ _08("08"),
+
+ _09("09"),
+
+ _10("10"),
+
+ _11("11"),
+
+ _12("12"),
+
+ _22("22"),
+
+ _23("23"),
+
+ _24("24");
+
+ private String value;
+
+ ExemptionCodeChap3Enum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static ExemptionCodeChap3Enum fromValue(String value) {
+ for (ExemptionCodeChap3Enum b : ExemptionCodeChap3Enum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final ExemptionCodeChap3Enum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public ExemptionCodeChap3Enum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return ExemptionCodeChap3Enum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ ExemptionCodeChap3Enum.fromValue(value);
+ }
+ }
+
public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3";
@SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3)
- private String exemptionCodeChap3;
+ private ExemptionCodeChap3Enum exemptionCodeChap3;
+
+ /**
+ * Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding
+ */
+ @JsonAdapter(ExemptionCodeChap4Enum.Adapter.class)
+ public enum ExemptionCodeChap4Enum {
+ _00("00"),
+
+ _13("13"),
+
+ _14("14"),
+
+ _15("15"),
+
+ _16("16"),
+
+ _17("17"),
+
+ _18("18"),
+
+ _19("19"),
+
+ _20("20"),
+
+ _21("21");
+
+ private String value;
+
+ ExemptionCodeChap4Enum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static ExemptionCodeChap4Enum fromValue(String value) {
+ for (ExemptionCodeChap4Enum b : ExemptionCodeChap4Enum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final ExemptionCodeChap4Enum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public ExemptionCodeChap4Enum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return ExemptionCodeChap4Enum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ ExemptionCodeChap4Enum.fromValue(value);
+ }
+ }
public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4";
@SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4)
- private String exemptionCodeChap4;
+ private ExemptionCodeChap4Enum exemptionCodeChap4;
+
+ /**
+ * Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00%
+ */
+ @JsonAdapter(TaxRateChap3Enum.Adapter.class)
+ public enum TaxRateChap3Enum {
+ _00_00("00.00"),
+
+ _02_00("02.00"),
+
+ _04_00("04.00"),
+
+ _04_90("04.90"),
+
+ _04_95("04.95"),
+
+ _05_00("05.00"),
+
+ _07_00("07.00"),
+
+ _08_00("08.00"),
+
+ _10_00("10.00"),
+
+ _12_00("12.00"),
+
+ _12_50("12.50"),
+
+ _14_00("14.00"),
+
+ _15_00("15.00"),
+
+ _17_50("17.50"),
+
+ _20_00("20.00"),
+
+ _21_00("21.00"),
+
+ _24_00("24.00"),
+
+ _25_00("25.00"),
+
+ _27_50("27.50"),
+
+ _28_00("28.00"),
+
+ _30_00("30.00"),
+
+ _37_00("37.00");
+
+ private String value;
+
+ TaxRateChap3Enum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static TaxRateChap3Enum fromValue(String value) {
+ for (TaxRateChap3Enum b : TaxRateChap3Enum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ return null;
+ }
+
+ public static class Adapter extends TypeAdapter {
+ @Override
+ public void write(final JsonWriter jsonWriter, final TaxRateChap3Enum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public TaxRateChap3Enum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return TaxRateChap3Enum.fromValue(value);
+ }
+ }
+
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ String value = jsonElement.getAsString();
+ TaxRateChap3Enum.fromValue(value);
+ }
+ }
public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3";
@SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3)
- private String taxRateChap3;
+ private TaxRateChap3Enum taxRateChap3;
public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance";
@SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE)
@@ -143,13 +722,285 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT)
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
+ */
+ @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. 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 {
+ _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_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent";
@SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT)
@@ -159,17 +1010,83 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH)
private IntermediaryOrFlowThrough intermediaryOrFlowThrough;
- public static final String SERIALIZED_NAME_ID = "id";
- @SerializedName(SERIALIZED_NAME_ID)
- private String id;
+ /**
+ * Form type
+ */
+ @JsonAdapter(TypeEnum.Adapter.class)
+ public enum TypeEnum {
+ _1099_NEC("1099-NEC"),
+
+ _1099_MISC("1099-MISC"),
+
+ _1099_DIV("1099-DIV"),
+
+ _1099_R("1099-R"),
+
+ _1099_K("1099-K"),
+
+ _1095_B("1095-B"),
+
+ _1042_S("1042-S"),
+
+ _1095_C("1095-C"),
+
+ _1099_INT("1099-INT");
+
+ 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 String type;
+ private TypeEnum type;
+
+ public static final String SERIALIZED_NAME_ID = "id";
+ @SerializedName(SERIALIZED_NAME_ID)
+ private String id;
public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId";
@SerializedName(SERIALIZED_NAME_ISSUER_ID)
- private Integer issuerId;
+ private String issuerId;
public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId";
@SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID)
@@ -183,78 +1100,14 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_TAX_YEAR)
private Integer taxYear;
- public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile";
- @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE)
- private Boolean federalEfile;
-
- public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus";
- @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS)
- private Form1099StatusDetail federalEfileStatus;
-
- public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile";
- @SerializedName(SERIALIZED_NAME_STATE_EFILE)
- private Boolean stateEfile;
-
- public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus";
- @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS)
- private List stateEfileStatus;
-
- public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail";
- @SerializedName(SERIALIZED_NAME_POSTAL_MAIL)
- private Boolean postalMail;
-
- public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus";
- @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS)
- private Form1099StatusDetail postalMailStatus;
-
- public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch";
- @SerializedName(SERIALIZED_NAME_TIN_MATCH)
- private Boolean tinMatch;
-
- public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus";
- @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS)
- private Form1099StatusDetail tinMatchStatus;
-
- public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification";
- @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION)
- private Boolean addressVerification;
-
- public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus";
- @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS)
- private Form1099StatusDetail addressVerificationStatus;
-
- public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus";
- @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS)
- private Form1099StatusDetail eDeliveryStatus;
-
public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId";
@SerializedName(SERIALIZED_NAME_REFERENCE_ID)
private String referenceId;
- public static final String SERIALIZED_NAME_EMAIL = "email";
- @SerializedName(SERIALIZED_NAME_EMAIL)
- private String email;
-
- public static final String SERIALIZED_NAME_TIN_TYPE = "tinType";
- @SerializedName(SERIALIZED_NAME_TIN_TYPE)
- private String tinType;
-
- public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement";
- @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT)
- private Boolean fatcaFilingRequirement;
-
public static final String SERIALIZED_NAME_TIN = "tin";
@SerializedName(SERIALIZED_NAME_TIN)
private String tin;
- public static final String SERIALIZED_NAME_NO_TIN = "noTin";
- @SerializedName(SERIALIZED_NAME_NO_TIN)
- private Boolean noTin;
-
- public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice";
- @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE)
- private Boolean secondTinNotice;
-
public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName";
@SerializedName(SERIALIZED_NAME_RECIPIENT_NAME)
private String recipientName;
@@ -283,6 +1136,18 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_ZIP)
private String zip;
+ public static final String SERIALIZED_NAME_EMAIL = "email";
+ @SerializedName(SERIALIZED_NAME_EMAIL)
+ private String email;
+
+ public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber";
+ @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER)
+ private String accountNumber;
+
+ public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode";
+ @SerializedName(SERIALIZED_NAME_OFFICE_CODE)
+ private String officeCode;
+
public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince";
@SerializedName(SERIALIZED_NAME_NON_US_PROVINCE)
private String nonUsProvince;
@@ -291,13 +1156,65 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
private String countryCode;
- public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber";
- @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER)
- private String accountNumber;
+ public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate";
+ @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE)
+ private LocalDate federalEfileDate;
- public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode";
- @SerializedName(SERIALIZED_NAME_OFFICE_CODE)
- private String officeCode;
+ public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail";
+ @SerializedName(SERIALIZED_NAME_POSTAL_MAIL)
+ private Boolean postalMail;
+
+ public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate";
+ @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE)
+ private LocalDate stateEfileDate;
+
+ public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate";
+ @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE)
+ private LocalDate recipientEdeliveryDate;
+
+ public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch";
+ @SerializedName(SERIALIZED_NAME_TIN_MATCH)
+ private Boolean tinMatch;
+
+ public static final String SERIALIZED_NAME_NO_TIN = "noTin";
+ @SerializedName(SERIALIZED_NAME_NO_TIN)
+ private Boolean noTin;
+
+ public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification";
+ @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION)
+ private Boolean addressVerification;
+
+ public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding";
+ @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING)
+ private StateAndLocalWithholding stateAndLocalWithholding;
+
+ public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice";
+ @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE)
+ private Boolean secondTinNotice;
+
+ public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus";
+ @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS)
+ private Form1099StatusDetail federalEfileStatus;
+
+ public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus";
+ @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS)
+ private List stateEfileStatus;
+
+ public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus";
+ @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS)
+ private Form1099StatusDetail postalMailStatus;
+
+ public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus";
+ @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS)
+ private Form1099StatusDetail tinMatchStatus;
+
+ public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus";
+ @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS)
+ private Form1099StatusDetail addressVerificationStatus;
+
+ public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus";
+ @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS)
+ private Form1099StatusDetail eDeliveryStatus;
public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors";
@SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS)
@@ -311,20 +1228,54 @@ public class Form1042S {
@SerializedName(SERIALIZED_NAME_UPDATED_AT)
private OffsetDateTime updatedAt;
- public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding";
- @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING)
- private StateAndLocalWithholding stateAndLocalWithholding;
-
public Form1042S() {
}
+ public Form1042S(
+ TinTypeEnum tinType,
+ String id,
+ Form1099StatusDetail federalEfileStatus,
+ List stateEfileStatus,
+ Form1099StatusDetail postalMailStatus,
+ Form1099StatusDetail tinMatchStatus,
+ Form1099StatusDetail addressVerificationStatus,
+ Form1099StatusDetail eDeliveryStatus,
+ List validationErrors,
+ OffsetDateTime createdAt,
+ OffsetDateTime updatedAt
+ ) {
+ this();
+ this.tinType = tinType;
+ this.id = id;
+ this.federalEfileStatus = federalEfileStatus;
+ this.stateEfileStatus = stateEfileStatus;
+ this.postalMailStatus = postalMailStatus;
+ this.tinMatchStatus = tinMatchStatus;
+ this.addressVerificationStatus = addressVerificationStatus;
+ this.eDeliveryStatus = eDeliveryStatus;
+ this.validationErrors = validationErrors;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+
+ /**
+ * Get tinType
+ * @return tinType
+ */
+ @javax.annotation.Nullable
+ public TinTypeEnum getTinType() {
+ return tinType;
+ }
+
+
+
public Form1042S uniqueFormId(String uniqueFormId) {
this.uniqueFormId = uniqueFormId;
return this;
}
/**
- * Get uniqueFormId
+ * Unique form identifier
* @return uniqueFormId
*/
@javax.annotation.Nullable
@@ -337,21 +1288,21 @@ public void setUniqueFormId(String uniqueFormId) {
}
- public Form1042S recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) {
+ public Form1042S recipientDateOfBirth(LocalDate recipientDateOfBirth) {
this.recipientDateOfBirth = recipientDateOfBirth;
return this;
}
/**
- * Get recipientDateOfBirth
+ * Recipient's date of birth
* @return recipientDateOfBirth
*/
@javax.annotation.Nullable
- public OffsetDateTime getRecipientDateOfBirth() {
+ public LocalDate getRecipientDateOfBirth() {
return recipientDateOfBirth;
}
- public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) {
+ public void setRecipientDateOfBirth(LocalDate recipientDateOfBirth) {
this.recipientDateOfBirth = recipientDateOfBirth;
}
@@ -362,7 +1313,7 @@ public Form1042S recipientGiin(String recipientGiin) {
}
/**
- * Get recipientGiin
+ * Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'.
* @return recipientGiin
*/
@javax.annotation.Nullable
@@ -381,7 +1332,7 @@ public Form1042S recipientForeignTin(String recipientForeignTin) {
}
/**
- * Get recipientForeignTin
+ * Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode.
* @return recipientForeignTin
*/
@javax.annotation.Nullable
@@ -394,40 +1345,40 @@ public void setRecipientForeignTin(String recipientForeignTin) {
}
- public Form1042S lobCode(String lobCode) {
+ public Form1042S lobCode(LobCodeEnum lobCode) {
this.lobCode = lobCode;
return this;
}
/**
- * Get lobCode
+ * Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty
* @return lobCode
*/
@javax.annotation.Nullable
- public String getLobCode() {
+ public LobCodeEnum getLobCode() {
return lobCode;
}
- public void setLobCode(String lobCode) {
+ public void setLobCode(LobCodeEnum lobCode) {
this.lobCode = lobCode;
}
- public Form1042S incomeCode(String incomeCode) {
+ public Form1042S incomeCode(IncomeCodeEnum incomeCode) {
this.incomeCode = incomeCode;
return this;
}
/**
- * Get incomeCode
+ * Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined
* @return incomeCode
*/
@javax.annotation.Nullable
- public String getIncomeCode() {
+ public IncomeCodeEnum getIncomeCode() {
return incomeCode;
}
- public void setIncomeCode(String incomeCode) {
+ public void setIncomeCode(IncomeCodeEnum incomeCode) {
this.incomeCode = incomeCode;
}
@@ -438,7 +1389,7 @@ public Form1042S grossIncome(Double grossIncome) {
}
/**
- * Get grossIncome
+ * Gross income
* @return grossIncome
*/
@javax.annotation.Nullable
@@ -451,21 +1402,21 @@ public void setGrossIncome(Double grossIncome) {
}
- public Form1042S withholdingIndicator(String withholdingIndicator) {
+ public Form1042S withholdingIndicator(WithholdingIndicatorEnum withholdingIndicator) {
this.withholdingIndicator = withholdingIndicator;
return this;
}
/**
- * Get withholdingIndicator
+ * Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4
* @return withholdingIndicator
*/
@javax.annotation.Nullable
- public String getWithholdingIndicator() {
+ public WithholdingIndicatorEnum getWithholdingIndicator() {
return withholdingIndicator;
}
- public void setWithholdingIndicator(String withholdingIndicator) {
+ public void setWithholdingIndicator(WithholdingIndicatorEnum withholdingIndicator) {
this.withholdingIndicator = withholdingIndicator;
}
@@ -476,7 +1427,7 @@ public Form1042S taxCountryCode(String taxCountryCode) {
}
/**
- * Get taxCountryCode
+ * Country code
* @return taxCountryCode
*/
@javax.annotation.Nullable
@@ -489,59 +1440,59 @@ public void setTaxCountryCode(String taxCountryCode) {
}
- public Form1042S exemptionCodeChap3(String exemptionCodeChap3) {
+ public Form1042S exemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) {
this.exemptionCodeChap3 = exemptionCodeChap3;
return this;
}
/**
- * Get exemptionCodeChap3
+ * Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892
* @return exemptionCodeChap3
*/
@javax.annotation.Nullable
- public String getExemptionCodeChap3() {
+ public ExemptionCodeChap3Enum getExemptionCodeChap3() {
return exemptionCodeChap3;
}
- public void setExemptionCodeChap3(String exemptionCodeChap3) {
+ public void setExemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) {
this.exemptionCodeChap3 = exemptionCodeChap3;
}
- public Form1042S exemptionCodeChap4(String exemptionCodeChap4) {
+ public Form1042S exemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) {
this.exemptionCodeChap4 = exemptionCodeChap4;
return this;
}
/**
- * Get exemptionCodeChap4
+ * Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding
* @return exemptionCodeChap4
*/
@javax.annotation.Nullable
- public String getExemptionCodeChap4() {
+ public ExemptionCodeChap4Enum getExemptionCodeChap4() {
return exemptionCodeChap4;
}
- public void setExemptionCodeChap4(String exemptionCodeChap4) {
+ public void setExemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) {
this.exemptionCodeChap4 = exemptionCodeChap4;
}
- public Form1042S taxRateChap3(String taxRateChap3) {
+ public Form1042S taxRateChap3(TaxRateChap3Enum taxRateChap3) {
this.taxRateChap3 = taxRateChap3;
return this;
}
/**
- * Get taxRateChap3
+ * Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00%
* @return taxRateChap3
*/
@javax.annotation.Nullable
- public String getTaxRateChap3() {
+ public TaxRateChap3Enum getTaxRateChap3() {
return taxRateChap3;
}
- public void setTaxRateChap3(String taxRateChap3) {
+ public void setTaxRateChap3(TaxRateChap3Enum taxRateChap3) {
this.taxRateChap3 = taxRateChap3;
}
@@ -552,7 +1503,7 @@ public Form1042S withholdingAllowance(Double withholdingAllowance) {
}
/**
- * Get withholdingAllowance
+ * Withholding allowance
* @return withholdingAllowance
*/
@javax.annotation.Nullable
@@ -571,7 +1522,7 @@ public Form1042S federalTaxWithheld(Double federalTaxWithheld) {
}
/**
- * Get federalTaxWithheld
+ * Federal tax withheld
* @return federalTaxWithheld
*/
@javax.annotation.Nullable
@@ -590,7 +1541,7 @@ public Form1042S taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) {
}
/**
- * Get taxNotDepositedIndicator
+ * Tax not deposited indicator
* @return taxNotDepositedIndicator
*/
@javax.annotation.Nullable
@@ -609,7 +1560,7 @@ public Form1042S academicIndicator(Boolean academicIndicator) {
}
/**
- * Get academicIndicator
+ * Academic indicator
* @return academicIndicator
*/
@javax.annotation.Nullable
@@ -628,7 +1579,7 @@ public Form1042S taxWithheldOtherAgents(Double taxWithheldOtherAgents) {
}
/**
- * Get taxWithheldOtherAgents
+ * Tax withheld by other agents
* @return taxWithheldOtherAgents
*/
@javax.annotation.Nullable
@@ -647,7 +1598,7 @@ public Form1042S amountRepaid(Double amountRepaid) {
}
/**
- * Get amountRepaid
+ * Amount repaid to recipient
* @return amountRepaid
*/
@javax.annotation.Nullable
@@ -666,7 +1617,7 @@ public Form1042S taxPaidAgent(Double taxPaidAgent) {
}
/**
- * Get taxPaidAgent
+ * Tax paid by withholding agent
* @return taxPaidAgent
*/
@javax.annotation.Nullable
@@ -679,40 +1630,40 @@ public void setTaxPaidAgent(Double taxPaidAgent) {
}
- public Form1042S chap3StatusCode(String chap3StatusCode) {
+ public Form1042S chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) {
this.chap3StatusCode = chap3StatusCode;
return this;
}
/**
- * Get 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
* @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 Form1042S chap4StatusCode(String chap4StatusCode) {
+ public Form1042S chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) {
this.chap4StatusCode = chap4StatusCode;
return this;
}
/**
- * Get 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
* @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;
}
@@ -723,7 +1674,7 @@ public Form1042S primaryWithholdingAgent(PrimaryWithholdingAgent primaryWithhold
}
/**
- * Get primaryWithholdingAgent
+ * Primary withholding agent information
* @return primaryWithholdingAgent
*/
@javax.annotation.Nullable
@@ -742,7 +1693,7 @@ public Form1042S intermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediar
}
/**
- * Get intermediaryOrFlowThrough
+ * Intermediary or flow-through entity information
* @return intermediaryOrFlowThrough
*/
@javax.annotation.Nullable
@@ -755,59 +1706,51 @@ public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryO
}
- public Form1042S id(String id) {
- this.id = id;
+ public Form1042S type(TypeEnum type) {
+ this.type = type;
return this;
}
/**
- * Get id
- * @return id
+ * Form type
+ * @return type
*/
- @javax.annotation.Nullable
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
+ @javax.annotation.Nonnull
+ public TypeEnum getType() {
+ return type;
}
-
- public Form1042S type(String type) {
+ public void setType(TypeEnum type) {
this.type = type;
- return this;
}
+
/**
- * Get type
- * @return type
+ * Form ID. Unique identifier set when the record is created.
+ * @return id
*/
@javax.annotation.Nullable
- public String getType() {
- return type;
+ public String getId() {
+ return id;
}
- public void setType(String type) {
- this.type = type;
- }
- public Form1042S issuerId(Integer issuerId) {
+ public Form1042S issuerId(String issuerId) {
this.issuerId = issuerId;
return this;
}
/**
- * Get issuerId
+ * Issuer ID - only required when creating forms
* @return issuerId
*/
@javax.annotation.Nullable
- public Integer getIssuerId() {
+ public String getIssuerId() {
return issuerId;
}
- public void setIssuerId(Integer issuerId) {
+ public void setIssuerId(String issuerId) {
this.issuerId = issuerId;
}
@@ -818,7 +1761,7 @@ public Form1042S issuerReferenceId(String issuerReferenceId) {
}
/**
- * Get issuerReferenceId
+ * Issuer Reference ID - only required when creating forms
* @return issuerReferenceId
*/
@javax.annotation.Nullable
@@ -837,7 +1780,7 @@ public Form1042S issuerTin(String issuerTin) {
}
/**
- * Get issuerTin
+ * Issuer TIN - readonly
* @return issuerTin
*/
@javax.annotation.Nullable
@@ -856,7 +1799,7 @@ public Form1042S taxYear(Integer taxYear) {
}
/**
- * Get taxYear
+ * Tax Year - only required when creating forms
* @return taxYear
*/
@javax.annotation.Nullable
@@ -869,239 +1812,174 @@ public void setTaxYear(Integer taxYear) {
}
- public Form1042S federalEfile(Boolean federalEfile) {
- this.federalEfile = federalEfile;
- return this;
- }
-
- /**
- * Get federalEfile
- * @return federalEfile
- */
- @javax.annotation.Nullable
- public Boolean getFederalEfile() {
- return federalEfile;
- }
-
- public void setFederalEfile(Boolean federalEfile) {
- this.federalEfile = federalEfile;
- }
-
-
- public Form1042S federalEfileStatus(Form1099StatusDetail federalEfileStatus) {
- this.federalEfileStatus = federalEfileStatus;
- return this;
- }
-
- /**
- * Get federalEfileStatus
- * @return federalEfileStatus
- */
- @javax.annotation.Nullable
- public Form1099StatusDetail getFederalEfileStatus() {
- return federalEfileStatus;
- }
-
- public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) {
- this.federalEfileStatus = federalEfileStatus;
- }
-
-
- public Form1042S stateEfile(Boolean stateEfile) {
- this.stateEfile = stateEfile;
- return this;
- }
-
- /**
- * Get stateEfile
- * @return stateEfile
- */
- @javax.annotation.Nullable
- public Boolean getStateEfile() {
- return stateEfile;
- }
-
- public void setStateEfile(Boolean stateEfile) {
- this.stateEfile = stateEfile;
- }
-
-
- public Form1042S stateEfileStatus(List stateEfileStatus) {
- this.stateEfileStatus = stateEfileStatus;
- return this;
- }
-
- public Form1042S addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) {
- if (this.stateEfileStatus == null) {
- this.stateEfileStatus = new ArrayList<>();
- }
- this.stateEfileStatus.add(stateEfileStatusItem);
+ public Form1042S referenceId(String referenceId) {
+ this.referenceId = referenceId;
return this;
}
/**
- * Get stateEfileStatus
- * @return stateEfileStatus
+ * Internal reference ID. Never shown to any agency or recipient.
+ * @return referenceId
*/
@javax.annotation.Nullable
- public List getStateEfileStatus() {
- return stateEfileStatus;
+ public String getReferenceId() {
+ return referenceId;
}
- public void setStateEfileStatus(List stateEfileStatus) {
- this.stateEfileStatus = stateEfileStatus;
+ public void setReferenceId(String referenceId) {
+ this.referenceId = referenceId;
}
- public Form1042S postalMail(Boolean postalMail) {
- this.postalMail = postalMail;
+ public Form1042S tin(String tin) {
+ this.tin = tin;
return this;
}
/**
- * Get postalMail
- * @return postalMail
+ * Recipient's Federal Tax Identification Number (TIN).
+ * @return tin
*/
@javax.annotation.Nullable
- public Boolean getPostalMail() {
- return postalMail;
+ public String getTin() {
+ return tin;
}
- public void setPostalMail(Boolean postalMail) {
- this.postalMail = postalMail;
+ public void setTin(String tin) {
+ this.tin = tin;
}
- public Form1042S postalMailStatus(Form1099StatusDetail postalMailStatus) {
- this.postalMailStatus = postalMailStatus;
+ public Form1042S recipientName(String recipientName) {
+ this.recipientName = recipientName;
return this;
}
/**
- * Get postalMailStatus
- * @return postalMailStatus
+ * Recipient name
+ * @return recipientName
*/
@javax.annotation.Nullable
- public Form1099StatusDetail getPostalMailStatus() {
- return postalMailStatus;
+ public String getRecipientName() {
+ return recipientName;
}
- public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) {
- this.postalMailStatus = postalMailStatus;
+ public void setRecipientName(String recipientName) {
+ this.recipientName = recipientName;
}
- public Form1042S tinMatch(Boolean tinMatch) {
- this.tinMatch = tinMatch;
+ public Form1042S recipientSecondName(String recipientSecondName) {
+ this.recipientSecondName = recipientSecondName;
return this;
}
/**
- * Get tinMatch
- * @return tinMatch
+ * Recipient second name
+ * @return recipientSecondName
*/
@javax.annotation.Nullable
- public Boolean getTinMatch() {
- return tinMatch;
+ public String getRecipientSecondName() {
+ return recipientSecondName;
}
- public void setTinMatch(Boolean tinMatch) {
- this.tinMatch = tinMatch;
+ public void setRecipientSecondName(String recipientSecondName) {
+ this.recipientSecondName = recipientSecondName;
}
- public Form1042S tinMatchStatus(Form1099StatusDetail tinMatchStatus) {
- this.tinMatchStatus = tinMatchStatus;
+ public Form1042S address(String address) {
+ this.address = address;
return this;
}
/**
- * Get tinMatchStatus
- * @return tinMatchStatus
+ * Address.
+ * @return address
*/
@javax.annotation.Nullable
- public Form1099StatusDetail getTinMatchStatus() {
- return tinMatchStatus;
+ public String getAddress() {
+ return address;
}
- public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) {
- this.tinMatchStatus = tinMatchStatus;
+ public void setAddress(String address) {
+ this.address = address;
}
- public Form1042S addressVerification(Boolean addressVerification) {
- this.addressVerification = addressVerification;
+ public Form1042S address2(String address2) {
+ this.address2 = address2;
return this;
}
/**
- * Get addressVerification
- * @return addressVerification
+ * Address line 2.
+ * @return address2
*/
@javax.annotation.Nullable
- public Boolean getAddressVerification() {
- return addressVerification;
+ public String getAddress2() {
+ return address2;
}
- public void setAddressVerification(Boolean addressVerification) {
- this.addressVerification = addressVerification;
+ public void setAddress2(String address2) {
+ this.address2 = address2;
}
- public Form1042S addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) {
- this.addressVerificationStatus = addressVerificationStatus;
+ public Form1042S city(String city) {
+ this.city = city;
return this;
}
/**
- * Get addressVerificationStatus
- * @return addressVerificationStatus
+ * City.
+ * @return city
*/
@javax.annotation.Nullable
- public Form1099StatusDetail getAddressVerificationStatus() {
- return addressVerificationStatus;
+ public String getCity() {
+ return city;
}
- public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) {
- this.addressVerificationStatus = addressVerificationStatus;
+ public void setCity(String city) {
+ this.city = city;
}
- public Form1042S eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) {
- this.eDeliveryStatus = eDeliveryStatus;
+ public Form1042S state(String state) {
+ this.state = state;
return this;
}
/**
- * Get eDeliveryStatus
- * @return eDeliveryStatus
+ * Two-letter US state or Canadian province code (required for US/CA addresses).
+ * @return state
*/
@javax.annotation.Nullable
- public Form1099StatusDetail geteDeliveryStatus() {
- return eDeliveryStatus;
+ public String getState() {
+ return state;
}
- public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) {
- this.eDeliveryStatus = eDeliveryStatus;
+ public void setState(String state) {
+ this.state = state;
}
- public Form1042S referenceId(String referenceId) {
- this.referenceId = referenceId;
+ public Form1042S zip(String zip) {
+ this.zip = zip;
return this;
}
/**
- * Get referenceId
- * @return referenceId
+ * ZIP/postal code.
+ * @return zip
*/
@javax.annotation.Nullable
- public String getReferenceId() {
- return referenceId;
+ public String getZip() {
+ return zip;
}
- public void setReferenceId(String referenceId) {
- this.referenceId = referenceId;
+ public void setZip(String zip) {
+ this.zip = zip;
}
@@ -1111,7 +1989,7 @@ public Form1042S email(String email) {
}
/**
- * Get email
+ * Recipient's Contact email address.
* @return email
*/
@javax.annotation.Nullable
@@ -1124,325 +2002,321 @@ public void setEmail(String email) {
}
- public Form1042S tinType(String tinType) {
- this.tinType = tinType;
+ public Form1042S accountNumber(String accountNumber) {
+ this.accountNumber = accountNumber;
return this;
}
/**
- * Get tinType
- * @return tinType
+ * Account number
+ * @return accountNumber
*/
@javax.annotation.Nullable
- public String getTinType() {
- return tinType;
+ public String getAccountNumber() {
+ return accountNumber;
}
- public void setTinType(String tinType) {
- this.tinType = tinType;
+ public void setAccountNumber(String accountNumber) {
+ this.accountNumber = accountNumber;
}
- public Form1042S fatcaFilingRequirement(Boolean fatcaFilingRequirement) {
- this.fatcaFilingRequirement = fatcaFilingRequirement;
+ public Form1042S officeCode(String officeCode) {
+ this.officeCode = officeCode;
return this;
}
/**
- * Get fatcaFilingRequirement
- * @return fatcaFilingRequirement
+ * Office code
+ * @return officeCode
*/
@javax.annotation.Nullable
- public Boolean getFatcaFilingRequirement() {
- return fatcaFilingRequirement;
+ public String getOfficeCode() {
+ return officeCode;
}
- public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) {
- this.fatcaFilingRequirement = fatcaFilingRequirement;
+ public void setOfficeCode(String officeCode) {
+ this.officeCode = officeCode;
}
- public Form1042S tin(String tin) {
- this.tin = tin;
+ public Form1042S nonUsProvince(String nonUsProvince) {
+ this.nonUsProvince = nonUsProvince;
return this;
}
/**
- * Get tin
- * @return tin
+ * Province or region for non-US/CA addresses.
+ * @return nonUsProvince
*/
@javax.annotation.Nullable
- public String getTin() {
- return tin;
+ public String getNonUsProvince() {
+ return nonUsProvince;
}
- public void setTin(String tin) {
- this.tin = tin;
+ public void setNonUsProvince(String nonUsProvince) {
+ this.nonUsProvince = nonUsProvince;
}
- public Form1042S noTin(Boolean noTin) {
- this.noTin = noTin;
+ public Form1042S countryCode(String countryCode) {
+ this.countryCode = countryCode;
return this;
}
/**
- * Get noTin
- * @return noTin
+ * 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 Boolean getNoTin() {
- return noTin;
+ public String getCountryCode() {
+ return countryCode;
}
- public void setNoTin(Boolean noTin) {
- this.noTin = noTin;
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
}
- public Form1042S secondTinNotice(Boolean secondTinNotice) {
- this.secondTinNotice = secondTinNotice;
+ public Form1042S federalEfileDate(LocalDate federalEfileDate) {
+ this.federalEfileDate = federalEfileDate;
return this;
}
/**
- * Get secondTinNotice
- * @return secondTinNotice
+ * Date when federal e-filing should be scheduled for this form
+ * @return federalEfileDate
*/
@javax.annotation.Nullable
- public Boolean getSecondTinNotice() {
- return secondTinNotice;
+ public LocalDate getFederalEfileDate() {
+ return federalEfileDate;
}
- public void setSecondTinNotice(Boolean secondTinNotice) {
- this.secondTinNotice = secondTinNotice;
+ public void setFederalEfileDate(LocalDate federalEfileDate) {
+ this.federalEfileDate = federalEfileDate;
}
- public Form1042S recipientName(String recipientName) {
- this.recipientName = recipientName;
+ public Form1042S postalMail(Boolean postalMail) {
+ this.postalMail = postalMail;
return this;
}
/**
- * Get recipientName
- * @return recipientName
+ * Boolean indicating that postal mailing to the recipient should be scheduled for this form
+ * @return postalMail
*/
@javax.annotation.Nullable
- public String getRecipientName() {
- return recipientName;
+ public Boolean getPostalMail() {
+ return postalMail;
}
- public void setRecipientName(String recipientName) {
- this.recipientName = recipientName;
+ public void setPostalMail(Boolean postalMail) {
+ this.postalMail = postalMail;
}
- public Form1042S recipientSecondName(String recipientSecondName) {
- this.recipientSecondName = recipientSecondName;
+ public Form1042S stateEfileDate(LocalDate stateEfileDate) {
+ this.stateEfileDate = stateEfileDate;
return this;
}
/**
- * Get recipientSecondName
- * @return recipientSecondName
+ * Date when state e-filing should be scheduled for this form
+ * @return stateEfileDate
*/
@javax.annotation.Nullable
- public String getRecipientSecondName() {
- return recipientSecondName;
+ public LocalDate getStateEfileDate() {
+ return stateEfileDate;
}
- public void setRecipientSecondName(String recipientSecondName) {
- this.recipientSecondName = recipientSecondName;
+ public void setStateEfileDate(LocalDate stateEfileDate) {
+ this.stateEfileDate = stateEfileDate;
}
- public Form1042S address(String address) {
- this.address = address;
+ public Form1042S recipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
+ this.recipientEdeliveryDate = recipientEdeliveryDate;
return this;
}
/**
- * Get address
- * @return address
+ * Date when recipient e-delivery should be scheduled for this form
+ * @return recipientEdeliveryDate
*/
@javax.annotation.Nullable
- public String getAddress() {
- return address;
+ public LocalDate getRecipientEdeliveryDate() {
+ return recipientEdeliveryDate;
}
- public void setAddress(String address) {
- this.address = address;
+ public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) {
+ this.recipientEdeliveryDate = recipientEdeliveryDate;
}
- public Form1042S address2(String address2) {
- this.address2 = address2;
+ public Form1042S tinMatch(Boolean tinMatch) {
+ this.tinMatch = tinMatch;
return this;
}
/**
- * Get address2
- * @return address2
+ * Boolean indicating that TIN Matching should be scheduled for this form
+ * @return tinMatch
*/
@javax.annotation.Nullable
- public String getAddress2() {
- return address2;
+ public Boolean getTinMatch() {
+ return tinMatch;
}
- public void setAddress2(String address2) {
- this.address2 = address2;
+ public void setTinMatch(Boolean tinMatch) {
+ this.tinMatch = tinMatch;
}
- public Form1042S city(String city) {
- this.city = city;
+ public Form1042S noTin(Boolean noTin) {
+ this.noTin = noTin;
return this;
}
/**
- * Get city
- * @return city
+ * No TIN indicator
+ * @return noTin
*/
@javax.annotation.Nullable
- public String getCity() {
- return city;
+ public Boolean getNoTin() {
+ return noTin;
}
- public void setCity(String city) {
- this.city = city;
+ public void setNoTin(Boolean noTin) {
+ this.noTin = noTin;
}
- public Form1042S state(String state) {
- this.state = state;
+ public Form1042S addressVerification(Boolean addressVerification) {
+ this.addressVerification = addressVerification;
return this;
}
/**
- * Get state
- * @return state
+ * Boolean indicating that address verification should be scheduled for this form
+ * @return addressVerification
*/
@javax.annotation.Nullable
- public String getState() {
- return state;
+ public Boolean getAddressVerification() {
+ return addressVerification;
}
- public void setState(String state) {
- this.state = state;
+ public void setAddressVerification(Boolean addressVerification) {
+ this.addressVerification = addressVerification;
}
- public Form1042S zip(String zip) {
- this.zip = zip;
+ public Form1042S stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) {
+ this.stateAndLocalWithholding = stateAndLocalWithholding;
return this;
}
/**
- * Get zip
- * @return zip
+ * State and local withholding information
+ * @return stateAndLocalWithholding
*/
@javax.annotation.Nullable
- public String getZip() {
- return zip;
+ public StateAndLocalWithholding getStateAndLocalWithholding() {
+ return stateAndLocalWithholding;
}
- public void setZip(String zip) {
- this.zip = zip;
+ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) {
+ this.stateAndLocalWithholding = stateAndLocalWithholding;
}
- public Form1042S nonUsProvince(String nonUsProvince) {
- this.nonUsProvince = nonUsProvince;
+ public Form1042S secondTinNotice(Boolean secondTinNotice) {
+ this.secondTinNotice = secondTinNotice;
return this;
}
/**
- * Get nonUsProvince
- * @return nonUsProvince
+ * Second TIN notice
+ * @return secondTinNotice
*/
@javax.annotation.Nullable
- public String getNonUsProvince() {
- return nonUsProvince;
+ public Boolean getSecondTinNotice() {
+ return secondTinNotice;
}
- public void setNonUsProvince(String nonUsProvince) {
- this.nonUsProvince = nonUsProvince;
+ public void setSecondTinNotice(Boolean secondTinNotice) {
+ this.secondTinNotice = secondTinNotice;
}
- public Form1042S countryCode(String countryCode) {
- this.countryCode = countryCode;
- return this;
+ /**
+ * Federal e-file status
+ * @return federalEfileStatus
+ */
+ @javax.annotation.Nullable
+ public Form1099StatusDetail getFederalEfileStatus() {
+ return federalEfileStatus;
}
+
+
/**
- * Get countryCode
- * @return countryCode
+ * State e-file status
+ * @return stateEfileStatus
*/
@javax.annotation.Nullable
- public String getCountryCode() {
- return countryCode;
+ public List getStateEfileStatus() {
+ return stateEfileStatus;
}
- public void setCountryCode(String countryCode) {
- this.countryCode = countryCode;
- }
- public Form1042S accountNumber(String accountNumber) {
- this.accountNumber = accountNumber;
- return this;
+ /**
+ * Postal mail to recipient status
+ * @return postalMailStatus
+ */
+ @javax.annotation.Nullable
+ public Form1099StatusDetail getPostalMailStatus() {
+ return postalMailStatus;
}
+
+
/**
- * Get accountNumber
- * @return accountNumber
+ * TIN Match status
+ * @return tinMatchStatus
*/
@javax.annotation.Nullable
- public String getAccountNumber() {
- return accountNumber;
+ public Form1099StatusDetail getTinMatchStatus() {
+ return tinMatchStatus;
}
- public void setAccountNumber(String accountNumber) {
- this.accountNumber = accountNumber;
- }
- public Form1042S officeCode(String officeCode) {
- this.officeCode = officeCode;
- return this;
+ /**
+ * Address verification status
+ * @return addressVerificationStatus
+ */
+ @javax.annotation.Nullable
+ public Form1099StatusDetail getAddressVerificationStatus() {
+ return addressVerificationStatus;
}
+
+
/**
- * Get officeCode
- * @return officeCode
+ * EDelivery status
+ * @return eDeliveryStatus
*/
@javax.annotation.Nullable
- public String getOfficeCode() {
- return officeCode;
- }
-
- public void setOfficeCode(String officeCode) {
- this.officeCode = officeCode;
+ public Form1099StatusDetail geteDeliveryStatus() {
+ return eDeliveryStatus;
}
- public Form1042S validationErrors(List validationErrors) {
- this.validationErrors = validationErrors;
- return this;
- }
-
- public Form1042S addValidationErrorsItem(ValidationError validationErrorsItem) {
- if (this.validationErrors == null) {
- this.validationErrors = new ArrayList<>();
- }
- this.validationErrors.add(validationErrorsItem);
- return this;
- }
/**
- * Get validationErrors
+ * Validation errors
* @return validationErrors
*/
@javax.annotation.Nullable
@@ -1450,18 +2324,10 @@ public List getValidationErrors() {
return validationErrors;
}
- public void setValidationErrors(List validationErrors) {
- this.validationErrors = validationErrors;
- }
-
- public Form1042S createdAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
/**
- * Get createdAt
+ * Date time when the record was created.
* @return createdAt
*/
@javax.annotation.Nullable
@@ -1469,18 +2335,10 @@ public OffsetDateTime getCreatedAt() {
return createdAt;
}
- public void setCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- }
-
- public Form1042S updatedAt(OffsetDateTime updatedAt) {
- this.updatedAt = updatedAt;
- return this;
- }
/**
- * Get updatedAt
+ * Date time when the record was last updated.
* @return updatedAt
*/
@javax.annotation.Nullable
@@ -1488,28 +2346,6 @@ public OffsetDateTime getUpdatedAt() {
return updatedAt;
}
- public void setUpdatedAt(OffsetDateTime updatedAt) {
- this.updatedAt = updatedAt;
- }
-
-
- public Form1042S stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) {
- this.stateAndLocalWithholding = stateAndLocalWithholding;
- return this;
- }
-
- /**
- * Get stateAndLocalWithholding
- * @return stateAndLocalWithholding
- */
- @javax.annotation.Nullable
- public StateAndLocalWithholding getStateAndLocalWithholding() {
- return stateAndLocalWithholding;
- }
-
- public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) {
- this.stateAndLocalWithholding = stateAndLocalWithholding;
- }
@@ -1522,7 +2358,8 @@ public boolean equals(Object o) {
return false;
}
Form1042S form1042S = (Form1042S) o;
- return Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) &&
+ return Objects.equals(this.tinType, form1042S.tinType) &&
+ Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) &&
Objects.equals(this.recipientDateOfBirth, form1042S.recipientDateOfBirth) &&
Objects.equals(this.recipientGiin, form1042S.recipientGiin) &&
Objects.equals(this.recipientForeignTin, form1042S.recipientForeignTin) &&
@@ -1545,30 +2382,14 @@ public boolean equals(Object o) {
Objects.equals(this.chap4StatusCode, form1042S.chap4StatusCode) &&
Objects.equals(this.primaryWithholdingAgent, form1042S.primaryWithholdingAgent) &&
Objects.equals(this.intermediaryOrFlowThrough, form1042S.intermediaryOrFlowThrough) &&
- Objects.equals(this.id, form1042S.id) &&
Objects.equals(this.type, form1042S.type) &&
+ Objects.equals(this.id, form1042S.id) &&
Objects.equals(this.issuerId, form1042S.issuerId) &&
Objects.equals(this.issuerReferenceId, form1042S.issuerReferenceId) &&
Objects.equals(this.issuerTin, form1042S.issuerTin) &&
Objects.equals(this.taxYear, form1042S.taxYear) &&
- Objects.equals(this.federalEfile, form1042S.federalEfile) &&
- Objects.equals(this.federalEfileStatus, form1042S.federalEfileStatus) &&
- Objects.equals(this.stateEfile, form1042S.stateEfile) &&
- Objects.equals(this.stateEfileStatus, form1042S.stateEfileStatus) &&
- Objects.equals(this.postalMail, form1042S.postalMail) &&
- Objects.equals(this.postalMailStatus, form1042S.postalMailStatus) &&
- Objects.equals(this.tinMatch, form1042S.tinMatch) &&
- Objects.equals(this.tinMatchStatus, form1042S.tinMatchStatus) &&
- Objects.equals(this.addressVerification, form1042S.addressVerification) &&
- Objects.equals(this.addressVerificationStatus, form1042S.addressVerificationStatus) &&
- Objects.equals(this.eDeliveryStatus, form1042S.eDeliveryStatus) &&
Objects.equals(this.referenceId, form1042S.referenceId) &&
- Objects.equals(this.email, form1042S.email) &&
- Objects.equals(this.tinType, form1042S.tinType) &&
- Objects.equals(this.fatcaFilingRequirement, form1042S.fatcaFilingRequirement) &&
Objects.equals(this.tin, form1042S.tin) &&
- Objects.equals(this.noTin, form1042S.noTin) &&
- Objects.equals(this.secondTinNotice, form1042S.secondTinNotice) &&
Objects.equals(this.recipientName, form1042S.recipientName) &&
Objects.equals(this.recipientSecondName, form1042S.recipientSecondName) &&
Objects.equals(this.address, form1042S.address) &&
@@ -1576,14 +2397,29 @@ public boolean equals(Object o) {
Objects.equals(this.city, form1042S.city) &&
Objects.equals(this.state, form1042S.state) &&
Objects.equals(this.zip, form1042S.zip) &&
- Objects.equals(this.nonUsProvince, form1042S.nonUsProvince) &&
- Objects.equals(this.countryCode, form1042S.countryCode) &&
+ Objects.equals(this.email, form1042S.email) &&
Objects.equals(this.accountNumber, form1042S.accountNumber) &&
Objects.equals(this.officeCode, form1042S.officeCode) &&
+ Objects.equals(this.nonUsProvince, form1042S.nonUsProvince) &&
+ Objects.equals(this.countryCode, form1042S.countryCode) &&
+ Objects.equals(this.federalEfileDate, form1042S.federalEfileDate) &&
+ Objects.equals(this.postalMail, form1042S.postalMail) &&
+ Objects.equals(this.stateEfileDate, form1042S.stateEfileDate) &&
+ Objects.equals(this.recipientEdeliveryDate, form1042S.recipientEdeliveryDate) &&
+ Objects.equals(this.tinMatch, form1042S.tinMatch) &&
+ Objects.equals(this.noTin, form1042S.noTin) &&
+ Objects.equals(this.addressVerification, form1042S.addressVerification) &&
+ Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding) &&
+ Objects.equals(this.secondTinNotice, form1042S.secondTinNotice) &&
+ Objects.equals(this.federalEfileStatus, form1042S.federalEfileStatus) &&
+ Objects.equals(this.stateEfileStatus, form1042S.stateEfileStatus) &&
+ Objects.equals(this.postalMailStatus, form1042S.postalMailStatus) &&
+ Objects.equals(this.tinMatchStatus, form1042S.tinMatchStatus) &&
+ Objects.equals(this.addressVerificationStatus, form1042S.addressVerificationStatus) &&
+ Objects.equals(this.eDeliveryStatus, form1042S.eDeliveryStatus) &&
Objects.equals(this.validationErrors, form1042S.validationErrors) &&
Objects.equals(this.createdAt, form1042S.createdAt) &&
- Objects.equals(this.updatedAt, form1042S.updatedAt) &&
- Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding);
+ Objects.equals(this.updatedAt, form1042S.updatedAt);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
@@ -1592,7 +2428,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b)
@Override
public int hashCode() {
- return Objects.hash(uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding);
+ return Objects.hash(tinType, uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt);
}
private static