From 91d2aeeeeb0b1a44797f854cdfaf3e5f67ffbd71 Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Fri, 15 Aug 2025 08:41:03 -0700 Subject: [PATCH] 25.8.2 --- README.md | 30 +- docs/A1099/V2/CompaniesW9Api.md | 10 +- docs/A1099/V2/Create1099Form201Response.md | 44 +- docs/A1099/V2/CreateW9Form201Response.md | 53 +- docs/A1099/V2/ErrorResponse.md | 2 +- docs/A1099/V2/ErrorResponseItem.md | 14 + docs/A1099/V2/Form1042S.md | 74 + docs/A1099/V2/Form1042SListItem.md | 7 +- docs/A1099/V2/Form1042SRequest.md | 8 +- docs/A1099/V2/Form1042SResponse.md | 1 + docs/A1099/V2/Form1095B.md | 8 +- docs/A1099/V2/Form1095BListItem.md | 7 +- docs/A1099/V2/Form1095BRequest.md | 8 +- docs/A1099/V2/Form1095BResponse.md | 98 + docs/A1099/V2/Form1095CListItem.md | 7 +- docs/A1099/V2/Form1099Base.md | 8 +- docs/A1099/V2/Form1099Div.md | 69 + docs/A1099/V2/Form1099DivListItem.md | 40 +- docs/A1099/V2/Form1099DivListItemResponse.md | 34 +- docs/A1099/V2/Form1099DivRequest.md | 41 +- docs/A1099/V2/Form1099DivResponse.md | 20 + docs/A1099/V2/Form1099Int.md | 65 + docs/A1099/V2/Form1099IntList.md | 14 + docs/A1099/V2/Form1099IntListItem.md | 65 + docs/A1099/V2/Form1099IntListItemResponse.md | 65 + docs/A1099/V2/Form1099IntRequest.md | 79 + docs/A1099/V2/Form1099IntResponse.md | 91 + docs/A1099/V2/Form1099K.md | 8 +- docs/A1099/V2/Form1099KListItem.md | 7 +- docs/A1099/V2/Form1099KRequest.md | 8 +- docs/A1099/V2/Form1099KResponse.md | 1 + .../V2/Form1099ListResponseValueInner.md | 44 +- docs/A1099/V2/Form1099Misc.md | 18 +- docs/A1099/V2/Form1099MiscListItem.md | 6 +- docs/A1099/V2/Form1099MiscRequest.md | 7 +- docs/A1099/V2/Form1099MiscResponse.md | 1 + docs/A1099/V2/Form1099Nec.md | 8 +- docs/A1099/V2/Form1099NecListItem.md | 7 +- docs/A1099/V2/Form1099NecRequest.md | 8 +- docs/A1099/V2/Form1099NecResponse.md | 1 + docs/A1099/V2/Form1099ProccessResult.md | 1 + ...rm1099ProccessResultProcessedFormsInner.md | 176 ++ docs/A1099/V2/Form1099R.md | 9 +- docs/A1099/V2/Form1099RListItem.md | 6 +- docs/A1099/V2/Form1099RListItemResponse.md | 1 - docs/A1099/V2/Form1099RRequest.md | 7 +- docs/A1099/V2/Form1099RResponse.md | 97 + docs/A1099/V2/FormRequestBase.md | 7 +- docs/A1099/V2/FormRequestListItemBase.md | 7 +- docs/A1099/V2/FormResponseBase.md | 1 + docs/A1099/V2/FormSingleRequestBase.md | 8 +- docs/A1099/V2/Forms1099Api.md | 14 +- docs/A1099/V2/FormsW9Api.md | 42 +- docs/A1099/V2/Get1099Form200Response.md | 44 +- docs/A1099/V2/ICreateForm1099Request.md | 41 +- docs/A1099/V2/IUpdateForm1099Request.md | 41 +- docs/A1099/V2/Issuers1099Api.md | 10 +- docs/A1099/V2/Jobs1099Api.md | 2 +- ...natedQueryResultModelW9FormBaseResponse.md | 16 + docs/A1099/V2/Update1099Form200Response.md | 72 +- docs/A1099/V2/W4FormResponse.md | 14 - docs/A1099/V2/W8BenEFormResponse.md | 14 - docs/A1099/V2/W8BenFormResponse.md | 14 - docs/A1099/V2/W8ImyFormResponse.md | 14 - docs/A1099/V2/W9FormBaseResponse.md | 2 +- docs/A1099/V2/W9FormResponse.md | 14 - pom.xml | 2 +- .../SDK/api/A1099/V2/CompaniesW9Api.java | 2 +- .../SDK/api/A1099/V2/Forms1099Api.java | 2 +- .../Avalara/SDK/api/A1099/V2/FormsW9Api.java | 50 +- .../SDK/api/A1099/V2/Issuers1099Api.java | 2 +- .../Avalara/SDK/api/A1099/V2/Jobs1099Api.java | 2 +- .../api/EInvoicing/V1/DataInputFieldsApi.java | 2 +- .../SDK/api/EInvoicing/V1/DocumentsApi.java | 2 +- .../SDK/api/EInvoicing/V1/InteropApi.java | 2 +- .../SDK/api/EInvoicing/V1/MandatesApi.java | 2 +- .../api/EInvoicing/V1/SubscriptionsApi.java | 2 +- .../api/EInvoicing/V1/TaxIdentifiersApi.java | 2 +- .../api/EInvoicing/V1/TradingPartnersApi.java | 2 +- .../A1099/V2/BulkUpsert1099FormsRequest.java | 56 +- .../A1099/V2/CoveredIndividualReference.java | 2 +- .../A1099/V2/Create1099Form201Response.java | 56 +- .../SDK/model/A1099/V2/ErrorResponse.java | 14 +- .../SDK/model/A1099/V2/ErrorResponseItem.java | 253 +++ .../Avalara/SDK/model/A1099/V2/Form1042S.java | 1962 +++++++++++++++++ .../SDK/model/A1099/V2/Form1042SListItem.java | 50 +- .../SDK/model/A1099/V2/Form1042SRequest.java | 54 +- .../SDK/model/A1099/V2/Form1042SResponse.java | 4 +- .../Avalara/SDK/model/A1099/V2/Form1095B.java | 204 +- .../SDK/model/A1099/V2/Form1095BListItem.java | 50 +- .../SDK/model/A1099/V2/Form1095BRequest.java | 54 +- .../SDK/model/A1099/V2/Form1095BResponse.java | 1726 +++++++++++++++ .../SDK/model/A1099/V2/Form1095CListItem.java | 43 +- .../SDK/model/A1099/V2/Form1099Base.java | 202 +- .../SDK/model/A1099/V2/Form1099Div.java | 1794 +++++++++++++++ .../model/A1099/V2/Form1099DivListItem.java | 203 +- .../A1099/V2/Form1099DivListItemResponse.java | 187 +- .../model/A1099/V2/Form1099DivRequest.java | 214 +- .../model/A1099/V2/Form1099DivResponse.java | 486 +++- .../SDK/model/A1099/V2/Form1099Int.java | 1697 ++++++++++++++ .../SDK/model/A1099/V2/Form1099IntList.java | 262 +++ .../model/A1099/V2/Form1099IntListItem.java | 1406 ++++++++++++ .../A1099/V2/Form1099IntListItemResponse.java | 1641 ++++++++++++++ .../model/A1099/V2/Form1099IntRequest.java | 1413 ++++++++++++ .../model/A1099/V2/Form1099IntResponse.java | 1803 +++++++++++++++ .../Avalara/SDK/model/A1099/V2/Form1099K.java | 202 +- .../SDK/model/A1099/V2/Form1099KListItem.java | 43 +- .../SDK/model/A1099/V2/Form1099KRequest.java | 54 +- .../SDK/model/A1099/V2/Form1099KResponse.java | 4 +- .../V2/Form1099ListResponseValueInner.java | 56 +- .../SDK/model/A1099/V2/Form1099Misc.java | 356 ++- .../model/A1099/V2/Form1099MiscListItem.java | 16 +- .../model/A1099/V2/Form1099MiscRequest.java | 27 +- .../model/A1099/V2/Form1099MiscResponse.java | 4 +- .../SDK/model/A1099/V2/Form1099Nec.java | 202 +- .../model/A1099/V2/Form1099NecListItem.java | 43 +- .../model/A1099/V2/Form1099NecRequest.java | 47 +- .../model/A1099/V2/Form1099NecResponse.java | 4 +- .../A1099/V2/Form1099ProccessResult.java | 67 +- ...1099ProccessResultProcessedFormsInner.java | 555 +++++ .../Avalara/SDK/model/A1099/V2/Form1099R.java | 227 +- .../SDK/model/A1099/V2/Form1099RListItem.java | 16 +- .../A1099/V2/Form1099RListItemResponse.java | 27 +- .../SDK/model/A1099/V2/Form1099RRequest.java | 27 +- .../SDK/model/A1099/V2/Form1099RResponse.java | 1962 +++++++++++++++++ .../model/A1099/V2/Form1099StatusDetail.java | 2 +- .../SDK/model/A1099/V2/FormRequestBase.java | 50 +- .../A1099/V2/FormRequestListItemBase.java | 43 +- .../SDK/model/A1099/V2/FormResponseBase.java | 4 +- .../model/A1099/V2/FormSingleRequestBase.java | 54 +- .../A1099/V2/Get1099Form200Response.java | 56 +- .../SDK/model/A1099/V2/IncludedBase.java | 2 +- ...tedQueryResultModelW9FormBaseResponse.java | 301 +++ .../A1099/V2/StateAndLocalWithholding.java | 2 +- .../A1099/V2/StateEfileStatusDetail.java | 2 +- .../A1099/V2/Update1099Form200Response.java | 145 +- .../SDK/model/A1099/V2/ValidationError.java | 2 +- .../SDK/model/A1099/V2/W4FormResponse.java | 421 +--- .../model/A1099/V2/W8BenEFormResponse.java | 531 +---- .../SDK/model/A1099/V2/W8BenFormResponse.java | 454 +--- .../SDK/model/A1099/V2/W8ImyFormResponse.java | 499 +---- .../model/A1099/V2/W9FormBaseResponse.java | 133 +- .../SDK/model/A1099/V2/W9FormResponse.java | 431 +--- 143 files changed, 21063 insertions(+), 3678 deletions(-) create mode 100644 docs/A1099/V2/ErrorResponseItem.md create mode 100644 docs/A1099/V2/Form1042S.md create mode 100644 docs/A1099/V2/Form1095BResponse.md create mode 100644 docs/A1099/V2/Form1099Div.md create mode 100644 docs/A1099/V2/Form1099Int.md create mode 100644 docs/A1099/V2/Form1099IntList.md create mode 100644 docs/A1099/V2/Form1099IntListItem.md create mode 100644 docs/A1099/V2/Form1099IntListItemResponse.md create mode 100644 docs/A1099/V2/Form1099IntRequest.md create mode 100644 docs/A1099/V2/Form1099IntResponse.md create mode 100644 docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md create mode 100644 docs/A1099/V2/Form1099RResponse.md create mode 100644 docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java diff --git a/README.md b/README.md index 9e374dc..63b757b 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.CompanyModel](docs/A1099/V2/CompanyModel.md) - [Avalara.SDK.model.A1099.V2.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - [Avalara.SDK.model.A1099.V2.CompanyResponseModel](docs/A1099/V2/CompanyResponseModel.md) + - [Avalara.SDK.model.A1099.V2.CoveredIndividualReference](docs/A1099/V2/CoveredIndividualReference.md) - [Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse](docs/A1099/V2/CoveredIndividualReferenceResponse.md) - [Avalara.SDK.model.A1099.V2.CoveredIndividualRequest](docs/A1099/V2/CoveredIndividualRequest.md) - [Avalara.SDK.model.A1099.V2.Create1099Form201Response](docs/A1099/V2/Create1099Form201Response.md) @@ -268,24 +269,36 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Data](docs/A1099/V2/Data.md) - [Avalara.SDK.model.A1099.V2.ErrorModel](docs/A1099/V2/ErrorModel.md) - [Avalara.SDK.model.A1099.V2.ErrorResponse](docs/A1099/V2/ErrorResponse.md) - - [Avalara.SDK.model.A1099.V2.ErrorResponseErrorsInner](docs/A1099/V2/ErrorResponseErrorsInner.md) + - [Avalara.SDK.model.A1099.V2.ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) + - [Avalara.SDK.model.A1099.V2.Form1042S](docs/A1099/V2/Form1042S.md) - [Avalara.SDK.model.A1099.V2.Form1042SList](docs/A1099/V2/Form1042SList.md) - [Avalara.SDK.model.A1099.V2.Form1042SListItem](docs/A1099/V2/Form1042SListItem.md) - [Avalara.SDK.model.A1099.V2.Form1042SListItemResponse](docs/A1099/V2/Form1042SListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1042SRequest](docs/A1099/V2/Form1042SRequest.md) - [Avalara.SDK.model.A1099.V2.Form1042SResponse](docs/A1099/V2/Form1042SResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1095B](docs/A1099/V2/Form1095B.md) - [Avalara.SDK.model.A1099.V2.Form1095BList](docs/A1099/V2/Form1095BList.md) - [Avalara.SDK.model.A1099.V2.Form1095BListItem](docs/A1099/V2/Form1095BListItem.md) - [Avalara.SDK.model.A1099.V2.Form1095BListItemResponse](docs/A1099/V2/Form1095BListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1095BRequest](docs/A1099/V2/Form1095BRequest.md) + - [Avalara.SDK.model.A1099.V2.Form1095BResponse](docs/A1099/V2/Form1095BResponse.md) - [Avalara.SDK.model.A1099.V2.Form1095CList](docs/A1099/V2/Form1095CList.md) - [Avalara.SDK.model.A1099.V2.Form1095CListItem](docs/A1099/V2/Form1095CListItem.md) + - [Avalara.SDK.model.A1099.V2.Form1099Base](docs/A1099/V2/Form1099Base.md) - [Avalara.SDK.model.A1099.V2.Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099Div](docs/A1099/V2/Form1099Div.md) - [Avalara.SDK.model.A1099.V2.Form1099DivList](docs/A1099/V2/Form1099DivList.md) - [Avalara.SDK.model.A1099.V2.Form1099DivListItem](docs/A1099/V2/Form1099DivListItem.md) - [Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse](docs/A1099/V2/Form1099DivListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - [Avalara.SDK.model.A1099.V2.Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099Int](docs/A1099/V2/Form1099Int.md) + - [Avalara.SDK.model.A1099.V2.Form1099IntList](docs/A1099/V2/Form1099IntList.md) + - [Avalara.SDK.model.A1099.V2.Form1099IntListItem](docs/A1099/V2/Form1099IntListItem.md) + - [Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse](docs/A1099/V2/Form1099IntListItemResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099IntRequest](docs/A1099/V2/Form1099IntRequest.md) + - [Avalara.SDK.model.A1099.V2.Form1099IntResponse](docs/A1099/V2/Form1099IntResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099K](docs/A1099/V2/Form1099K.md) - [Avalara.SDK.model.A1099.V2.Form1099KList](docs/A1099/V2/Form1099KList.md) - [Avalara.SDK.model.A1099.V2.Form1099KListItem](docs/A1099/V2/Form1099KListItem.md) - [Avalara.SDK.model.A1099.V2.Form1099KListItemResponse](docs/A1099/V2/Form1099KListItemResponse.md) @@ -293,30 +306,36 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1099KResponse](docs/A1099/V2/Form1099KResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099ListResponse](docs/A1099/V2/Form1099ListResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099ListResponseValueInner](docs/A1099/V2/Form1099ListResponseValueInner.md) + - [Avalara.SDK.model.A1099.V2.Form1099Misc](docs/A1099/V2/Form1099Misc.md) - [Avalara.SDK.model.A1099.V2.Form1099MiscList](docs/A1099/V2/Form1099MiscList.md) - [Avalara.SDK.model.A1099.V2.Form1099MiscListItem](docs/A1099/V2/Form1099MiscListItem.md) - [Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse](docs/A1099/V2/Form1099MiscListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099MiscRequest](docs/A1099/V2/Form1099MiscRequest.md) - [Avalara.SDK.model.A1099.V2.Form1099MiscResponse](docs/A1099/V2/Form1099MiscResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099Nec](docs/A1099/V2/Form1099Nec.md) - [Avalara.SDK.model.A1099.V2.Form1099NecList](docs/A1099/V2/Form1099NecList.md) - [Avalara.SDK.model.A1099.V2.Form1099NecListItem](docs/A1099/V2/Form1099NecListItem.md) - [Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse](docs/A1099/V2/Form1099NecListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099NecRequest](docs/A1099/V2/Form1099NecRequest.md) - [Avalara.SDK.model.A1099.V2.Form1099NecResponse](docs/A1099/V2/Form1099NecResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099ProccessResult](docs/A1099/V2/Form1099ProccessResult.md) + - [Avalara.SDK.model.A1099.V2.Form1099ProccessResultProcessedFormsInner](docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md) + - [Avalara.SDK.model.A1099.V2.Form1099R](docs/A1099/V2/Form1099R.md) - [Avalara.SDK.model.A1099.V2.Form1099RList](docs/A1099/V2/Form1099RList.md) - [Avalara.SDK.model.A1099.V2.Form1099RListItem](docs/A1099/V2/Form1099RListItem.md) - [Avalara.SDK.model.A1099.V2.Form1099RListItemResponse](docs/A1099/V2/Form1099RListItemResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099RRequest](docs/A1099/V2/Form1099RRequest.md) + - [Avalara.SDK.model.A1099.V2.Form1099RResponse](docs/A1099/V2/Form1099RResponse.md) + - [Avalara.SDK.model.A1099.V2.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - [Avalara.SDK.model.A1099.V2.FormRequestBase](docs/A1099/V2/FormRequestBase.md) - [Avalara.SDK.model.A1099.V2.FormRequestListItemBase](docs/A1099/V2/FormRequestListItemBase.md) - [Avalara.SDK.model.A1099.V2.FormResponseBase](docs/A1099/V2/FormResponseBase.md) - [Avalara.SDK.model.A1099.V2.FormSingleRequestBase](docs/A1099/V2/FormSingleRequestBase.md) - [Avalara.SDK.model.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - - [Avalara.SDK.model.A1099.V2.HttpValidationProblemDetails](docs/A1099/V2/HttpValidationProblemDetails.md) - [Avalara.SDK.model.A1099.V2.ICreateForm1099Request](docs/A1099/V2/ICreateForm1099Request.md) - [Avalara.SDK.model.A1099.V2.IUpdateForm1099Request](docs/A1099/V2/IUpdateForm1099Request.md) - [Avalara.SDK.model.A1099.V2.IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) + - [Avalara.SDK.model.A1099.V2.IncludedBase](docs/A1099/V2/IncludedBase.md) - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughRequest](docs/A1099/V2/IntermediaryOrFlowThroughRequest.md) - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse](docs/A1099/V2/IntermediaryOrFlowThroughResponse.md) @@ -326,22 +345,23 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.JobResult](docs/A1099/V2/JobResult.md) - [Avalara.SDK.model.A1099.V2.Link](docs/A1099/V2/Link.md) - [Avalara.SDK.model.A1099.V2.OfferAndCoverageRequest](docs/A1099/V2/OfferAndCoverageRequest.md) - - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModel](docs/A1099/V2/PaginatedQueryResultModel.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - - [Avalara.SDK.model.A1099.V2.PaginatedW9FormsModel](docs/A1099/V2/PaginatedW9FormsModel.md) + - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentRequest](docs/A1099/V2/PrimaryWithholdingAgentRequest.md) - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse](docs/A1099/V2/PrimaryWithholdingAgentResponse.md) - - [Avalara.SDK.model.A1099.V2.ProblemDetails](docs/A1099/V2/ProblemDetails.md) + - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest](docs/A1099/V2/StateAndLocalWithholdingRequest.md) - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse](docs/A1099/V2/StateAndLocalWithholdingResponse.md) + - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse](docs/A1099/V2/StateEfileStatusDetailResponse.md) - [Avalara.SDK.model.A1099.V2.StatusDetail](docs/A1099/V2/StatusDetail.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) - [Avalara.SDK.model.A1099.V2.TinMatchStatusResponse](docs/A1099/V2/TinMatchStatusResponse.md) - [Avalara.SDK.model.A1099.V2.Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) + - [Avalara.SDK.model.A1099.V2.ValidationError](docs/A1099/V2/ValidationError.md) - [Avalara.SDK.model.A1099.V2.ValidationErrorResponse](docs/A1099/V2/ValidationErrorResponse.md) - [Avalara.SDK.model.A1099.V2.W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) - [Avalara.SDK.model.A1099.V2.W4FormRequest](docs/A1099/V2/W4FormRequest.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 12f1f42..98eb85b 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -49,7 +49,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "097506be-b40b-4107-8d62-206070d11548"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5ba3a8b6-bf05-4aaa-b8cb-d06c7cfea0f7"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = new CompanyCreateUpdateRequestModel(); // CompanyCreateUpdateRequestModel | The company to create try { @@ -136,7 +136,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "3af2abb1-7024-4cc7-9c52-53e793e1c863"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "07a8ecdb-0465-469d-8bff-49fce135d5e4"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -228,7 +228,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "bbe9eb96-736f-4c5c-99d7-9df8f66819b3"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f047fdc5-a6e4-4290-8c5c-d4da96ad0699"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelCompanyResponse result = apiInstance.getCompanies(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -321,7 +321,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e6013371-7d72-4c3d-8a5f-c4e08177c3ae"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "3f7b5971-06e7-4459-84af-61db7fdcb027"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CompanyResponse result = apiInstance.getCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -409,7 +409,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d8a0cb91-eb8b-4bd6-8812-2b690995afcc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1cd32062-b0bc-46a0-8311-a973b8fb3d56"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = new CompanyCreateUpdateRequestModel(); // CompanyCreateUpdateRequestModel | The updated company data try { diff --git a/docs/A1099/V2/Create1099Form201Response.md b/docs/A1099/V2/Create1099Form201Response.md index 1f59c00..c2d0f1c 100644 --- a/docs/A1099/V2/Create1099Form201Response.md +++ b/docs/A1099/V2/Create1099Form201Response.md @@ -71,24 +71,35 @@ |**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] | |**originOfHealthCoverageCode** | **String** | Origin of health coverage code | [optional] | |**coveredIndividuals** | [**List<CoveredIndividualReferenceResponse>**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] | -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early withdrawal penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-exempt interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified private activity bond interest | [optional] | +|**marketDiscount** | **Double** | Market discount | [optional] | +|**bondPremium** | **Double** | Bond premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP number | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type (PSE or EPF) | [optional] | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type (payment card or third party network) | [optional] | |**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | @@ -140,7 +151,6 @@ |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrr** | **Double** | Amount allocable to IRR within 5 years | [optional] | |**firstYearDesignatedRothContrib** | **String** | First year of designated Roth contribution | [optional] | -|**fatcaRequirementIndicator** | **Boolean** | FATCA filing requirement | [optional] | |**dateOfPayment** | **String** | Date of payment | [optional] | diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md index 0c7503f..42fad9b 100644 --- a/docs/A1099/V2/CreateW9Form201Response.md +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -7,39 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**employeeFirstName** | **String** | The first name of the employee. | [optional] | -|**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | -|**employeeLastName** | **String** | The last name of the employee. | [optional] | -|**employeeNameSuffix** | **String** | The name suffix of the employee. | [optional] | -|**tinType** | **String** | The type of TIN provided. | [optional] | -|**tin** | **String** | The taxpayer identification number (TIN). | [optional] | -|**address** | **String** | The address of the individual or entity. | [optional] | -|**city** | **String** | The city of the address. | [optional] | -|**state** | **String** | The state of the address. | [optional] | -|**zip** | **String** | The ZIP code of the address. | [optional] | -|**maritalStatus** | **String** | The marital status of the employee. | [optional] | -|**lastNameDiffers** | **Boolean** | Indicates whether the last name differs from prior records. | [optional] | -|**numAllowances** | **Integer** | The number of allowances claimed by the employee. | [optional] | -|**otherDependents** | **Integer** | The number of dependents other than allowances. | [optional] | -|**nonJobIncome** | **Float** | The amount of non-job income. | [optional] | -|**deductions** | **Float** | The amount of deductions claimed. | [optional] | -|**additionalWithheld** | **Float** | The additional amount withheld. | [optional] | -|**exemptFromWithholding** | **Boolean** | Indicates whether the employee is exempt from withholding. | [optional] | -|**officeCode** | **String** | The office code associated with the form. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | |**name** | **String** | The name of the individual or entity associated with the form. | [optional] | |**citizenshipCountry** | **String** | The country of citizenship. | [optional] | |**disregardedEntity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | @@ -57,6 +24,8 @@ |**mailingState** | **String** | The state of the mailing address. | [optional] | |**mailingZip** | **String** | The ZIP code of the mailing address. | [optional] | |**mailingCountry** | **String** | The country of the mailing address. | [optional] | +|**tinType** | **String** | The type of TIN provided. | [optional] | +|**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | |**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | @@ -134,6 +103,20 @@ |**substantialUsOwners** | [**List<SubstantialUsOwnerResponse>**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | |**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | +|**id** | **String** | The unique identifier for the form. | [optional] | +|**entryStatus** | **String** | The form status. | [optional] | +|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**displayName** | **String** | The display name associated with the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | +|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | +|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | +|**type** | **String** | The type of the response object. | [optional] | |**birthday** | **LocalDate** | The birthday of the individual associated with the form. | [optional] | |**signerCapacity** | **String** | The capacity in which the signer is signing the form. | [optional] | |**qualifiedIntermediaryCertification** | **Boolean** | Certifies that the entity is a Qualified Intermediary (QI) acting in accordance with its QI Agreement, providing required withholding statements and documentation for relevant tax withholding purposes. | [optional] | @@ -182,7 +165,11 @@ |**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | |**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | |**foreignCountryIndicator** | **Boolean** | Indicates whether the individual or entity is in a foreign country. | [optional] | +|**address** | **String** | The address of the individual or entity. | [optional] | |**foreignAddress** | **String** | The foreign address of the individual or entity. | [optional] | +|**city** | **String** | The city of the address. | [optional] | +|**state** | **String** | The state of the address. | [optional] | +|**zip** | **String** | The ZIP code of the address. | [optional] | |**accountNumber** | **String** | The account number associated with the form. | [optional] | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | diff --git a/docs/A1099/V2/ErrorResponse.md b/docs/A1099/V2/ErrorResponse.md index 322204a..7f70cb5 100644 --- a/docs/A1099/V2/ErrorResponse.md +++ b/docs/A1099/V2/ErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**title** | **String** | | [optional] | -|**errors** | [**List<ErrorResponseErrorsInner>**](ErrorResponseErrorsInner.md) | | [optional] | +|**errors** | [**List<ErrorResponseItem>**](ErrorResponseItem.md) | | [optional] | diff --git a/docs/A1099/V2/ErrorResponseItem.md b/docs/A1099/V2/ErrorResponseItem.md new file mode 100644 index 0000000..02671c4 --- /dev/null +++ b/docs/A1099/V2/ErrorResponseItem.md @@ -0,0 +1,14 @@ + + +# ErrorResponseItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**detail** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md new file mode 100644 index 0000000..be036df --- /dev/null +++ b/docs/A1099/V2/Form1042S.md @@ -0,0 +1,74 @@ + + +# Form1042S + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uniqueFormId** | **String** | | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | | [optional] | +|**recipientGiin** | **String** | | [optional] | +|**recipientForeignTin** | **String** | | [optional] | +|**lobCode** | **String** | | [optional] | +|**incomeCode** | **String** | | [optional] | +|**grossIncome** | **Double** | | [optional] | +|**withholdingIndicator** | **String** | | [optional] | +|**taxCountryCode** | **String** | | [optional] | +|**exemptionCodeChap3** | **String** | | [optional] | +|**exemptionCodeChap4** | **String** | | [optional] | +|**taxRateChap3** | **String** | | [optional] | +|**withholdingAllowance** | **Double** | | [optional] | +|**federalTaxWithheld** | **Double** | | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | | [optional] | +|**academicIndicator** | **Boolean** | | [optional] | +|**taxWithheldOtherAgents** | **Double** | | [optional] | +|**amountRepaid** | **Double** | | [optional] | +|**taxPaidAgent** | **Double** | | [optional] | +|**chap3StatusCode** | **String** | | [optional] | +|**chap4StatusCode** | **String** | | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**issuerId** | **Integer** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**federalEfile** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**stateEfile** | **Boolean** | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**referenceId** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | +|**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + + + diff --git a/docs/A1099/V2/Form1042SListItem.md b/docs/A1099/V2/Form1042SListItem.md index 811ad8f..b8766c9 100644 --- a/docs/A1099/V2/Form1042SListItem.md +++ b/docs/A1099/V2/Form1042SListItem.md @@ -37,21 +37,22 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/Form1042SRequest.md b/docs/A1099/V2/Form1042SRequest.md index c3eeb8a..ae356ae 100644 --- a/docs/A1099/V2/Form1042SRequest.md +++ b/docs/A1099/V2/Form1042SRequest.md @@ -38,22 +38,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | @@ -70,6 +71,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1042SResponse.md b/docs/A1099/V2/Form1042SResponse.md index ffaceb3..a4b3895 100644 --- a/docs/A1099/V2/Form1042SResponse.md +++ b/docs/A1099/V2/Form1042SResponse.md @@ -60,6 +60,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index 6cd8c7b..b8cadd7 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -25,10 +25,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -36,8 +40,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1095BListItem.md b/docs/A1099/V2/Form1095BListItem.md index de4c047..58ae3b5 100644 --- a/docs/A1099/V2/Form1095BListItem.md +++ b/docs/A1099/V2/Form1095BListItem.md @@ -20,22 +20,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/Form1095BRequest.md b/docs/A1099/V2/Form1095BRequest.md index 3005238..edd32b8 100644 --- a/docs/A1099/V2/Form1095BRequest.md +++ b/docs/A1099/V2/Form1095BRequest.md @@ -21,22 +21,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -68,6 +69,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1095BResponse.md b/docs/A1099/V2/Form1095BResponse.md new file mode 100644 index 0000000..10b006a --- /dev/null +++ b/docs/A1099/V2/Form1095BResponse.md @@ -0,0 +1,98 @@ + + +# Form1095BResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**employeeFirstName** | **String** | | [optional] | +|**employeeMiddleName** | **String** | | [optional] | +|**employeeLastName** | **String** | | [optional] | +|**employeeNameSuffix** | **String** | | [optional] | +|**employeeDateOfBirth** | **OffsetDateTime** | | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualRequest>**](CoveredIndividualRequest.md) | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | +|**id** | **String** | | [optional] | +|**issuerId** | **String** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**referenceId** | **String** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientTin** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**federalEFile** | **Boolean** | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**stateEFile** | **Boolean** | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +|**postalMailStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + + + +## Enum: OriginOfHealthCoverageCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1095CListItem.md b/docs/A1099/V2/Form1095CListItem.md index a67ea29..06ea30d 100644 --- a/docs/A1099/V2/Form1095CListItem.md +++ b/docs/A1099/V2/Form1095CListItem.md @@ -25,22 +25,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index a3a73c9..dd5ff7b 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -23,10 +23,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -34,8 +38,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md new file mode 100644 index 0000000..ac64f8e --- /dev/null +++ b/docs/A1099/V2/Form1099Div.md @@ -0,0 +1,69 @@ + + +# Form1099Div + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalOrdinaryDividends** | **Double** | | [optional] | +|**qualifiedDividends** | **Double** | | [optional] | +|**totalCapitalGainDistributions** | **Double** | | [optional] | +|**unrecapturedSection1250Gain** | **Double** | | [optional] | +|**section1202Gain** | **Double** | | [optional] | +|**collectiblesGain** | **Double** | | [optional] | +|**section897OrdinaryDividends** | **Double** | | [optional] | +|**section897CapitalGain** | **Double** | | [optional] | +|**nondividendDistributions** | **Double** | | [optional] | +|**federalIncomeTaxWithheld** | **Double** | | [optional] | +|**section199ADividends** | **Double** | | [optional] | +|**investmentExpenses** | **Double** | | [optional] | +|**foreignTaxPaid** | **Double** | | [optional] | +|**foreignCountryOrUSPossession** | **String** | | [optional] | +|**cashLiquidationDistributions** | **Double** | | [optional] | +|**noncashLiquidationDistributions** | **Double** | | [optional] | +|**exemptInterestDividends** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**issuerId** | **Integer** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**federalEfile** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**stateEfile** | **Boolean** | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**referenceId** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**tinType** | **String** | | [optional] | +|**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + + + diff --git a/docs/A1099/V2/Form1099DivListItem.md b/docs/A1099/V2/Form1099DivListItem.md index c9f41ad..58d0d49 100644 --- a/docs/A1099/V2/Form1099DivListItem.md +++ b/docs/A1099/V2/Form1099DivListItem.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | -|**federalIncomeTaxWithheld** | **String** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | |**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | |**issuerReferenceId** | **String** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | |**issuerTin** | **String** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | @@ -35,16 +35,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099DivListItemResponse.md b/docs/A1099/V2/Form1099DivListItemResponse.md index 4c9c744..1cebf19 100644 --- a/docs/A1099/V2/Form1099DivListItemResponse.md +++ b/docs/A1099/V2/Form1099DivListItemResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | -|**federalIncomeTaxWithheld** | **String** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | |**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | |**id** | **String** | ID of the form | [readonly] | |**type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | diff --git a/docs/A1099/V2/Form1099DivRequest.md b/docs/A1099/V2/Form1099DivRequest.md index 52bc5d7..cc07744 100644 --- a/docs/A1099/V2/Form1099DivRequest.md +++ b/docs/A1099/V2/Form1099DivRequest.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | -|**federalIncomeTaxWithheld** | **String** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | |**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | | [optional] | |**issuerId** | **String** | Issuer ID | [optional] | @@ -33,16 +33,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | @@ -66,6 +66,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099DivResponse.md b/docs/A1099/V2/Form1099DivResponse.md index 6f2bc08..efce572 100644 --- a/docs/A1099/V2/Form1099DivResponse.md +++ b/docs/A1099/V2/Form1099DivResponse.md @@ -7,6 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**totalOrdinaryDividends** | **Double** | | [optional] | +|**qualifiedDividends** | **Double** | | [optional] | +|**totalCapitalGainDistributions** | **Double** | | [optional] | +|**unrecapturedSection1250Gain** | **Double** | | [optional] | +|**section1202Gain** | **Double** | | [optional] | +|**collectiblesGain** | **Double** | | [optional] | +|**section897OrdinaryDividends** | **Double** | | [optional] | +|**section897CapitalGain** | **Double** | | [optional] | +|**nondividendDistributions** | **Double** | | [optional] | +|**federalIncomeTaxWithheld** | **Double** | | [optional] | +|**section199ADividends** | **Double** | | [optional] | +|**investmentExpenses** | **Double** | | [optional] | +|**foreignTaxPaid** | **Double** | | [optional] | +|**foreignCountryOrUSPossession** | **String** | | [optional] | +|**cashLiquidationDistributions** | **Double** | | [optional] | +|**noncashLiquidationDistributions** | **Double** | | [optional] | +|**exemptInterestDividends** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | @@ -60,6 +79,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md new file mode 100644 index 0000000..441c5e5 --- /dev/null +++ b/docs/A1099/V2/Form1099Int.md @@ -0,0 +1,65 @@ + + +# Form1099Int + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**interestIncome** | **Double** | | [optional] | +|**earlyWithdrawalPenalty** | **Double** | | [optional] | +|**usSavingsBondsInterest** | **Double** | | [optional] | +|**federalIncomeTaxWithheld** | **Double** | | [optional] | +|**investmentExpenses** | **Double** | | [optional] | +|**foreignTaxPaid** | **Double** | | [optional] | +|**foreignCountry** | **String** | | [optional] | +|**taxExemptInterest** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | | [optional] | +|**marketDiscount** | **Double** | | [optional] | +|**bondPremium** | **Double** | | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | | [optional] | +|**taxExemptBondCusipNumber** | **String** | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**issuerId** | **Integer** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**federalEfile** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**stateEfile** | **Boolean** | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**referenceId** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | +|**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + + + diff --git a/docs/A1099/V2/Form1099IntList.md b/docs/A1099/V2/Form1099IntList.md new file mode 100644 index 0000000..4be97f1 --- /dev/null +++ b/docs/A1099/V2/Form1099IntList.md @@ -0,0 +1,14 @@ + + +# Form1099IntList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**forms** | [**List<Form1099IntListItem>**](Form1099IntListItem.md) | | [optional] | +|**formType** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/Form1099IntListItem.md b/docs/A1099/V2/Form1099IntListItem.md new file mode 100644 index 0000000..e354344 --- /dev/null +++ b/docs/A1099/V2/Form1099IntListItem.md @@ -0,0 +1,65 @@ + + +# Form1099IntListItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | +|**issuerTin** | **String** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | +|**taxYear** | **Integer** | Tax year | | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address | [optional] | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | [optional] | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**email** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +|**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1099IntListItemResponse.md b/docs/A1099/V2/Form1099IntListItemResponse.md new file mode 100644 index 0000000..8a9152f --- /dev/null +++ b/docs/A1099/V2/Form1099IntListItemResponse.md @@ -0,0 +1,65 @@ + + +# Form1099IntListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early withdrawal penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-exempt interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified private activity bond interest | [optional] | +|**marketDiscount** | **Double** | Market discount | [optional] | +|**bondPremium** | **Double** | Bond premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP number | [optional] | +|**id** | **String** | ID of the form | [readonly] | +|**type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | +|**issuerId** | **Integer** | Issuer ID | | +|**issuerReferenceId** | **String** | Issuer Reference ID | [optional] | +|**issuerTin** | **String** | Issuer TIN | [optional] | +|**taxYear** | **Integer** | Tax year | [optional] | +|**federalEfile** | **Boolean** | Boolean indicating that federal e-filing has been scheduled for this form | | +|**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfile** | **Boolean** | Boolean indicating that state e-filing has been scheduled for this form | | +|**stateEfileStatus** | [**List<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | | +|**postalMailStatus** | [**StatusDetail**](StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**StatusDetail**](StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**referenceId** | **String** | Reference ID | [optional] | +|**email** | **String** | Recipient email address | [optional] | +|**tinType** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +|**tin** | **String** | Recipient Tax ID Number | [optional] | +|**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +|**secondTinNotice** | **Boolean** | Second Tin Notice | [optional] | +|**recipientName** | **String** | Recipient name | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address | [optional] | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | [optional] | +|**state** | **String** | US state | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**nonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +|**accountNumber** | **String** | Account Number | [optional] | +|**officeCode** | **String** | Office Code | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Creation time | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Update time | [optional] [readonly] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | + + + diff --git a/docs/A1099/V2/Form1099IntRequest.md b/docs/A1099/V2/Form1099IntRequest.md new file mode 100644 index 0000000..4ff9568 --- /dev/null +++ b/docs/A1099/V2/Form1099IntRequest.md @@ -0,0 +1,79 @@ + + +# Form1099IntRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawl Penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address | [optional] | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | [optional] | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**email** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +|**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1099IntResponse.md b/docs/A1099/V2/Form1099IntResponse.md new file mode 100644 index 0000000..3857686 --- /dev/null +++ b/docs/A1099/V2/Form1099IntResponse.md @@ -0,0 +1,91 @@ + + +# Form1099IntResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | +|**id** | **String** | | [optional] | +|**issuerId** | **String** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**referenceId** | **String** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientTin** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**federalEFile** | **Boolean** | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**stateEFile** | **Boolean** | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +|**postalMailStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index 6f4e8e8..c5cff45 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -43,10 +43,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -54,8 +58,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1099KListItem.md b/docs/A1099/V2/Form1099KListItem.md index fb5c1dc..8fc38f9 100644 --- a/docs/A1099/V2/Form1099KListItem.md +++ b/docs/A1099/V2/Form1099KListItem.md @@ -36,22 +36,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/Form1099KRequest.md b/docs/A1099/V2/Form1099KRequest.md index 724b32e..78ab2c9 100644 --- a/docs/A1099/V2/Form1099KRequest.md +++ b/docs/A1099/V2/Form1099KRequest.md @@ -34,22 +34,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -86,6 +87,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099KResponse.md b/docs/A1099/V2/Form1099KResponse.md index 09f6448..bed5904 100644 --- a/docs/A1099/V2/Form1099KResponse.md +++ b/docs/A1099/V2/Form1099KResponse.md @@ -99,6 +99,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099ListResponseValueInner.md b/docs/A1099/V2/Form1099ListResponseValueInner.md index b9c2183..07e1f00 100644 --- a/docs/A1099/V2/Form1099ListResponseValueInner.md +++ b/docs/A1099/V2/Form1099ListResponseValueInner.md @@ -71,24 +71,35 @@ |**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] | |**originOfHealthCoverageCode** | **String** | Origin of health coverage code | [optional] | |**coveredIndividuals** | [**List<CoveredIndividualReferenceResponse>**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] | -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early withdrawal penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-exempt interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified private activity bond interest | [optional] | +|**marketDiscount** | **Double** | Market discount | [optional] | +|**bondPremium** | **Double** | Bond premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP number | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type (PSE or EPF) | [optional] | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type (payment card or third party network) | [optional] | |**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | @@ -140,7 +151,6 @@ |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrr** | **Double** | Amount allocable to IRR within 5 years | [optional] | |**firstYearDesignatedRothContrib** | **String** | First year of designated Roth contribution | [optional] | -|**fatcaRequirementIndicator** | **Boolean** | FATCA filing requirement | [optional] | |**dateOfPayment** | **String** | Date of payment | [optional] | diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index 522d117..5cd260d 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -12,15 +12,15 @@ |**otherIncome** | **Double** | | [optional] | |**fedIncomeTaxWithheld** | **Double** | | [optional] | |**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalAndHealthCare** | **Double** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | +|**medicalAndHealthCarePayments** | **Double** | | [optional] | |**substitutePayments** | **Double** | | [optional] | |**directSalesIndicator** | **Boolean** | | [optional] | |**cropInsuranceProceeds** | **Double** | | [optional] | -|**excessGoldenParachute** | **Double** | | [optional] | -|**grossAmountPaidAttorney** | **Double** | | [optional] | +|**excessGoldenParachutePayments** | **Double** | | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | | [optional] | +|**fishPurchasedForResale** | **Double** | | [optional] | |**section409ADeferrals** | **Double** | | [optional] | -|**section409AIncome** | **Double** | | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | |**id** | **String** | | [optional] | |**type** | **String** | | [optional] | |**issuerId** | **Integer** | | [optional] | @@ -37,10 +37,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -48,8 +52,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1099MiscListItem.md b/docs/A1099/V2/Form1099MiscListItem.md index 00f734d..e1e1126 100644 --- a/docs/A1099/V2/Form1099MiscListItem.md +++ b/docs/A1099/V2/Form1099MiscListItem.md @@ -31,16 +31,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099MiscRequest.md b/docs/A1099/V2/Form1099MiscRequest.md index 68aa97a..ab5342c 100644 --- a/docs/A1099/V2/Form1099MiscRequest.md +++ b/docs/A1099/V2/Form1099MiscRequest.md @@ -29,16 +29,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | @@ -62,6 +62,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099MiscResponse.md b/docs/A1099/V2/Form1099MiscResponse.md index cac42d6..e717107 100644 --- a/docs/A1099/V2/Form1099MiscResponse.md +++ b/docs/A1099/V2/Form1099MiscResponse.md @@ -75,6 +75,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index 0b0ec30..edba895 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -26,10 +26,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -37,8 +41,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1099NecListItem.md b/docs/A1099/V2/Form1099NecListItem.md index f24b368..703e706 100644 --- a/docs/A1099/V2/Form1099NecListItem.md +++ b/docs/A1099/V2/Form1099NecListItem.md @@ -20,22 +20,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/Form1099NecRequest.md b/docs/A1099/V2/Form1099NecRequest.md index 109e65c..7f8ca36 100644 --- a/docs/A1099/V2/Form1099NecRequest.md +++ b/docs/A1099/V2/Form1099NecRequest.md @@ -17,22 +17,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -50,6 +51,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099NecResponse.md b/docs/A1099/V2/Form1099NecResponse.md index f9ccc3c..82b9d55 100644 --- a/docs/A1099/V2/Form1099NecResponse.md +++ b/docs/A1099/V2/Form1099NecResponse.md @@ -63,6 +63,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099ProccessResult.md b/docs/A1099/V2/Form1099ProccessResult.md index 6e94a79..d67a974 100644 --- a/docs/A1099/V2/Form1099ProccessResult.md +++ b/docs/A1099/V2/Form1099ProccessResult.md @@ -8,6 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**jobData** | [**Data**](Data.md) | | [optional] | +|**processedForms** | [**List<Form1099ProccessResultProcessedFormsInner>**](Form1099ProccessResultProcessedFormsInner.md) | | [optional] | diff --git a/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md b/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md new file mode 100644 index 0000000..8251084 --- /dev/null +++ b/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md @@ -0,0 +1,176 @@ + + +# Form1099ProccessResultProcessedFormsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uniqueFormId** | **String** | | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | | [optional] | +|**recipientGiin** | **String** | | [optional] | +|**recipientForeignTin** | **String** | | [optional] | +|**lobCode** | **String** | | [optional] | +|**incomeCode** | **String** | | [optional] | +|**grossIncome** | **Double** | | [optional] | +|**withholdingIndicator** | **String** | | [optional] | +|**taxCountryCode** | **String** | | [optional] | +|**exemptionCodeChap3** | **String** | | [optional] | +|**exemptionCodeChap4** | **String** | | [optional] | +|**taxRateChap3** | **String** | | [optional] | +|**withholdingAllowance** | **Double** | | [optional] | +|**federalTaxWithheld** | **Double** | | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | | [optional] | +|**academicIndicator** | **Boolean** | | [optional] | +|**taxWithheldOtherAgents** | **Double** | | [optional] | +|**amountRepaid** | **Double** | | [optional] | +|**taxPaidAgent** | **Double** | | [optional] | +|**chap3StatusCode** | **String** | | [optional] | +|**chap4StatusCode** | **String** | | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | +|**issuerId** | **Integer** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**federalEfile** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**stateEfile** | **Boolean** | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**referenceId** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | +|**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**originOfHealthCoverageCode** | **String** | | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualReference>**](CoveredIndividualReference.md) | | [optional] | +|**totalOrdinaryDividends** | **Double** | | [optional] | +|**qualifiedDividends** | **Double** | | [optional] | +|**totalCapitalGainDistributions** | **Double** | | [optional] | +|**unrecapturedSection1250Gain** | **Double** | | [optional] | +|**section1202Gain** | **Double** | | [optional] | +|**collectiblesGain** | **Double** | | [optional] | +|**section897OrdinaryDividends** | **Double** | | [optional] | +|**section897CapitalGain** | **Double** | | [optional] | +|**nondividendDistributions** | **Double** | | [optional] | +|**federalIncomeTaxWithheld** | **Double** | | [optional] | +|**section199ADividends** | **Double** | | [optional] | +|**investmentExpenses** | **Double** | | [optional] | +|**foreignTaxPaid** | **Double** | | [optional] | +|**foreignCountryOrUSPossession** | **String** | | [optional] | +|**cashLiquidationDistributions** | **Double** | | [optional] | +|**noncashLiquidationDistributions** | **Double** | | [optional] | +|**exemptInterestDividends** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | | [optional] | +|**interestIncome** | **Double** | | [optional] | +|**earlyWithdrawalPenalty** | **Double** | | [optional] | +|**usSavingsBondsInterest** | **Double** | | [optional] | +|**foreignCountry** | **String** | | [optional] | +|**taxExemptInterest** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | | [optional] | +|**marketDiscount** | **Double** | | [optional] | +|**bondPremium** | **Double** | | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | | [optional] | +|**taxExemptBondCusipNumber** | **String** | | [optional] | +|**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | | [optional] | +|**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | | [optional] | +|**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | +|**grossAmountPaymentCard** | **Double** | | [optional] | +|**cardNotPresentTransactions** | **Double** | | [optional] | +|**merchantCategoryCode** | **String** | | [optional] | +|**paymentTransactionNumber** | **Double** | | [optional] | +|**january** | **Double** | | [optional] | +|**february** | **Double** | | [optional] | +|**march** | **Double** | | [optional] | +|**april** | **Double** | | [optional] | +|**may** | **Double** | | [optional] | +|**june** | **Double** | | [optional] | +|**july** | **Double** | | [optional] | +|**august** | **Double** | | [optional] | +|**sept** | **Double** | | [optional] | +|**october** | **Double** | | [optional] | +|**november** | **Double** | | [optional] | +|**december** | **Double** | | [optional] | +|**rents** | **Double** | | [optional] | +|**royalties** | **Double** | | [optional] | +|**otherIncome** | **Double** | | [optional] | +|**fedIncomeTaxWithheld** | **Double** | | [optional] | +|**fishingBoatProceeds** | **Double** | | [optional] | +|**medicalAndHealthCarePayments** | **Double** | | [optional] | +|**substitutePayments** | **Double** | | [optional] | +|**directSalesIndicator** | **Boolean** | | [optional] | +|**cropInsuranceProceeds** | **Double** | | [optional] | +|**excessGoldenParachutePayments** | **Double** | | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | | [optional] | +|**fishPurchasedForResale** | **Double** | | [optional] | +|**section409ADeferrals** | **Double** | | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | +|**nonemployeeCompensation** | **Double** | | [optional] | +|**grossDistributions** | **Double** | | [optional] | +|**taxableAmount** | **Double** | | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | | [optional] | +|**totalDistributionIndicator** | **Boolean** | | [optional] | +|**capitalGain** | **Double** | | [optional] | +|**employeeContributions** | **Double** | | [optional] | +|**netUnrealizedAppreciation** | **Double** | | [optional] | +|**distributionCodeRequired** | **String** | | [optional] | +|**distributionCodeOptional** | **String** | | [optional] | +|**iraSepSimpleIndicator** | **Boolean** | | [optional] | +|**totalIraSepSimpleDistribution** | **Double** | | [optional] | +|**other** | **Double** | | [optional] | +|**otherPercent** | **String** | | [optional] | +|**percentageTotalDistribution** | **String** | | [optional] | +|**totalEmployeeContributions** | **Double** | | [optional] | +|**amountAllocableToIrr** | **Double** | | [optional] | +|**firstYearDesignatedRothContrib** | **String** | | [optional] | +|**dateOfPayment** | **String** | | [optional] | + + + +## Enum: FilerTypeEnum + +| Name | Value | +|---- | -----| +| PSE | "PSE" | +| EPF | "EPF" | +| OTHER | "Other" | + + + +## Enum: PaymentTypeEnum + +| Name | Value | +|---- | -----| +| MERCHANT_PAYMENT_CARD | "MerchantPaymentCard" | +| THIRD_PARTY_NETWORK | "ThirdPartyNetwork" | + + + diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 0d2f2ad..fae524a 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -25,7 +25,6 @@ |**totalEmployeeContributions** | **Double** | | [optional] | |**amountAllocableToIrr** | **Double** | | [optional] | |**firstYearDesignatedRothContrib** | **String** | | [optional] | -|**fatcaRequirementIndicator** | **Boolean** | | [optional] | |**dateOfPayment** | **String** | | [optional] | |**id** | **String** | | [optional] | |**type** | **String** | | [optional] | @@ -43,10 +42,14 @@ |**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | |**referenceId** | **String** | | [optional] | |**email** | **String** | | [optional] | |**tinType** | **String** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**tin** | **String** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | |**recipientName** | **String** | | [optional] | |**recipientSecondName** | **String** | | [optional] | |**address** | **String** | | [optional] | @@ -54,8 +57,10 @@ |**city** | **String** | | [optional] | |**state** | **String** | | [optional] | |**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | |**countryCode** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/docs/A1099/V2/Form1099RListItem.md b/docs/A1099/V2/Form1099RListItem.md index 4810f62..f600b92 100644 --- a/docs/A1099/V2/Form1099RListItem.md +++ b/docs/A1099/V2/Form1099RListItem.md @@ -36,16 +36,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099RListItemResponse.md b/docs/A1099/V2/Form1099RListItemResponse.md index 4ad80af..3b28285 100644 --- a/docs/A1099/V2/Form1099RListItemResponse.md +++ b/docs/A1099/V2/Form1099RListItemResponse.md @@ -25,7 +25,6 @@ |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrr** | **Double** | Amount allocable to IRR within 5 years | [optional] | |**firstYearDesignatedRothContrib** | **String** | First year of designated Roth contribution | [optional] | -|**fatcaRequirementIndicator** | **Boolean** | FATCA filing requirement | [optional] | |**dateOfPayment** | **String** | Date of payment | [optional] | |**id** | **String** | ID of the form | [readonly] | |**type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | diff --git a/docs/A1099/V2/Form1099RRequest.md b/docs/A1099/V2/Form1099RRequest.md index e46182c..81609a1 100644 --- a/docs/A1099/V2/Form1099RRequest.md +++ b/docs/A1099/V2/Form1099RRequest.md @@ -34,16 +34,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | @@ -67,6 +67,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1099RResponse.md b/docs/A1099/V2/Form1099RResponse.md new file mode 100644 index 0000000..e92d11a --- /dev/null +++ b/docs/A1099/V2/Form1099RResponse.md @@ -0,0 +1,97 @@ + + +# Form1099RResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**grossDistribution** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionDetermined** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCode** | **String** | Distribution code | [optional] | +|**secondDistributionCode** | **String** | Second distribution code | [optional] | +|**iraSepSimple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**otherAmount** | **Double** | Other amount | [optional] | +|**otherPercentage** | **String** | Other percentage | [optional] | +|**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | +|**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | +|**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | +|**firstYearOfDesignatedRothContribution** | **String** | First year of designated Roth contribution | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**dateOfPayment** | **OffsetDateTime** | Date of payment | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | +|**id** | **String** | | [optional] | +|**issuerId** | **String** | | [optional] | +|**issuerReferenceId** | **String** | | [optional] | +|**issuerTin** | **String** | | [optional] | +|**taxYear** | **Integer** | | [optional] | +|**referenceId** | **String** | | [optional] | +|**recipientName** | **String** | | [optional] | +|**recipientTin** | **String** | | [optional] | +|**recipientSecondName** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**address2** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**nonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**federalEFile** | **Boolean** | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**stateEFile** | **Boolean** | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**noTin** | **Boolean** | | [optional] | +|**secondTinNotice** | **Boolean** | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**eDeliveryStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**stateEfileStatus** | [**List<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +|**postalMailStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/FormRequestBase.md b/docs/A1099/V2/FormRequestBase.md index 78f4e47..5b0a346 100644 --- a/docs/A1099/V2/FormRequestBase.md +++ b/docs/A1099/V2/FormRequestBase.md @@ -13,22 +13,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/FormRequestListItemBase.md b/docs/A1099/V2/FormRequestListItemBase.md index 1e753ea..dff745f 100644 --- a/docs/A1099/V2/FormRequestListItemBase.md +++ b/docs/A1099/V2/FormRequestListItemBase.md @@ -16,22 +16,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | diff --git a/docs/A1099/V2/FormResponseBase.md b/docs/A1099/V2/FormResponseBase.md index 630f812..732d424 100644 --- a/docs/A1099/V2/FormResponseBase.md +++ b/docs/A1099/V2/FormResponseBase.md @@ -60,6 +60,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/FormSingleRequestBase.md b/docs/A1099/V2/FormSingleRequestBase.md index e19464a..5ec3b7e 100644 --- a/docs/A1099/V2/FormSingleRequestBase.md +++ b/docs/A1099/V2/FormSingleRequestBase.md @@ -14,22 +14,23 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | |**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | |**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | |**secondTinNotice** | **Boolean** | Second TIN notice in three years | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | |**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -47,6 +48,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index 06d6a1d..8737dea 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -52,7 +52,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version Boolean dryRun = false; // Boolean | - String xCorrelationId = "85d89e46-adbc-4a36-a615-347bd0ad3549"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "fc005c04-52f7-44d6-bf16-6551603a8324"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . BulkUpsert1099FormsRequest bulkUpsert1099FormsRequest = new BulkUpsert1099FormsRequest(); // BulkUpsert1099FormsRequest | try { @@ -141,7 +141,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "ac2b2725-9848-49c3-9255-1d638490cc87"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "13eb4eb0-0e7d-41e3-adf3-61b131c1a92c"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . ICreateForm1099Request icreateForm1099Request = new ICreateForm1099Request(); // ICreateForm1099Request | try { @@ -229,7 +229,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | The unique identifier of the desired form to delete. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0839267c-9208-438e-9fcd-3c193fd0216a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "2bcc9cf0-9638-46d5-a792-be61566e0651"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -317,7 +317,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "4c3931c8-2cd4-42f3-9042-7c23336b9f32"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6e842a03-8b64-4b02-8c5e-7073bf4e8a8c"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { Get1099Form200Response result = apiInstance.get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -406,7 +406,7 @@ public class Example { String id = "id_example"; // String | The ID of the form String avalaraVersion = "2.0.0"; // String | API version Boolean markEdelivered = true; // Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - String xCorrelationId = "9133bfa6-8661-46dc-bbf2-4d45d0439e76"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7b4aa70b-3a10-4fa0-bf19-7592170409b7"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); @@ -498,7 +498,7 @@ public class Example { Integer $top = 10; // Integer | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. Integer $skip = 0; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt - String xCorrelationId = "1d1f9e87-4684-46a4-9439-85058f82f858"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7766bce5-4834-4907-81e9-dd0fd6c13079"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { Form1099ListResponse result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient); @@ -589,7 +589,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e59dff29-007e-4aa7-8b11-5ba83766a56a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "9f622e4f-7992-4e4f-8e24-e628c5339402"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IUpdateForm1099Request iupdateForm1099Request = new IUpdateForm1099Request(); // IUpdateForm1099Request | try { diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 43022da..c09353d 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -51,7 +51,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "479b3bdd-2b5c-48b3-b24c-b0ecbe0d07c5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d8cc3501-afdd-4b9e-af90-85db9793cbbc"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { @@ -138,7 +138,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "7d79301a-ebfd-40a1-a1af-a9a1e44f8936"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "0013f0dd-e304-45c6-9f17-bd023626ba48"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -223,7 +223,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b4cc81aa-1d2e-4cef-aa68-705ea2aaf594"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e76a4eb2-f5f0-4586-888a-c25443f75fc4"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -273,11 +273,11 @@ Name | Type | Description | Notes ## listW9Forms -> PaginatedW9FormsModel listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, xCorrelationId, xAvalaraClient) +> PaginatedQueryResultModelW9FormBaseResponse listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient) List W9/W4/W8 forms -List W9/W4/W8 forms. +List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". ### Example @@ -308,15 +308,16 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String $filter = "$filter_example"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. - Integer $top = 10; // Integer | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - Integer $skip = 0; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. + String $filter = "$filter_example"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. + Integer $top = 56; // Integer | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. + Integer $skip = 56; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. - Boolean count = true; // Boolean | When true, returns a @recordSetCount in the result set - String xCorrelationId = "8afdb9ff-bb10-414e-bd81-5cb5175aad0c"; // String | Unique correlation Id in a GUID format + Boolean count = true; // Boolean | If true, return the global count of elements in the collection. + Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. + String xCorrelationId = "8092ac9c-17d0-4ee8-a00e-804088e5ab81"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { - PaginatedW9FormsModel result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, xCorrelationId, xAvalaraClient); + PaginatedQueryResultModelW9FormBaseResponse result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FormsW9Api#listW9Forms"); @@ -335,17 +336,18 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalaraVersion** | **String**| API version | - **$filter** | **String**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. | [optional] - **$top** | **Integer**| If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] [default to 10] - **$skip** | **Integer**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] [default to 0] + **$filter** | **String**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. | [optional] + **$top** | **Integer**| If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. | [optional] + **$skip** | **Integer**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] **$orderBy** | **String**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. | [optional] - **count** | **Boolean**| When true, returns a @recordSetCount in the result set | [optional] + **count** | **Boolean**| If true, return the global count of elements in the collection. | [optional] + **countOnly** | **Boolean**| If true, return ONLY the global count of elements in the collection. It only applies when count=true. | [optional] **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] ### Return type -[**PaginatedW9FormsModel**](PaginatedW9FormsModel.md) +[**PaginatedQueryResultModelW9FormBaseResponse**](PaginatedQueryResultModelW9FormBaseResponse.md) ### Authorization @@ -360,9 +362,9 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | List of forms | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | +| **200** | List of forms | - | ## sendW9FormEmail @@ -403,7 +405,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | The ID of the W9/W4/W8 form. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "37d1fca1-1efa-454b-a3ff-94ec972b74b4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "05ca3285-5ab1-43c0-88d7-f23c30428d54"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { IW9FormDataModelsOneOf result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -489,7 +491,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "8c37ab84-020e-452c-ad69-df89a9ac9cfa"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "87498441-c774-4e3a-864e-dd604bff0d41"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IW9FormDataModelsOneOf iw9FormDataModelsOneOf = new IW9FormDataModelsOneOf(); // IW9FormDataModelsOneOf | Form to be updated try { @@ -577,7 +579,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "2ce587b6-7523-41b2-8033-347329740bcb"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "453b7d64-1fd0-4ed3-ba3c-a1d9ca1d69e6"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . File _file = new File("/path/to/file"); // File | try { diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 8b831c5..fbff5a1 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -71,24 +71,35 @@ |**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] | |**originOfHealthCoverageCode** | **String** | Origin of health coverage code | [optional] | |**coveredIndividuals** | [**List<CoveredIndividualReferenceResponse>**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] | -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early withdrawal penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-exempt interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified private activity bond interest | [optional] | +|**marketDiscount** | **Double** | Market discount | [optional] | +|**bondPremium** | **Double** | Bond premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP number | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type (PSE or EPF) | [optional] | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type (payment card or third party network) | [optional] | |**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | @@ -140,7 +151,6 @@ |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrr** | **Double** | Amount allocable to IRR within 5 years | [optional] | |**firstYearDesignatedRothContrib** | **String** | First year of designated Roth contribution | [optional] | -|**fatcaRequirementIndicator** | **Boolean** | FATCA filing requirement | [optional] | |**dateOfPayment** | **String** | Date of payment | [optional] | diff --git a/docs/A1099/V2/ICreateForm1099Request.md b/docs/A1099/V2/ICreateForm1099Request.md index ddde994..78a2295 100644 --- a/docs/A1099/V2/ICreateForm1099Request.md +++ b/docs/A1099/V2/ICreateForm1099Request.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | -|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | | [optional] | |**issuerId** | **String** | Issuer ID | [optional] | |**referenceId** | **String** | Reference ID | [optional] | @@ -33,16 +33,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | @@ -100,6 +100,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/IUpdateForm1099Request.md b/docs/A1099/V2/IUpdateForm1099Request.md index 8f52116..446b322 100644 --- a/docs/A1099/V2/IUpdateForm1099Request.md +++ b/docs/A1099/V2/IUpdateForm1099Request.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | -|**qualifiedDividends** | **String** | Qualified dividends | [optional] | -|**totalCapitalGainDistributions** | **String** | Total capital gain distributions | [optional] | -|**unrecapturedSection1250Gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -|**section1202Gain** | **String** | Section 1202 gain | [optional] | -|**collectiblesGain** | **String** | Collectibles (28%) gain | [optional] | -|**section897OrdinaryDividends** | **String** | Section 897 ordinary dividends | [optional] | -|**section897CapitalGain** | **String** | Section 897 capital gain | [optional] | -|**nondividendDistributions** | **String** | Nondividend distributions | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | -|**section199ADividends** | **String** | Section 199A dividends | [optional] | -|**investmentExpenses** | **String** | Investment expenses | [optional] | -|**foreignTaxPaid** | **String** | Foreign tax paid | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | -|**cashLiquidationDistributions** | **String** | Cash liquidation distributions | [optional] | -|**noncashLiquidationDistributions** | **String** | Noncash liquidation distributions | [optional] | -|**exemptInterestDividends** | **String** | Exempt-interest dividends | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | Specified private activity bond interest dividends | [optional] | -|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**fatcaFilingRequirement** | **Boolean** | Fatca filing requirement | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | | [optional] | |**issuerId** | **String** | Issuer ID | [optional] | |**referenceId** | **String** | Reference ID | [optional] | @@ -33,16 +33,16 @@ |**recipientName** | **String** | Recipient name | [optional] | |**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | |**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | | +|**address** | **String** | Address | [optional] | |**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | | +|**city** | **String** | City | [optional] | |**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | |**zip** | **String** | Zip/postal code | [optional] | |**email** | **String** | Recipient email address | [optional] | |**accountNumber** | **String** | Account number | [optional] | |**officeCode** | **String** | Office code | [optional] | |**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | |**federalEFile** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | |**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | |**stateEFile** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | @@ -100,6 +100,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 56d314d..15366ad 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -49,7 +49,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "cd08f20c-e93f-4ed9-9fcc-1c43161a5ab1"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d2b38090-a4c9-4170-bc1d-6cc2778b0bd0"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerCommand issuerCommand = new IssuerCommand(); // IssuerCommand | The issuer to create try { @@ -136,7 +136,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b31ed293-452b-4f1a-9781-92bf4cc732b2"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "22e9dc96-0041-4e27-ab37-038dc9d6c215"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -221,7 +221,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to retrieve String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "6f7412dc-b5d2-4657-9ae0-9eb72e1cbaac"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "86c9eff5-1ed3-49b1-be09-a117b235f3e2"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { IssuerResponse result = apiInstance.getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -312,7 +312,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "6ab59fe8-83fc-4fa3-9617-abb9b8d1bdb7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "0983f292-e1e0-4415-9cdc-b70482da76b0"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelIssuerResponse result = apiInstance.getIssuers(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -405,7 +405,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "2f427cf4-fa55-4abb-85da-d79a4a846191"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f43f2c52-c35e-4e50-b1ad-2923b624e5a0"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerCommand issuerCommand = new IssuerCommand(); // IssuerCommand | The issuer to update try { diff --git a/docs/A1099/V2/Jobs1099Api.md b/docs/A1099/V2/Jobs1099Api.md index 69e3a18..2c466b7 100644 --- a/docs/A1099/V2/Jobs1099Api.md +++ b/docs/A1099/V2/Jobs1099Api.md @@ -46,7 +46,7 @@ public class Example { Jobs1099Api apiInstance = new Jobs1099Api(apiClient); String id = "id_example"; // String | Job id obtained from other API responses, like `/1099/bulk-upsert`. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "85be69fe-08d7-40f4-8ce2-dd043ea36143"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "25f0c6ce-1d1a-45f6-b828-15789bccc55b"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { JobResult result = apiInstance.getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient); diff --git a/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md b/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md new file mode 100644 index 0000000..8c56a46 --- /dev/null +++ b/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md @@ -0,0 +1,16 @@ + + +# PaginatedQueryResultModelW9FormBaseResponse + +Generic paginated model to wrap query response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**atRecordsetCount** | **Integer** | | [optional] | +|**value** | [**List<CreateW9Form201Response>**](CreateW9Form201Response.md) | | [optional] | +|**atNextLink** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/Update1099Form200Response.md b/docs/A1099/V2/Update1099Form200Response.md index 7464017..4eb2e8b 100644 --- a/docs/A1099/V2/Update1099Form200Response.md +++ b/docs/A1099/V2/Update1099Form200Response.md @@ -45,6 +45,43 @@ |**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | |**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | |**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | +|**employeeFirstName** | **String** | | [optional] | +|**employeeMiddleName** | **String** | | [optional] | +|**employeeLastName** | **String** | | [optional] | +|**employeeNameSuffix** | **String** | | [optional] | +|**employeeDateOfBirth** | **OffsetDateTime** | | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualRequest>**](CoveredIndividualRequest.md) | | [optional] | +|**totalOrdinaryDividends** | **Double** | | [optional] | +|**qualifiedDividends** | **Double** | | [optional] | +|**totalCapitalGainDistributions** | **Double** | | [optional] | +|**unrecapturedSection1250Gain** | **Double** | | [optional] | +|**section1202Gain** | **Double** | | [optional] | +|**collectiblesGain** | **Double** | | [optional] | +|**section897OrdinaryDividends** | **Double** | | [optional] | +|**section897CapitalGain** | **Double** | | [optional] | +|**nondividendDistributions** | **Double** | | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **Double** | | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountryOrUSPossession** | **String** | | [optional] | +|**cashLiquidationDistributions** | **Double** | | [optional] | +|**noncashLiquidationDistributions** | **Double** | | [optional] | +|**exemptInterestDividends** | **Double** | | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | | [optional] | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | | [optional] | |**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | @@ -52,7 +89,6 @@ |**cardNotPresentTransactions** | **Double** | | [optional] | |**merchantCategoryCode** | **String** | | [optional] | |**paymentTransactionNumber** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | |**january** | **Double** | | [optional] | |**february** | **Double** | | [optional] | |**march** | **Double** | | [optional] | @@ -77,10 +113,27 @@ |**grossProceedsPaidToAttorney** | **Double** | | [optional] | |**fishPurchasedForResale** | **Double** | | [optional] | |**section409ADeferrals** | **Double** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | |**excessGoldenParachutePayments** | **Double** | | [optional] | |**nonqualifiedDeferredCompensation** | **Double** | | [optional] | |**nonemployeeCompensation** | **Double** | | [optional] | +|**grossDistribution** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionDetermined** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCode** | **String** | Distribution code | [optional] | +|**secondDistributionCode** | **String** | Second distribution code | [optional] | +|**iraSepSimple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**otherAmount** | **Double** | Other amount | [optional] | +|**otherPercentage** | **String** | Other percentage | [optional] | +|**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | +|**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | +|**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | +|**firstYearOfDesignatedRothContribution** | **String** | First year of designated Roth contribution | [optional] | +|**dateOfPayment** | **OffsetDateTime** | Date of payment | [optional] | @@ -96,6 +149,7 @@ | _1095_B | "1095-B" | | _1042_S | "1042-S" | | _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | @@ -110,6 +164,20 @@ +## Enum: OriginOfHealthCoverageCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | + + + ## Enum: FilerTypeEnum | Name | Value | diff --git a/docs/A1099/V2/W4FormResponse.md b/docs/A1099/V2/W4FormResponse.md index 9b0d38a..ceefd12 100644 --- a/docs/A1099/V2/W4FormResponse.md +++ b/docs/A1099/V2/W4FormResponse.md @@ -26,20 +26,6 @@ |**additionalWithheld** | **Float** | The additional amount withheld. | [optional] | |**exemptFromWithholding** | **Boolean** | Indicates whether the employee is exempt from withholding. | [optional] | |**officeCode** | **String** | The office code associated with the form. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index 2703b03..d7541c0 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -103,20 +103,6 @@ |**substantialUsOwners** | [**List<SubstantialUsOwnerResponse>**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | |**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | diff --git a/docs/A1099/V2/W8BenFormResponse.md b/docs/A1099/V2/W8BenFormResponse.md index 24481e2..9f55b45 100644 --- a/docs/A1099/V2/W8BenFormResponse.md +++ b/docs/A1099/V2/W8BenFormResponse.md @@ -33,20 +33,6 @@ |**incomeType** | **String** | The type of income covered by the treaty. | [optional] | |**signerName** | **String** | The name of the signer of the form. | [optional] | |**signerCapacity** | **String** | The capacity in which the signer is signing the form. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index 56b1535..f3def48 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -118,20 +118,6 @@ |**sponsoredDirectReportingNffeCertification** | **Boolean** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] | |**directReportingNffeSponsoringEntity** | **String** | The name of the entity that sponsors the direct reporting NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | diff --git a/docs/A1099/V2/W9FormBaseResponse.md b/docs/A1099/V2/W9FormBaseResponse.md index 3832ac0..fa56e08 100644 --- a/docs/A1099/V2/W9FormBaseResponse.md +++ b/docs/A1099/V2/W9FormBaseResponse.md @@ -8,7 +8,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | |**entryStatus** | **String** | The form status. | [optional] | |**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | @@ -21,6 +20,7 @@ |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | |**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | +|**type** | **String** | The type of the response object. | [optional] | diff --git a/docs/A1099/V2/W9FormResponse.md b/docs/A1099/V2/W9FormResponse.md index 2b8cb53..b018b73 100644 --- a/docs/A1099/V2/W9FormResponse.md +++ b/docs/A1099/V2/W9FormResponse.md @@ -26,20 +26,6 @@ |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | |**tinMatchStatus** | [**TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] | -|**id** | **String** | The unique identifier for the form. | [optional] | -|**type** | **String** | The form type. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**displayName** | **String** | The display name associated with the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | -|**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**createdAt** | **OffsetDateTime** | The creation date of the form. | [optional] | -|**updatedAt** | **OffsetDateTime** | The last updated date of the form. | [optional] | diff --git a/pom.xml b/pom.xml index 697017d..664d9cf 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 25.8.1 + 25.8.2 https://github.com/avadev/Avalara-SDK-Java OpenAPI Java diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java index c46ae7f..51d3992 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -1091,7 +1091,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java index 6cd49fc..45840c4 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -1497,7 +1497,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java index 718bb89..f845ec3 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -42,7 +42,7 @@ import Avalara.SDK.model.A1099.V2.ErrorResponse; import java.io.File; import Avalara.SDK.model.A1099.V2.IW9FormDataModelsOneOf; -import Avalara.SDK.model.A1099.V2.PaginatedW9FormsModel; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -649,9 +649,9 @@ public GetW9FormRequest getGetW9FormRequest() { * @http.response.details - +
Status Code Description Response Headers
200 List of forms -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
200 List of forms -
*/ public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -703,6 +703,10 @@ public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); } + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + if (requestParameters.getAvalaraVersion() != null) { localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); } @@ -750,46 +754,46 @@ private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest requestPar /** * List W9/W4/W8 forms - * List W9/W4/W8 forms. + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". * @param requestOptions Object which represents the options available for a given API/request - * @return PaginatedW9FormsModel + * @return PaginatedQueryResultModelW9FormBaseResponse * @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 List of forms -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
200 List of forms -
*/ - public PaginatedW9FormsModel listW9Forms(ListW9FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = listW9FormsWithHttpInfo(requestParameters); + public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = listW9FormsWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * List W9/W4/W8 forms - * List W9/W4/W8 forms. + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<PaginatedW9FormsModel> + * @return ApiResponse<PaginatedQueryResultModelW9FormBaseResponse> * @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 List of forms -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
200 List of forms -
*/ - public ApiResponse listW9FormsWithHttpInfo(ListW9FormsRequest requestParameters) throws ApiException { + public ApiResponse listW9FormsWithHttpInfo(ListW9FormsRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List W9/W4/W8 forms (asynchronously) - * List W9/W4/W8 forms. + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". * @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 @@ -797,15 +801,15 @@ public ApiResponse listW9FormsWithHttpInfo(ListW9FormsReq * @http.response.details - +
Status Code Description Response Headers
200 List of forms -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
200 List of forms -
*/ - public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -813,11 +817,12 @@ public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final * Represents the Request object for the ListW9Forms API * * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) - * @param $top If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional, default to 10) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional, default to 0) + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param count When true, returns a @recordSetCount in the result set (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) * @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) */ @@ -828,6 +833,7 @@ public class ListW9FormsRequest { private Integer $skip; private String $orderBy; private Boolean count; + private Boolean countOnly; private String xCorrelationId; private String xAvalaraClient; @@ -846,6 +852,8 @@ public ListW9FormsRequest () { public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } public Boolean getCount() { return count; } public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } public String getXCorrelationId() { return xCorrelationId; } public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } @@ -1444,7 +1452,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 12db78c..d96c3b6 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 0f6d81e..2d09c2a 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 006ca20..73a00e4 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 b2baa56..531d0e6 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -1105,7 +1105,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 a8f89b5..d133bde 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 db84058..ead2247 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 1063b04..af363c5 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -873,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 3b5ec51..984fd9c 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -489,7 +489,7 @@ public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } 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 e8c631e..4074d60 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.1"); + this.localVarApiClient.setSdkVersion("25.8.2"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java index cd874e4..ecdea7c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java @@ -24,6 +24,7 @@ import Avalara.SDK.model.A1099.V2.Form1095BList; import Avalara.SDK.model.A1099.V2.Form1095CList; import Avalara.SDK.model.A1099.V2.Form1099DivList; +import Avalara.SDK.model.A1099.V2.Form1099IntList; import Avalara.SDK.model.A1099.V2.Form1099KList; import Avalara.SDK.model.A1099.V2.Form1099MiscList; import Avalara.SDK.model.A1099.V2.Form1099NecList; @@ -90,6 +91,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1095BList = gson.getDelegateAdapter(this, TypeToken.get(Form1095BList.class)); final TypeAdapter adapterForm1095CList = gson.getDelegateAdapter(this, TypeToken.get(Form1095CList.class)); final TypeAdapter adapterForm1099DivList = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivList.class)); + final TypeAdapter adapterForm1099IntList = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntList.class)); final TypeAdapter adapterForm1099KList = gson.getDelegateAdapter(this, TypeToken.get(Form1099KList.class)); final TypeAdapter adapterForm1099MiscList = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscList.class)); final TypeAdapter adapterForm1099NecList = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecList.class)); @@ -127,6 +129,12 @@ public void write(JsonWriter out, BulkUpsert1099FormsRequest value) throws IOExc elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099IntList` + if (value.getActualInstance() instanceof Form1099IntList) { + JsonElement element = adapterForm1099IntList.toJsonTree((Form1099IntList)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099KList` if (value.getActualInstance() instanceof Form1099KList) { JsonElement element = adapterForm1099KList.toJsonTree((Form1099KList)value.getActualInstance()); @@ -151,7 +159,7 @@ public void write(JsonWriter out, BulkUpsert1099FormsRequest value) throws IOExc elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); } @Override @@ -211,6 +219,18 @@ public BulkUpsert1099FormsRequest read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099DivList failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099DivList'", e); } + // deserialize Form1099IntList + try { + // validate the JSON object to see if any exception is thrown + Form1099IntList.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099IntList; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099IntList'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099IntList failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099IntList'", e); + } // deserialize Form1099KList try { // validate the JSON object to see if any exception is thrown @@ -289,6 +309,7 @@ public BulkUpsert1099FormsRequest(Object o) { schemas.put("Form1095BList", Form1095BList.class); schemas.put("Form1095CList", Form1095CList.class); schemas.put("Form1099DivList", Form1099DivList.class); + schemas.put("Form1099IntList", Form1099IntList.class); schemas.put("Form1099KList", Form1099KList.class); schemas.put("Form1099MiscList", Form1099MiscList.class); schemas.put("Form1099NecList", Form1099NecList.class); @@ -303,7 +324,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList + * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList * * It could be an instance of the 'oneOf' schemas. */ @@ -329,6 +350,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099IntList) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099KList) { super.setActualInstance(instance); return; @@ -349,14 +375,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); + throw new RuntimeException("Invalid instance type. Must be Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); } /** * Get the actual instance, which can be the following: - * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList + * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList * - * @return The actual instance (Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList) + * @return The actual instance (Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList) */ @SuppressWarnings("unchecked") @Override @@ -404,6 +430,16 @@ public Form1095CList getForm1095CList() throws ClassCastException { public Form1099DivList getForm1099DivList() throws ClassCastException { return (Form1099DivList)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099IntList`. If the actual instance is not `Form1099IntList`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099IntList` + * @throws ClassCastException if the instance is not `Form1099IntList` + */ + public Form1099IntList getForm1099IntList() throws ClassCastException { + return (Form1099IntList)super.getActualInstance(); + } /** * Get the actual instance of `Form1099KList`. If the actual instance is not `Form1099KList`, * the ClassCastException will be thrown. @@ -487,6 +523,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099DivList failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099IntList + try { + Form1099IntList.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099IntList failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099KList try { Form1099KList.validateJsonElement(jsonElement); @@ -520,7 +564,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java index 8074296..de5c23d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java index 694c508..59393c6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java @@ -25,6 +25,7 @@ import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; @@ -98,6 +99,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); + final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); @@ -135,6 +137,12 @@ public void write(JsonWriter out, Create1099Form201Response value) throws IOExce elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099IntListItemResponse` + if (value.getActualInstance() instanceof Form1099IntListItemResponse) { + JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099KListItemResponse` if (value.getActualInstance() instanceof Form1099KListItemResponse) { JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); @@ -159,7 +167,7 @@ public void write(JsonWriter out, Create1099Form201Response value) throws IOExce elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } @Override @@ -219,6 +227,18 @@ public Create1099Form201Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); } + // deserialize Form1099IntListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099IntListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099IntListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); + } // deserialize Form1099KListItemResponse try { // validate the JSON object to see if any exception is thrown @@ -297,6 +317,7 @@ public Create1099Form201Response(Object o) { schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); + schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); @@ -311,7 +332,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * * It could be an instance of the 'oneOf' schemas. */ @@ -337,6 +358,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099IntListItemResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099KListItemResponse) { super.setActualInstance(instance); return; @@ -357,14 +383,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } /** * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) */ @SuppressWarnings("unchecked") @Override @@ -412,6 +438,16 @@ public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCast public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { return (Form1099DivListItemResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099IntListItemResponse` + * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` + */ + public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { + return (Form1099IntListItemResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, * the ClassCastException will be thrown. @@ -495,6 +531,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099IntListItemResponse + try { + Form1099IntListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099KListItemResponse try { Form1099KListItemResponse.validateJsonElement(jsonElement); @@ -528,7 +572,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java index a16b21c..06ef1e9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java @@ -20,7 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.ErrorResponseErrorsInner; +import Avalara.SDK.model.A1099.V2.ErrorResponseItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -67,7 +67,7 @@ public class ErrorResponse { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors; + private List errors; public ErrorResponse() { } @@ -91,12 +91,12 @@ public void setTitle(String title) { } - public ErrorResponse errors(List errors) { + public ErrorResponse errors(List errors) { this.errors = errors; return this; } - public ErrorResponse addErrorsItem(ErrorResponseErrorsInner errorsItem) { + public ErrorResponse addErrorsItem(ErrorResponseItem errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); } @@ -109,11 +109,11 @@ public ErrorResponse addErrorsItem(ErrorResponseErrorsInner errorsItem) { * @return errors */ @javax.annotation.Nullable - public List getErrors() { + public List getErrors() { return errors; } - public void setErrors(List errors) { + public void setErrors(List errors) { this.errors = errors; } @@ -217,7 +217,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `errors` (array) for (int i = 0; i < jsonArrayerrors.size(); i++) { - ErrorResponseErrorsInner.validateJsonElement(jsonArrayerrors.get(i)); + ErrorResponseItem.validateJsonElement(jsonArrayerrors.get(i)); }; } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java new file mode 100644 index 0000000..f5c67b6 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java @@ -0,0 +1,253 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * ErrorResponseItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class ErrorResponseItem { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_DETAIL = "detail"; + @SerializedName(SERIALIZED_NAME_DETAIL) + private String detail; + + public ErrorResponseItem() { + } + + public ErrorResponseItem type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public ErrorResponseItem detail(String detail) { + this.detail = detail; + return this; + } + + /** + * Get detail + * @return detail + */ + @javax.annotation.Nullable + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponseItem errorResponseItem = (ErrorResponseItem) o; + return Objects.equals(this.type, errorResponseItem.type) && + Objects.equals(this.detail, errorResponseItem.detail); + } + + 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(type, detail); + } + + 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 ErrorResponseItem {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).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("type"); + openapiFields.add("detail"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 ErrorResponseItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponseItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponseItem is not found in the empty JSON string", ErrorResponseItem.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponseItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponseItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) && !jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `detail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponseItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponseItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponseItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponseItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponseItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponseItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponseItem + * @throws IOException if the JSON string is invalid with respect to ErrorResponseItem + */ + public static ErrorResponseItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponseItem.class); + } + + /** + * Convert an instance of ErrorResponseItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java new file mode 100644 index 0000000..26703d9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -0,0 +1,1962 @@ +/* + * 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.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1042S + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042S { + 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; + + public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN) + private String recipientGiin; + + public static final String SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN = "recipientForeignTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN) + private String recipientForeignTin; + + public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; + @SerializedName(SERIALIZED_NAME_LOB_CODE) + private String lobCode; + + public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode"; + @SerializedName(SERIALIZED_NAME_INCOME_CODE) + private String incomeCode; + + public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome"; + @SerializedName(SERIALIZED_NAME_GROSS_INCOME) + private Double grossIncome; + + public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator"; + @SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR) + private String withholdingIndicator; + + public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode"; + @SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE) + private String taxCountryCode; + + public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; + @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) + private String exemptionCodeChap3; + + public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; + @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) + private String exemptionCodeChap4; + + public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3"; + @SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3) + private String taxRateChap3; + + public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance"; + @SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE) + private Double withholdingAllowance; + + public static final String SERIALIZED_NAME_FEDERAL_TAX_WITHHELD = "federalTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_TAX_WITHHELD) + private Double federalTaxWithheld; + + public static final String SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR = "taxNotDepositedIndicator"; + @SerializedName(SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR) + private Boolean taxNotDepositedIndicator; + + public static final String SERIALIZED_NAME_ACADEMIC_INDICATOR = "academicIndicator"; + @SerializedName(SERIALIZED_NAME_ACADEMIC_INDICATOR) + private Boolean academicIndicator; + + public static final String SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS = "taxWithheldOtherAgents"; + @SerializedName(SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS) + private Double taxWithheldOtherAgents; + + public static final String SERIALIZED_NAME_AMOUNT_REPAID = "amountRepaid"; + @SerializedName(SERIALIZED_NAME_AMOUNT_REPAID) + private Double amountRepaid; + + public static final String SERIALIZED_NAME_TAX_PAID_AGENT = "taxPaidAgent"; + @SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT) + private Double taxPaidAgent; + + public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; + @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) + private String chap3StatusCode; + + public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; + @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) + private String chap4StatusCode; + + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT) + private PrimaryWithholdingAgent primaryWithholdingAgent; + + public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; + @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; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private Integer issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @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; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public Form1042S() { + } + + public Form1042S uniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + return this; + } + + /** + * Get uniqueFormId + * @return uniqueFormId + */ + @javax.annotation.Nullable + public String getUniqueFormId() { + return uniqueFormId; + } + + public void setUniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + } + + + public Form1042S recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + return this; + } + + /** + * Get recipientDateOfBirth + * @return recipientDateOfBirth + */ + @javax.annotation.Nullable + public OffsetDateTime getRecipientDateOfBirth() { + return recipientDateOfBirth; + } + + public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + } + + + public Form1042S recipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + return this; + } + + /** + * Get recipientGiin + * @return recipientGiin + */ + @javax.annotation.Nullable + public String getRecipientGiin() { + return recipientGiin; + } + + public void setRecipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + } + + + public Form1042S recipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + return this; + } + + /** + * Get recipientForeignTin + * @return recipientForeignTin + */ + @javax.annotation.Nullable + public String getRecipientForeignTin() { + return recipientForeignTin; + } + + public void setRecipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + } + + + public Form1042S lobCode(String lobCode) { + this.lobCode = lobCode; + return this; + } + + /** + * Get lobCode + * @return lobCode + */ + @javax.annotation.Nullable + public String getLobCode() { + return lobCode; + } + + public void setLobCode(String lobCode) { + this.lobCode = lobCode; + } + + + public Form1042S incomeCode(String incomeCode) { + this.incomeCode = incomeCode; + return this; + } + + /** + * Get incomeCode + * @return incomeCode + */ + @javax.annotation.Nullable + public String getIncomeCode() { + return incomeCode; + } + + public void setIncomeCode(String incomeCode) { + this.incomeCode = incomeCode; + } + + + public Form1042S grossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + return this; + } + + /** + * Get grossIncome + * @return grossIncome + */ + @javax.annotation.Nullable + public Double getGrossIncome() { + return grossIncome; + } + + public void setGrossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + } + + + public Form1042S withholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + return this; + } + + /** + * Get withholdingIndicator + * @return withholdingIndicator + */ + @javax.annotation.Nullable + public String getWithholdingIndicator() { + return withholdingIndicator; + } + + public void setWithholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + } + + + public Form1042S taxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + return this; + } + + /** + * Get taxCountryCode + * @return taxCountryCode + */ + @javax.annotation.Nullable + public String getTaxCountryCode() { + return taxCountryCode; + } + + public void setTaxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + } + + + public Form1042S exemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + return this; + } + + /** + * Get exemptionCodeChap3 + * @return exemptionCodeChap3 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap3() { + return exemptionCodeChap3; + } + + public void setExemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + } + + + public Form1042S exemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + return this; + } + + /** + * Get exemptionCodeChap4 + * @return exemptionCodeChap4 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap4() { + return exemptionCodeChap4; + } + + public void setExemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + } + + + public Form1042S taxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + return this; + } + + /** + * Get taxRateChap3 + * @return taxRateChap3 + */ + @javax.annotation.Nullable + public String getTaxRateChap3() { + return taxRateChap3; + } + + public void setTaxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + } + + + public Form1042S withholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + return this; + } + + /** + * Get withholdingAllowance + * @return withholdingAllowance + */ + @javax.annotation.Nullable + public Double getWithholdingAllowance() { + return withholdingAllowance; + } + + public void setWithholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + } + + + public Form1042S federalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + return this; + } + + /** + * Get federalTaxWithheld + * @return federalTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalTaxWithheld() { + return federalTaxWithheld; + } + + public void setFederalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + } + + + public Form1042S taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + return this; + } + + /** + * Get taxNotDepositedIndicator + * @return taxNotDepositedIndicator + */ + @javax.annotation.Nullable + public Boolean getTaxNotDepositedIndicator() { + return taxNotDepositedIndicator; + } + + public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + } + + + public Form1042S academicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + return this; + } + + /** + * Get academicIndicator + * @return academicIndicator + */ + @javax.annotation.Nullable + public Boolean getAcademicIndicator() { + return academicIndicator; + } + + public void setAcademicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + } + + + public Form1042S taxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + return this; + } + + /** + * Get taxWithheldOtherAgents + * @return taxWithheldOtherAgents + */ + @javax.annotation.Nullable + public Double getTaxWithheldOtherAgents() { + return taxWithheldOtherAgents; + } + + public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + } + + + public Form1042S amountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + return this; + } + + /** + * Get amountRepaid + * @return amountRepaid + */ + @javax.annotation.Nullable + public Double getAmountRepaid() { + return amountRepaid; + } + + public void setAmountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + } + + + public Form1042S taxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + return this; + } + + /** + * Get taxPaidAgent + * @return taxPaidAgent + */ + @javax.annotation.Nullable + public Double getTaxPaidAgent() { + return taxPaidAgent; + } + + public void setTaxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + } + + + public Form1042S chap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + return this; + } + + /** + * Get chap3StatusCode + * @return chap3StatusCode + */ + @javax.annotation.Nullable + public String getChap3StatusCode() { + return chap3StatusCode; + } + + public void setChap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + } + + + public Form1042S chap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + return this; + } + + /** + * Get chap4StatusCode + * @return chap4StatusCode + */ + @javax.annotation.Nullable + public String getChap4StatusCode() { + return chap4StatusCode; + } + + public void setChap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + } + + + public Form1042S primaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + return this; + } + + /** + * Get primaryWithholdingAgent + * @return primaryWithholdingAgent + */ + @javax.annotation.Nullable + public PrimaryWithholdingAgent getPrimaryWithholdingAgent() { + return primaryWithholdingAgent; + } + + public void setPrimaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + } + + + public Form1042S intermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + return this; + } + + /** + * Get intermediaryOrFlowThrough + * @return intermediaryOrFlowThrough + */ + @javax.annotation.Nullable + public IntermediaryOrFlowThrough getIntermediaryOrFlowThrough() { + return intermediaryOrFlowThrough; + } + + public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + } + + + public Form1042S id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1042S type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Form1042S issuerId(Integer issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public Integer getIssuerId() { + return issuerId; + } + + public void setIssuerId(Integer issuerId) { + this.issuerId = issuerId; + } + + + public Form1042S issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1042S issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1042S taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = 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); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1042S postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1042S postalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1042S tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1042S tinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1042S addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1042S addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1042S eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1042S referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1042S email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1042S tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public Form1042S fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1042S tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Get tin + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public Form1042S noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1042S secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1042S recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1042S recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1042S address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1042S address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1042S city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1042S state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1042S zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1042S nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1042S countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1042S accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1042S officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + 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 + * @return validationErrors + */ + @javax.annotation.Nullable + 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 + * @return createdAt + */ + @javax.annotation.Nullable + 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 + * @return updatedAt + */ + @javax.annotation.Nullable + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1042S form1042S = (Form1042S) o; + return Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) && + Objects.equals(this.recipientDateOfBirth, form1042S.recipientDateOfBirth) && + Objects.equals(this.recipientGiin, form1042S.recipientGiin) && + Objects.equals(this.recipientForeignTin, form1042S.recipientForeignTin) && + Objects.equals(this.lobCode, form1042S.lobCode) && + Objects.equals(this.incomeCode, form1042S.incomeCode) && + Objects.equals(this.grossIncome, form1042S.grossIncome) && + Objects.equals(this.withholdingIndicator, form1042S.withholdingIndicator) && + Objects.equals(this.taxCountryCode, form1042S.taxCountryCode) && + Objects.equals(this.exemptionCodeChap3, form1042S.exemptionCodeChap3) && + Objects.equals(this.exemptionCodeChap4, form1042S.exemptionCodeChap4) && + Objects.equals(this.taxRateChap3, form1042S.taxRateChap3) && + Objects.equals(this.withholdingAllowance, form1042S.withholdingAllowance) && + Objects.equals(this.federalTaxWithheld, form1042S.federalTaxWithheld) && + Objects.equals(this.taxNotDepositedIndicator, form1042S.taxNotDepositedIndicator) && + Objects.equals(this.academicIndicator, form1042S.academicIndicator) && + Objects.equals(this.taxWithheldOtherAgents, form1042S.taxWithheldOtherAgents) && + Objects.equals(this.amountRepaid, form1042S.amountRepaid) && + Objects.equals(this.taxPaidAgent, form1042S.taxPaidAgent) && + Objects.equals(this.chap3StatusCode, form1042S.chap3StatusCode) && + 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.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) && + Objects.equals(this.address2, form1042S.address2) && + 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.accountNumber, form1042S.accountNumber) && + Objects.equals(this.officeCode, form1042S.officeCode) && + Objects.equals(this.validationErrors, form1042S.validationErrors) && + Objects.equals(this.createdAt, form1042S.createdAt) && + Objects.equals(this.updatedAt, form1042S.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding); + } + + 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(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); + } + + 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 Form1042S {\n"); + sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); + sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); + sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); + sb.append(" recipientForeignTin: ").append(toIndentedString(recipientForeignTin)).append("\n"); + sb.append(" lobCode: ").append(toIndentedString(lobCode)).append("\n"); + sb.append(" incomeCode: ").append(toIndentedString(incomeCode)).append("\n"); + sb.append(" grossIncome: ").append(toIndentedString(grossIncome)).append("\n"); + sb.append(" withholdingIndicator: ").append(toIndentedString(withholdingIndicator)).append("\n"); + sb.append(" taxCountryCode: ").append(toIndentedString(taxCountryCode)).append("\n"); + sb.append(" exemptionCodeChap3: ").append(toIndentedString(exemptionCodeChap3)).append("\n"); + sb.append(" exemptionCodeChap4: ").append(toIndentedString(exemptionCodeChap4)).append("\n"); + sb.append(" taxRateChap3: ").append(toIndentedString(taxRateChap3)).append("\n"); + sb.append(" withholdingAllowance: ").append(toIndentedString(withholdingAllowance)).append("\n"); + sb.append(" federalTaxWithheld: ").append(toIndentedString(federalTaxWithheld)).append("\n"); + sb.append(" taxNotDepositedIndicator: ").append(toIndentedString(taxNotDepositedIndicator)).append("\n"); + sb.append(" academicIndicator: ").append(toIndentedString(academicIndicator)).append("\n"); + sb.append(" taxWithheldOtherAgents: ").append(toIndentedString(taxWithheldOtherAgents)).append("\n"); + sb.append(" amountRepaid: ").append(toIndentedString(amountRepaid)).append("\n"); + sb.append(" taxPaidAgent: ").append(toIndentedString(taxPaidAgent)).append("\n"); + sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); + sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); + sb.append(" primaryWithholdingAgent: ").append(toIndentedString(primaryWithholdingAgent)).append("\n"); + sb.append(" intermediaryOrFlowThrough: ").append(toIndentedString(intermediaryOrFlowThrough)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("type"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("federalEfile"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfile"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMail"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatch"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerification"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1042S + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042S.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042S is not found in the empty JSON string", Form1042S.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042S.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042S` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); + } + if ((jsonObj.get("recipientGiin") != null && !jsonObj.get("recipientGiin").isJsonNull()) && !jsonObj.get("recipientGiin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientGiin").toString())); + } + if ((jsonObj.get("recipientForeignTin") != null && !jsonObj.get("recipientForeignTin").isJsonNull()) && !jsonObj.get("recipientForeignTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientForeignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientForeignTin").toString())); + } + if ((jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) && !jsonObj.get("lobCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lobCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lobCode").toString())); + } + if ((jsonObj.get("incomeCode") != null && !jsonObj.get("incomeCode").isJsonNull()) && !jsonObj.get("incomeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `incomeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeCode").toString())); + } + if ((jsonObj.get("withholdingIndicator") != null && !jsonObj.get("withholdingIndicator").isJsonNull()) && !jsonObj.get("withholdingIndicator").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `withholdingIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingIndicator").toString())); + } + if ((jsonObj.get("taxCountryCode") != null && !jsonObj.get("taxCountryCode").isJsonNull()) && !jsonObj.get("taxCountryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCountryCode").toString())); + } + if ((jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) && !jsonObj.get("exemptionCodeChap3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap3").toString())); + } + if ((jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) && !jsonObj.get("exemptionCodeChap4").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap4").toString())); + } + if ((jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) && !jsonObj.get("taxRateChap3").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxRateChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxRateChap3").toString())); + } + if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); + } + if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); + } + // validate the optional field `primaryWithholdingAgent` + if (jsonObj.get("primaryWithholdingAgent") != null && !jsonObj.get("primaryWithholdingAgent").isJsonNull()) { + PrimaryWithholdingAgent.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); + } + // validate the optional field `intermediaryOrFlowThrough` + if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { + IntermediaryOrFlowThrough.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); + } + 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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + 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("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("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1042S.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042S' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042S.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042S value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042S read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042S given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042S + * @throws IOException if the JSON string is invalid with respect to Form1042S + */ + public static Form1042S fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042S.class); + } + + /** + * Convert an instance of Form1042S 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/Form1042SListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java index 2f28d08..c651b4e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java @@ -790,6 +790,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -1380,7 +1384,7 @@ public Form1042SListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -1418,7 +1422,7 @@ public Form1042SListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1551,7 +1555,7 @@ public Form1042SListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1656,6 +1660,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1042SListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1042SListItem addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1749,6 +1772,7 @@ public boolean equals(Object o) { Objects.equals(this.stateEFile, form1042SListItem.stateEFile) && Objects.equals(this.tinMatch, form1042SListItem.tinMatch) && Objects.equals(this.secondTinNotice, form1042SListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1042SListItem.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1042SListItem.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1042SListItem.stateAndLocalWithholding); } @@ -1759,7 +1783,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uniqueFormId, noTin, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(uniqueFormId, noTin, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1818,6 +1842,7 @@ public String toString() { sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1864,14 +1889,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1894,13 +1917,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1042SListItem.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("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); @@ -1988,13 +2004,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -2015,7 +2031,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java index 204764b..c7fd231 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java @@ -177,7 +177,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -370,6 +372,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -975,7 +981,7 @@ public Form1042SRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -1013,7 +1019,7 @@ public Form1042SRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1146,7 +1152,7 @@ public Form1042SRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1270,6 +1276,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1042SRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1042SRequest addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1346,6 +1371,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1042SRequest.tinMatch) && Objects.equals(this.noTin, form1042SRequest.noTin) && Objects.equals(this.secondTinNotice, form1042SRequest.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1042SRequest.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1042SRequest.addressVerification); } @@ -1355,7 +1381,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, stateAndLocalWithholding, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification); + 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, stateAndLocalWithholding, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification); } private static int hashCodeNullable(JsonNullable a) { @@ -1416,6 +1442,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append("}"); return sb.toString(); @@ -1462,14 +1489,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1492,13 +1517,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1042SRequest.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("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); @@ -1577,13 +1595,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1604,7 +1622,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java index c4d71eb..e78c2a6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java @@ -84,7 +84,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java index cc7d048..cbbc83c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.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 @@ -72,7 +72,7 @@ public class Form1095B { public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals = new ArrayList<>(); + private List coveredIndividuals; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -138,6 +138,10 @@ public class Form1095B { @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; @@ -150,10 +154,22 @@ public class Form1095B { @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; @@ -182,14 +198,22 @@ public class Form1095B { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -567,6 +591,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1095B eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1095B referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -624,6 +667,25 @@ public void setTinType(String tinType) { } + public Form1095B fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1095B tin(String tin) { this.tin = tin; return this; @@ -643,6 +705,44 @@ public void setTin(String tin) { } + public Form1095B noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1095B secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1095B recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -776,22 +876,22 @@ public void setZip(String zip) { } - public Form1095B foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1095B nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -814,6 +914,44 @@ public void setCountryCode(String countryCode) { } + public Form1095B accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1095B officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1095B validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -926,10 +1064,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1095B.tinMatchStatus) && Objects.equals(this.addressVerification, form1095B.addressVerification) && Objects.equals(this.addressVerificationStatus, form1095B.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1095B.eDeliveryStatus) && Objects.equals(this.referenceId, form1095B.referenceId) && Objects.equals(this.email, form1095B.email) && Objects.equals(this.tinType, form1095B.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1095B.fatcaFilingRequirement) && Objects.equals(this.tin, form1095B.tin) && + Objects.equals(this.noTin, form1095B.noTin) && + Objects.equals(this.secondTinNotice, form1095B.secondTinNotice) && Objects.equals(this.recipientName, form1095B.recipientName) && Objects.equals(this.recipientSecondName, form1095B.recipientSecondName) && Objects.equals(this.address, form1095B.address) && @@ -937,8 +1079,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1095B.city) && Objects.equals(this.state, form1095B.state) && Objects.equals(this.zip, form1095B.zip) && - Objects.equals(this.foreignProvince, form1095B.foreignProvince) && + Objects.equals(this.nonUsProvince, form1095B.nonUsProvince) && Objects.equals(this.countryCode, form1095B.countryCode) && + Objects.equals(this.accountNumber, form1095B.accountNumber) && + Objects.equals(this.officeCode, form1095B.officeCode) && Objects.equals(this.validationErrors, form1095B.validationErrors) && Objects.equals(this.createdAt, form1095B.createdAt) && Objects.equals(this.updatedAt, form1095B.updatedAt) && @@ -951,7 +1095,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(originOfHealthCoverageCode, coveredIndividuals, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(originOfHealthCoverageCode, coveredIndividuals, 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); } private static int hashCodeNullable(JsonNullable a) { @@ -983,10 +1127,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -994,8 +1142,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1038,10 +1188,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1049,8 +1203,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1140,6 +1296,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1173,12 +1333,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java index 8a77dbd..708a73d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java @@ -297,6 +297,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -572,7 +576,7 @@ public Form1095BListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -610,7 +614,7 @@ public Form1095BListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -743,7 +747,7 @@ public Form1095BListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -867,6 +871,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1095BListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1095BListItem addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -944,6 +967,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1095BListItem.tinMatch) && Objects.equals(this.noTin, form1095BListItem.noTin) && Objects.equals(this.secondTinNotice, form1095BListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1095BListItem.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1095BListItem.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1095BListItem.stateAndLocalWithholding); } @@ -954,7 +978,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -997,6 +1021,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1043,14 +1068,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1073,13 +1096,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1095BListItem.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("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); @@ -1136,13 +1152,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1163,7 +1179,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java index 494523f..6696319 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java @@ -172,7 +172,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -365,6 +367,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -659,7 +665,7 @@ public Form1095BRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -697,7 +703,7 @@ public Form1095BRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -830,7 +836,7 @@ public Form1095BRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -954,6 +960,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1095BRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1095BRequest addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1032,6 +1057,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1095BRequest.tinMatch) && Objects.equals(this.noTin, form1095BRequest.noTin) && Objects.equals(this.secondTinNotice, form1095BRequest.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1095BRequest.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1095BRequest.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1095BRequest.stateAndLocalWithholding); } @@ -1042,7 +1068,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1086,6 +1112,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1133,14 +1160,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1163,13 +1188,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1095BRequest.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("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); @@ -1233,13 +1251,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1260,7 +1278,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java new file mode 100644 index 0000000..fb0e600 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java @@ -0,0 +1,1726 @@ +/* + * 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.CoveredIndividualRequest; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1095BResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1095BResponse { + public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) + private String employeeFirstName; + + public static final String SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME = "employeeMiddleName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME) + private String employeeMiddleName; + + public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) + private String employeeLastName; + + public static final String SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX = "employeeNameSuffix"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) + private String employeeNameSuffix; + + public static final String SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH = "employeeDateOfBirth"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH) + private OffsetDateTime employeeDateOfBirth; + + /** + * Gets or Sets originOfHealthCoverageCode + */ + @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) + public enum OriginOfHealthCoverageCodeEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + G("G"); + + private String value; + + OriginOfHealthCoverageCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OriginOfHealthCoverageCodeEnum fromValue(String value) { + for (OriginOfHealthCoverageCodeEnum b : OriginOfHealthCoverageCodeEnum.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 OriginOfHealthCoverageCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OriginOfHealthCoverageCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OriginOfHealthCoverageCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OriginOfHealthCoverageCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; + @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) + private OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode; + + public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; + @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) + private List coveredIndividuals; + + /** + * Gets or Sets 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 TypeEnum type; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholdingResponse stateAndLocalWithholding; + + /** + * Gets or Sets tinType + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) + private String recipientTin; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_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; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; + @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) + private Boolean federalEFile; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; + @SerializedName(SERIALIZED_NAME_STATE_E_FILE) + private Boolean stateEFile; + + 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_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private StatusDetail eDeliveryStatus; + + 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 StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public Form1095BResponse() { + } + + public Form1095BResponse( + TypeEnum type + ) { + this(); + this.type = type; + } + + public Form1095BResponse employeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + return this; + } + + /** + * Get employeeFirstName + * @return employeeFirstName + */ + @javax.annotation.Nullable + public String getEmployeeFirstName() { + return employeeFirstName; + } + + public void setEmployeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + } + + + public Form1095BResponse employeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + return this; + } + + /** + * Get employeeMiddleName + * @return employeeMiddleName + */ + @javax.annotation.Nullable + public String getEmployeeMiddleName() { + return employeeMiddleName; + } + + public void setEmployeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + } + + + public Form1095BResponse employeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + return this; + } + + /** + * Get employeeLastName + * @return employeeLastName + */ + @javax.annotation.Nullable + public String getEmployeeLastName() { + return employeeLastName; + } + + public void setEmployeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + } + + + public Form1095BResponse employeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + return this; + } + + /** + * Get employeeNameSuffix + * @return employeeNameSuffix + */ + @javax.annotation.Nullable + public String getEmployeeNameSuffix() { + return employeeNameSuffix; + } + + public void setEmployeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + } + + + public Form1095BResponse employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { + this.employeeDateOfBirth = employeeDateOfBirth; + return this; + } + + /** + * Get employeeDateOfBirth + * @return employeeDateOfBirth + */ + @javax.annotation.Nullable + public OffsetDateTime getEmployeeDateOfBirth() { + return employeeDateOfBirth; + } + + public void setEmployeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { + this.employeeDateOfBirth = employeeDateOfBirth; + } + + + public Form1095BResponse originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { + this.originOfHealthCoverageCode = originOfHealthCoverageCode; + return this; + } + + /** + * Get originOfHealthCoverageCode + * @return originOfHealthCoverageCode + */ + @javax.annotation.Nullable + public OriginOfHealthCoverageCodeEnum getOriginOfHealthCoverageCode() { + return originOfHealthCoverageCode; + } + + public void setOriginOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { + this.originOfHealthCoverageCode = originOfHealthCoverageCode; + } + + + public Form1095BResponse coveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; + return this; + } + + public Form1095BResponse addCoveredIndividualsItem(CoveredIndividualRequest coveredIndividualsItem) { + if (this.coveredIndividuals == null) { + this.coveredIndividuals = new ArrayList<>(); + } + this.coveredIndividuals.add(coveredIndividualsItem); + return this; + } + + /** + * Get coveredIndividuals + * @return coveredIndividuals + */ + @javax.annotation.Nullable + public List getCoveredIndividuals() { + return coveredIndividuals; + } + + public void setCoveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; + } + + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public Form1095BResponse 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 Form1095BResponse 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; + } + + + public Form1095BResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * Get stateAndLocalWithholding + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + public Form1095BResponse tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1095BResponse id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1095BResponse issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1095BResponse issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1095BResponse issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1095BResponse taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1095BResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1095BResponse recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1095BResponse recipientTin(String recipientTin) { + this.recipientTin = recipientTin; + return this; + } + + /** + * Get recipientTin + * @return recipientTin + */ + @javax.annotation.Nullable + public String getRecipientTin() { + return recipientTin; + } + + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; + } + + + public Form1095BResponse recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1095BResponse address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1095BResponse address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1095BResponse city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1095BResponse state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1095BResponse zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1095BResponse email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1095BResponse accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1095BResponse officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1095BResponse nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1095BResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1095BResponse 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 Form1095BResponse postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1095BResponse 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 Form1095BResponse tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1095BResponse noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1095BResponse secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1095BResponse addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1095BResponse federalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + return this; + } + + /** + * Get federalEfileStatus + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + public void setFederalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + } + + + public Form1095BResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1095BResponse stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1095BResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { + if (this.stateEfileStatus == null) { + this.stateEfileStatus = new ArrayList<>(); + } + this.stateEfileStatus.add(stateEfileStatusItem); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1095BResponse postalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1095BResponse tinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1095BResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1095BResponse validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1095BResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { + if (this.validationErrors == null) { + this.validationErrors = new ArrayList<>(); + } + this.validationErrors.add(validationErrorsItem); + return this; + } + + /** + * Get validationErrors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + public void setValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1095BResponse form1095BResponse = (Form1095BResponse) o; + return Objects.equals(this.employeeFirstName, form1095BResponse.employeeFirstName) && + Objects.equals(this.employeeMiddleName, form1095BResponse.employeeMiddleName) && + Objects.equals(this.employeeLastName, form1095BResponse.employeeLastName) && + Objects.equals(this.employeeNameSuffix, form1095BResponse.employeeNameSuffix) && + Objects.equals(this.employeeDateOfBirth, form1095BResponse.employeeDateOfBirth) && + Objects.equals(this.originOfHealthCoverageCode, form1095BResponse.originOfHealthCoverageCode) && + Objects.equals(this.coveredIndividuals, form1095BResponse.coveredIndividuals) && + Objects.equals(this.type, form1095BResponse.type) && + Objects.equals(this.createdAt, form1095BResponse.createdAt) && + Objects.equals(this.updatedAt, form1095BResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1095BResponse.stateAndLocalWithholding) && + Objects.equals(this.tinType, form1095BResponse.tinType) && + Objects.equals(this.id, form1095BResponse.id) && + Objects.equals(this.issuerId, form1095BResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1095BResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1095BResponse.issuerTin) && + Objects.equals(this.taxYear, form1095BResponse.taxYear) && + Objects.equals(this.referenceId, form1095BResponse.referenceId) && + Objects.equals(this.recipientName, form1095BResponse.recipientName) && + Objects.equals(this.recipientTin, form1095BResponse.recipientTin) && + Objects.equals(this.recipientSecondName, form1095BResponse.recipientSecondName) && + Objects.equals(this.address, form1095BResponse.address) && + Objects.equals(this.address2, form1095BResponse.address2) && + Objects.equals(this.city, form1095BResponse.city) && + Objects.equals(this.state, form1095BResponse.state) && + Objects.equals(this.zip, form1095BResponse.zip) && + Objects.equals(this.email, form1095BResponse.email) && + Objects.equals(this.accountNumber, form1095BResponse.accountNumber) && + Objects.equals(this.officeCode, form1095BResponse.officeCode) && + Objects.equals(this.nonUsProvince, form1095BResponse.nonUsProvince) && + Objects.equals(this.countryCode, form1095BResponse.countryCode) && + Objects.equals(this.federalEFile, form1095BResponse.federalEFile) && + Objects.equals(this.postalMail, form1095BResponse.postalMail) && + Objects.equals(this.stateEFile, form1095BResponse.stateEFile) && + Objects.equals(this.tinMatch, form1095BResponse.tinMatch) && + Objects.equals(this.noTin, form1095BResponse.noTin) && + Objects.equals(this.secondTinNotice, form1095BResponse.secondTinNotice) && + Objects.equals(this.addressVerification, form1095BResponse.addressVerification) && + Objects.equals(this.federalEfileStatus, form1095BResponse.federalEfileStatus) && + Objects.equals(this.eDeliveryStatus, form1095BResponse.eDeliveryStatus) && + Objects.equals(this.stateEfileStatus, form1095BResponse.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1095BResponse.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1095BResponse.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1095BResponse.addressVerificationStatus) && + Objects.equals(this.validationErrors, form1095BResponse.validationErrors); + } + + 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(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + } + + 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 Form1095BResponse {\n"); + sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); + sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); + sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); + sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); + sb.append(" employeeDateOfBirth: ").append(toIndentedString(employeeDateOfBirth)).append("\n"); + sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); + sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).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("type"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("tinType"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("recipientName"); + openapiFields.add("recipientTin"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("addressVerification"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("validationErrors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1095BResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1095BResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BResponse is not found in the empty JSON string", Form1095BResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1095BResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); + } + if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); + } + if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); + } + if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); + } + if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); + } + // validate the optional field `originOfHealthCoverageCode` + if (jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) { + OriginOfHealthCoverageCodeEnum.validateJsonElement(jsonObj.get("originOfHealthCoverageCode")); + } + if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { + JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); + if (jsonArraycoveredIndividuals != null) { + // ensure the json data is an array + if (!jsonObj.get("coveredIndividuals").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `coveredIndividuals` to be an array in the JSON string but got `%s`", jsonObj.get("coveredIndividuals").toString())); + } + + // validate the optional field `coveredIndividuals` (array) + for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { + CoveredIndividualRequest.validateJsonElement(jsonArraycoveredIndividuals.get(i)); + }; + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + 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("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").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("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1095BResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1095BResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1095BResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1095BResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1095BResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1095BResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1095BResponse + * @throws IOException if the JSON string is invalid with respect to Form1095BResponse + */ + public static Form1095BResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1095BResponse.class); + } + + /** + * Convert an instance of Form1095BResponse 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/Form1095CListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java index 906fc1e..a0504fe 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java @@ -256,6 +256,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -634,7 +638,7 @@ public Form1095CListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -672,7 +676,7 @@ public Form1095CListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -805,7 +809,7 @@ public Form1095CListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -929,6 +933,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1095CListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1095CListItem addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1011,6 +1034,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1095CListItem.tinMatch) && Objects.equals(this.noTin, form1095CListItem.noTin) && Objects.equals(this.secondTinNotice, form1095CListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1095CListItem.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1095CListItem.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1095CListItem.stateAndLocalWithholding); } @@ -1021,7 +1045,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, offerAndCoverages, employerProvidedSiCoverage, coveredIndividuals, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, offerAndCoverages, employerProvidedSiCoverage, coveredIndividuals, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1069,6 +1093,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1118,15 +1143,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1228,13 +1251,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1255,7 +1278,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java index 6bfd3bb..baecd0e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.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 @@ -129,6 +129,10 @@ public class Form1099Base { @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; @@ -141,10 +145,22 @@ public class Form1099Base { @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; @@ -173,14 +189,22 @@ public class Form1099Base { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -512,6 +536,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1099Base eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1099Base referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -569,6 +612,25 @@ public void setTinType(String tinType) { } + public Form1099Base fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099Base tin(String tin) { this.tin = tin; return this; @@ -588,6 +650,44 @@ public void setTin(String tin) { } + public Form1099Base noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099Base secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1099Base recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -721,22 +821,22 @@ public void setZip(String zip) { } - public Form1099Base foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1099Base nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -759,6 +859,44 @@ public void setCountryCode(String countryCode) { } + public Form1099Base accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099Base officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1099Base validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -869,10 +1007,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1099Base.tinMatchStatus) && Objects.equals(this.addressVerification, form1099Base.addressVerification) && Objects.equals(this.addressVerificationStatus, form1099Base.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Base.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Base.referenceId) && Objects.equals(this.email, form1099Base.email) && Objects.equals(this.tinType, form1099Base.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099Base.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Base.tin) && + Objects.equals(this.noTin, form1099Base.noTin) && + Objects.equals(this.secondTinNotice, form1099Base.secondTinNotice) && Objects.equals(this.recipientName, form1099Base.recipientName) && Objects.equals(this.recipientSecondName, form1099Base.recipientSecondName) && Objects.equals(this.address, form1099Base.address) && @@ -880,8 +1022,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1099Base.city) && Objects.equals(this.state, form1099Base.state) && Objects.equals(this.zip, form1099Base.zip) && - Objects.equals(this.foreignProvince, form1099Base.foreignProvince) && + Objects.equals(this.nonUsProvince, form1099Base.nonUsProvince) && Objects.equals(this.countryCode, form1099Base.countryCode) && + Objects.equals(this.accountNumber, form1099Base.accountNumber) && + Objects.equals(this.officeCode, form1099Base.officeCode) && Objects.equals(this.validationErrors, form1099Base.validationErrors) && Objects.equals(this.createdAt, form1099Base.createdAt) && Objects.equals(this.updatedAt, form1099Base.updatedAt) && @@ -894,7 +1038,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(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); } private static int hashCodeNullable(JsonNullable a) { @@ -924,10 +1068,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -935,8 +1083,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -979,10 +1129,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -990,8 +1144,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1064,6 +1220,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1097,12 +1257,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java new file mode 100644 index 0000000..df98ea0 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -0,0 +1,1794 @@ +/* + * 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.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1099Div + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099Div { + public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; + @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) + private Double totalOrdinaryDividends; + + public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) + private Double qualifiedDividends; + + public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; + @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) + private Double totalCapitalGainDistributions; + + public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; + @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) + private Double unrecapturedSection1250Gain; + + public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; + @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) + private Double section1202Gain; + + public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; + @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) + private Double collectiblesGain; + + public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; + @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) + private Double section897OrdinaryDividends; + + public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; + @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) + private Double section897CapitalGain; + + public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; + @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) + private Double nondividendDistributions; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; + @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) + private Double section199ADividends; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) + private String foreignCountryOrUSPossession; + + public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; + @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) + private Double cashLiquidationDistributions; + + public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; + @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) + private Double noncashLiquidationDistributions; + + public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; + @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) + private Double exemptInterestDividends; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) + private Double specifiedPrivateActivityBondInterestDividends; + + 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_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private Integer issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @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_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; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public Form1099Div() { + } + + public Form1099Div totalOrdinaryDividends(Double totalOrdinaryDividends) { + this.totalOrdinaryDividends = totalOrdinaryDividends; + return this; + } + + /** + * Get totalOrdinaryDividends + * @return totalOrdinaryDividends + */ + @javax.annotation.Nullable + public Double getTotalOrdinaryDividends() { + return totalOrdinaryDividends; + } + + public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { + this.totalOrdinaryDividends = totalOrdinaryDividends; + } + + + public Form1099Div qualifiedDividends(Double qualifiedDividends) { + this.qualifiedDividends = qualifiedDividends; + return this; + } + + /** + * Get qualifiedDividends + * @return qualifiedDividends + */ + @javax.annotation.Nullable + public Double getQualifiedDividends() { + return qualifiedDividends; + } + + public void setQualifiedDividends(Double qualifiedDividends) { + this.qualifiedDividends = qualifiedDividends; + } + + + public Form1099Div totalCapitalGainDistributions(Double totalCapitalGainDistributions) { + this.totalCapitalGainDistributions = totalCapitalGainDistributions; + return this; + } + + /** + * Get totalCapitalGainDistributions + * @return totalCapitalGainDistributions + */ + @javax.annotation.Nullable + public Double getTotalCapitalGainDistributions() { + return totalCapitalGainDistributions; + } + + public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { + this.totalCapitalGainDistributions = totalCapitalGainDistributions; + } + + + public Form1099Div unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { + this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; + return this; + } + + /** + * Get unrecapturedSection1250Gain + * @return unrecapturedSection1250Gain + */ + @javax.annotation.Nullable + public Double getUnrecapturedSection1250Gain() { + return unrecapturedSection1250Gain; + } + + public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { + this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; + } + + + public Form1099Div section1202Gain(Double section1202Gain) { + this.section1202Gain = section1202Gain; + return this; + } + + /** + * Get section1202Gain + * @return section1202Gain + */ + @javax.annotation.Nullable + public Double getSection1202Gain() { + return section1202Gain; + } + + public void setSection1202Gain(Double section1202Gain) { + this.section1202Gain = section1202Gain; + } + + + public Form1099Div collectiblesGain(Double collectiblesGain) { + this.collectiblesGain = collectiblesGain; + return this; + } + + /** + * Get collectiblesGain + * @return collectiblesGain + */ + @javax.annotation.Nullable + public Double getCollectiblesGain() { + return collectiblesGain; + } + + public void setCollectiblesGain(Double collectiblesGain) { + this.collectiblesGain = collectiblesGain; + } + + + public Form1099Div section897OrdinaryDividends(Double section897OrdinaryDividends) { + this.section897OrdinaryDividends = section897OrdinaryDividends; + return this; + } + + /** + * Get section897OrdinaryDividends + * @return section897OrdinaryDividends + */ + @javax.annotation.Nullable + public Double getSection897OrdinaryDividends() { + return section897OrdinaryDividends; + } + + public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { + this.section897OrdinaryDividends = section897OrdinaryDividends; + } + + + public Form1099Div section897CapitalGain(Double section897CapitalGain) { + this.section897CapitalGain = section897CapitalGain; + return this; + } + + /** + * Get section897CapitalGain + * @return section897CapitalGain + */ + @javax.annotation.Nullable + public Double getSection897CapitalGain() { + return section897CapitalGain; + } + + public void setSection897CapitalGain(Double section897CapitalGain) { + this.section897CapitalGain = section897CapitalGain; + } + + + public Form1099Div nondividendDistributions(Double nondividendDistributions) { + this.nondividendDistributions = nondividendDistributions; + return this; + } + + /** + * Get nondividendDistributions + * @return nondividendDistributions + */ + @javax.annotation.Nullable + public Double getNondividendDistributions() { + return nondividendDistributions; + } + + public void setNondividendDistributions(Double nondividendDistributions) { + this.nondividendDistributions = nondividendDistributions; + } + + + public Form1099Div federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Get federalIncomeTaxWithheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099Div section199ADividends(Double section199ADividends) { + this.section199ADividends = section199ADividends; + return this; + } + + /** + * Get section199ADividends + * @return section199ADividends + */ + @javax.annotation.Nullable + public Double getSection199ADividends() { + return section199ADividends; + } + + public void setSection199ADividends(Double section199ADividends) { + this.section199ADividends = section199ADividends; + } + + + public Form1099Div investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Get investmentExpenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099Div foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Get foreignTaxPaid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099Div foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { + this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; + return this; + } + + /** + * Get foreignCountryOrUSPossession + * @return foreignCountryOrUSPossession + */ + @javax.annotation.Nullable + public String getForeignCountryOrUSPossession() { + return foreignCountryOrUSPossession; + } + + public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { + this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; + } + + + public Form1099Div cashLiquidationDistributions(Double cashLiquidationDistributions) { + this.cashLiquidationDistributions = cashLiquidationDistributions; + return this; + } + + /** + * Get cashLiquidationDistributions + * @return cashLiquidationDistributions + */ + @javax.annotation.Nullable + public Double getCashLiquidationDistributions() { + return cashLiquidationDistributions; + } + + public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { + this.cashLiquidationDistributions = cashLiquidationDistributions; + } + + + public Form1099Div noncashLiquidationDistributions(Double noncashLiquidationDistributions) { + this.noncashLiquidationDistributions = noncashLiquidationDistributions; + return this; + } + + /** + * Get noncashLiquidationDistributions + * @return noncashLiquidationDistributions + */ + @javax.annotation.Nullable + public Double getNoncashLiquidationDistributions() { + return noncashLiquidationDistributions; + } + + public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { + this.noncashLiquidationDistributions = noncashLiquidationDistributions; + } + + + public Form1099Div exemptInterestDividends(Double exemptInterestDividends) { + this.exemptInterestDividends = exemptInterestDividends; + return this; + } + + /** + * Get exemptInterestDividends + * @return exemptInterestDividends + */ + @javax.annotation.Nullable + public Double getExemptInterestDividends() { + return exemptInterestDividends; + } + + public void setExemptInterestDividends(Double exemptInterestDividends) { + this.exemptInterestDividends = exemptInterestDividends; + } + + + public Form1099Div specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { + this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; + return this; + } + + /** + * Get specifiedPrivateActivityBondInterestDividends + * @return specifiedPrivateActivityBondInterestDividends + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterestDividends() { + return specifiedPrivateActivityBondInterestDividends; + } + + public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { + this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; + } + + + public Form1099Div fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099Div id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1099Div type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Form1099Div issuerId(Integer issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public Integer getIssuerId() { + return issuerId; + } + + public void setIssuerId(Integer issuerId) { + this.issuerId = issuerId; + } + + + public Form1099Div issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099Div issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099Div taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1099Div addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { + if (this.stateEfileStatus == null) { + this.stateEfileStatus = new ArrayList<>(); + } + this.stateEfileStatus.add(stateEfileStatusItem); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1099Div postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099Div postalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1099Div tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099Div tinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1099Div addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099Div addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1099Div eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1099Div referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099Div email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099Div tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public Form1099Div tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Get tin + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public Form1099Div noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099Div secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099Div recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099Div recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099Div address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099Div address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099Div city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099Div state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099Div zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099Div nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099Div countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099Div accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099Div officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099Div validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1099Div addValidationErrorsItem(ValidationError validationErrorsItem) { + if (this.validationErrors == null) { + this.validationErrors = new ArrayList<>(); + } + this.validationErrors.add(validationErrorsItem); + return this; + } + + /** + * Get validationErrors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + public void setValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + } + + + public Form1099Div 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 Form1099Div 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; + } + + + public Form1099Div 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099Div form1099Div = (Form1099Div) o; + return Objects.equals(this.totalOrdinaryDividends, form1099Div.totalOrdinaryDividends) && + Objects.equals(this.qualifiedDividends, form1099Div.qualifiedDividends) && + Objects.equals(this.totalCapitalGainDistributions, form1099Div.totalCapitalGainDistributions) && + Objects.equals(this.unrecapturedSection1250Gain, form1099Div.unrecapturedSection1250Gain) && + Objects.equals(this.section1202Gain, form1099Div.section1202Gain) && + Objects.equals(this.collectiblesGain, form1099Div.collectiblesGain) && + Objects.equals(this.section897OrdinaryDividends, form1099Div.section897OrdinaryDividends) && + Objects.equals(this.section897CapitalGain, form1099Div.section897CapitalGain) && + Objects.equals(this.nondividendDistributions, form1099Div.nondividendDistributions) && + Objects.equals(this.federalIncomeTaxWithheld, form1099Div.federalIncomeTaxWithheld) && + Objects.equals(this.section199ADividends, form1099Div.section199ADividends) && + Objects.equals(this.investmentExpenses, form1099Div.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099Div.foreignTaxPaid) && + Objects.equals(this.foreignCountryOrUSPossession, form1099Div.foreignCountryOrUSPossession) && + Objects.equals(this.cashLiquidationDistributions, form1099Div.cashLiquidationDistributions) && + Objects.equals(this.noncashLiquidationDistributions, form1099Div.noncashLiquidationDistributions) && + Objects.equals(this.exemptInterestDividends, form1099Div.exemptInterestDividends) && + Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099Div.specifiedPrivateActivityBondInterestDividends) && + Objects.equals(this.fatcaFilingRequirement, form1099Div.fatcaFilingRequirement) && + Objects.equals(this.id, form1099Div.id) && + Objects.equals(this.type, form1099Div.type) && + Objects.equals(this.issuerId, form1099Div.issuerId) && + Objects.equals(this.issuerReferenceId, form1099Div.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099Div.issuerTin) && + Objects.equals(this.taxYear, form1099Div.taxYear) && + Objects.equals(this.federalEfile, form1099Div.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099Div.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099Div.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099Div.stateEfileStatus) && + Objects.equals(this.postalMail, form1099Div.postalMail) && + Objects.equals(this.postalMailStatus, form1099Div.postalMailStatus) && + Objects.equals(this.tinMatch, form1099Div.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099Div.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099Div.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099Div.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Div.eDeliveryStatus) && + Objects.equals(this.referenceId, form1099Div.referenceId) && + Objects.equals(this.email, form1099Div.email) && + Objects.equals(this.tinType, form1099Div.tinType) && + Objects.equals(this.tin, form1099Div.tin) && + Objects.equals(this.noTin, form1099Div.noTin) && + Objects.equals(this.secondTinNotice, form1099Div.secondTinNotice) && + Objects.equals(this.recipientName, form1099Div.recipientName) && + Objects.equals(this.recipientSecondName, form1099Div.recipientSecondName) && + Objects.equals(this.address, form1099Div.address) && + Objects.equals(this.address2, form1099Div.address2) && + Objects.equals(this.city, form1099Div.city) && + Objects.equals(this.state, form1099Div.state) && + Objects.equals(this.zip, form1099Div.zip) && + Objects.equals(this.nonUsProvince, form1099Div.nonUsProvince) && + Objects.equals(this.countryCode, form1099Div.countryCode) && + Objects.equals(this.accountNumber, form1099Div.accountNumber) && + Objects.equals(this.officeCode, form1099Div.officeCode) && + Objects.equals(this.validationErrors, form1099Div.validationErrors) && + Objects.equals(this.createdAt, form1099Div.createdAt) && + Objects.equals(this.updatedAt, form1099Div.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099Div.stateAndLocalWithholding); + } + + 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(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + } + + 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 Form1099Div {\n"); + sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); + sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); + sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); + sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); + sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); + sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); + sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); + sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); + sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); + sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); + sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); + sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("type"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("federalEfile"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfile"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMail"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatch"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerification"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099Div + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099Div.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099Div is not found in the empty JSON string", Form1099Div.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099Div.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Div` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + 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("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("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099Div.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099Div' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099Div value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099Div read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099Div given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099Div + * @throws IOException if the JSON string is invalid with respect to Form1099Div + */ + public static Form1099Div fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099Div.class); + } + + /** + * Convert an instance of Form1099Div 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/Form1099DivListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java index 142d6f3..be69899 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java @@ -61,55 +61,55 @@ public class Form1099DivListItem { public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private String totalOrdinaryDividends; + private Double totalOrdinaryDividends; public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private String qualifiedDividends; + private Double qualifiedDividends; public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private String totalCapitalGainDistributions; + private Double totalCapitalGainDistributions; public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private String unrecapturedSection1250Gain; + private Double unrecapturedSection1250Gain; public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private String section1202Gain; + private Double section1202Gain; public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private String collectiblesGain; + private Double collectiblesGain; public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private String section897OrdinaryDividends; + private Double section897OrdinaryDividends; public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private String section897CapitalGain; + private Double section897CapitalGain; public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private String nondividendDistributions; + private Double nondividendDistributions; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private String federalIncomeTaxWithheld; + private Double federalIncomeTaxWithheld; public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private String section199ADividends; + private Double section199ADividends; public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private String investmentExpenses; + private Double investmentExpenses; public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private String foreignTaxPaid; + private Double foreignTaxPaid; public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) @@ -117,19 +117,19 @@ public class Form1099DivListItem { public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private String cashLiquidationDistributions; + private Double cashLiquidationDistributions; public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private String noncashLiquidationDistributions; + private Double noncashLiquidationDistributions; public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private String exemptInterestDividends; + private Double exemptInterestDividends; public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private String specifiedPrivateActivityBondInterestDividends; + private Double specifiedPrivateActivityBondInterestDividends; public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) @@ -302,7 +302,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099DivListItem() { } - public Form1099DivListItem totalOrdinaryDividends(String totalOrdinaryDividends) { + public Form1099DivListItem totalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; return this; } @@ -312,16 +312,16 @@ public Form1099DivListItem totalOrdinaryDividends(String totalOrdinaryDividends) * @return totalOrdinaryDividends */ @javax.annotation.Nullable - public String getTotalOrdinaryDividends() { + public Double getTotalOrdinaryDividends() { return totalOrdinaryDividends; } - public void setTotalOrdinaryDividends(String totalOrdinaryDividends) { + public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; } - public Form1099DivListItem qualifiedDividends(String qualifiedDividends) { + public Form1099DivListItem qualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; return this; } @@ -331,16 +331,16 @@ public Form1099DivListItem qualifiedDividends(String qualifiedDividends) { * @return qualifiedDividends */ @javax.annotation.Nullable - public String getQualifiedDividends() { + public Double getQualifiedDividends() { return qualifiedDividends; } - public void setQualifiedDividends(String qualifiedDividends) { + public void setQualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; } - public Form1099DivListItem totalCapitalGainDistributions(String totalCapitalGainDistributions) { + public Form1099DivListItem totalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; return this; } @@ -350,16 +350,16 @@ public Form1099DivListItem totalCapitalGainDistributions(String totalCapitalGain * @return totalCapitalGainDistributions */ @javax.annotation.Nullable - public String getTotalCapitalGainDistributions() { + public Double getTotalCapitalGainDistributions() { return totalCapitalGainDistributions; } - public void setTotalCapitalGainDistributions(String totalCapitalGainDistributions) { + public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; } - public Form1099DivListItem unrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public Form1099DivListItem unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; return this; } @@ -369,16 +369,16 @@ public Form1099DivListItem unrecapturedSection1250Gain(String unrecapturedSectio * @return unrecapturedSection1250Gain */ @javax.annotation.Nullable - public String getUnrecapturedSection1250Gain() { + public Double getUnrecapturedSection1250Gain() { return unrecapturedSection1250Gain; } - public void setUnrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; } - public Form1099DivListItem section1202Gain(String section1202Gain) { + public Form1099DivListItem section1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; return this; } @@ -388,16 +388,16 @@ public Form1099DivListItem section1202Gain(String section1202Gain) { * @return section1202Gain */ @javax.annotation.Nullable - public String getSection1202Gain() { + public Double getSection1202Gain() { return section1202Gain; } - public void setSection1202Gain(String section1202Gain) { + public void setSection1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; } - public Form1099DivListItem collectiblesGain(String collectiblesGain) { + public Form1099DivListItem collectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; return this; } @@ -407,16 +407,16 @@ public Form1099DivListItem collectiblesGain(String collectiblesGain) { * @return collectiblesGain */ @javax.annotation.Nullable - public String getCollectiblesGain() { + public Double getCollectiblesGain() { return collectiblesGain; } - public void setCollectiblesGain(String collectiblesGain) { + public void setCollectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; } - public Form1099DivListItem section897OrdinaryDividends(String section897OrdinaryDividends) { + public Form1099DivListItem section897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; return this; } @@ -426,16 +426,16 @@ public Form1099DivListItem section897OrdinaryDividends(String section897Ordinary * @return section897OrdinaryDividends */ @javax.annotation.Nullable - public String getSection897OrdinaryDividends() { + public Double getSection897OrdinaryDividends() { return section897OrdinaryDividends; } - public void setSection897OrdinaryDividends(String section897OrdinaryDividends) { + public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; } - public Form1099DivListItem section897CapitalGain(String section897CapitalGain) { + public Form1099DivListItem section897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; return this; } @@ -445,16 +445,16 @@ public Form1099DivListItem section897CapitalGain(String section897CapitalGain) { * @return section897CapitalGain */ @javax.annotation.Nullable - public String getSection897CapitalGain() { + public Double getSection897CapitalGain() { return section897CapitalGain; } - public void setSection897CapitalGain(String section897CapitalGain) { + public void setSection897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; } - public Form1099DivListItem nondividendDistributions(String nondividendDistributions) { + public Form1099DivListItem nondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; return this; } @@ -464,16 +464,16 @@ public Form1099DivListItem nondividendDistributions(String nondividendDistributi * @return nondividendDistributions */ @javax.annotation.Nullable - public String getNondividendDistributions() { + public Double getNondividendDistributions() { return nondividendDistributions; } - public void setNondividendDistributions(String nondividendDistributions) { + public void setNondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; } - public Form1099DivListItem federalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public Form1099DivListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } @@ -483,16 +483,16 @@ public Form1099DivListItem federalIncomeTaxWithheld(String federalIncomeTaxWithh * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public String getFederalIncomeTaxWithheld() { + public Double getFederalIncomeTaxWithheld() { return federalIncomeTaxWithheld; } - public void setFederalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } - public Form1099DivListItem section199ADividends(String section199ADividends) { + public Form1099DivListItem section199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; return this; } @@ -502,16 +502,16 @@ public Form1099DivListItem section199ADividends(String section199ADividends) { * @return section199ADividends */ @javax.annotation.Nullable - public String getSection199ADividends() { + public Double getSection199ADividends() { return section199ADividends; } - public void setSection199ADividends(String section199ADividends) { + public void setSection199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; } - public Form1099DivListItem investmentExpenses(String investmentExpenses) { + public Form1099DivListItem investmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; return this; } @@ -521,16 +521,16 @@ public Form1099DivListItem investmentExpenses(String investmentExpenses) { * @return investmentExpenses */ @javax.annotation.Nullable - public String getInvestmentExpenses() { + public Double getInvestmentExpenses() { return investmentExpenses; } - public void setInvestmentExpenses(String investmentExpenses) { + public void setInvestmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; } - public Form1099DivListItem foreignTaxPaid(String foreignTaxPaid) { + public Form1099DivListItem foreignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; return this; } @@ -540,11 +540,11 @@ public Form1099DivListItem foreignTaxPaid(String foreignTaxPaid) { * @return foreignTaxPaid */ @javax.annotation.Nullable - public String getForeignTaxPaid() { + public Double getForeignTaxPaid() { return foreignTaxPaid; } - public void setForeignTaxPaid(String foreignTaxPaid) { + public void setForeignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; } @@ -568,7 +568,7 @@ public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) } - public Form1099DivListItem cashLiquidationDistributions(String cashLiquidationDistributions) { + public Form1099DivListItem cashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; return this; } @@ -578,16 +578,16 @@ public Form1099DivListItem cashLiquidationDistributions(String cashLiquidationDi * @return cashLiquidationDistributions */ @javax.annotation.Nullable - public String getCashLiquidationDistributions() { + public Double getCashLiquidationDistributions() { return cashLiquidationDistributions; } - public void setCashLiquidationDistributions(String cashLiquidationDistributions) { + public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; } - public Form1099DivListItem noncashLiquidationDistributions(String noncashLiquidationDistributions) { + public Form1099DivListItem noncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; return this; } @@ -597,16 +597,16 @@ public Form1099DivListItem noncashLiquidationDistributions(String noncashLiquida * @return noncashLiquidationDistributions */ @javax.annotation.Nullable - public String getNoncashLiquidationDistributions() { + public Double getNoncashLiquidationDistributions() { return noncashLiquidationDistributions; } - public void setNoncashLiquidationDistributions(String noncashLiquidationDistributions) { + public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; } - public Form1099DivListItem exemptInterestDividends(String exemptInterestDividends) { + public Form1099DivListItem exemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; return this; } @@ -616,16 +616,16 @@ public Form1099DivListItem exemptInterestDividends(String exemptInterestDividend * @return exemptInterestDividends */ @javax.annotation.Nullable - public String getExemptInterestDividends() { + public Double getExemptInterestDividends() { return exemptInterestDividends; } - public void setExemptInterestDividends(String exemptInterestDividends) { + public void setExemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; } - public Form1099DivListItem specifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public Form1099DivListItem specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; return this; } @@ -635,11 +635,11 @@ public Form1099DivListItem specifiedPrivateActivityBondInterestDividends(String * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable - public String getSpecifiedPrivateActivityBondInterestDividends() { + public Double getSpecifiedPrivateActivityBondInterestDividends() { return specifiedPrivateActivityBondInterestDividends; } - public void setSpecifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; } @@ -843,7 +843,7 @@ public Form1099DivListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -881,7 +881,7 @@ public Form1099DivListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1014,7 +1014,7 @@ public Form1099DivListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1347,15 +1347,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1386,60 +1384,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("totalOrdinaryDividends") != null && !jsonObj.get("totalOrdinaryDividends").isJsonNull()) && !jsonObj.get("totalOrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalOrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalOrdinaryDividends").toString())); - } - if ((jsonObj.get("qualifiedDividends") != null && !jsonObj.get("qualifiedDividends").isJsonNull()) && !jsonObj.get("qualifiedDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `qualifiedDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qualifiedDividends").toString())); - } - if ((jsonObj.get("totalCapitalGainDistributions") != null && !jsonObj.get("totalCapitalGainDistributions").isJsonNull()) && !jsonObj.get("totalCapitalGainDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalCapitalGainDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalCapitalGainDistributions").toString())); - } - if ((jsonObj.get("unrecapturedSection1250Gain") != null && !jsonObj.get("unrecapturedSection1250Gain").isJsonNull()) && !jsonObj.get("unrecapturedSection1250Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unrecapturedSection1250Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unrecapturedSection1250Gain").toString())); - } - if ((jsonObj.get("section1202Gain") != null && !jsonObj.get("section1202Gain").isJsonNull()) && !jsonObj.get("section1202Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section1202Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section1202Gain").toString())); - } - if ((jsonObj.get("collectiblesGain") != null && !jsonObj.get("collectiblesGain").isJsonNull()) && !jsonObj.get("collectiblesGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `collectiblesGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("collectiblesGain").toString())); - } - if ((jsonObj.get("section897OrdinaryDividends") != null && !jsonObj.get("section897OrdinaryDividends").isJsonNull()) && !jsonObj.get("section897OrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897OrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897OrdinaryDividends").toString())); - } - if ((jsonObj.get("section897CapitalGain") != null && !jsonObj.get("section897CapitalGain").isJsonNull()) && !jsonObj.get("section897CapitalGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897CapitalGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897CapitalGain").toString())); - } - if ((jsonObj.get("nondividendDistributions") != null && !jsonObj.get("nondividendDistributions").isJsonNull()) && !jsonObj.get("nondividendDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nondividendDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nondividendDistributions").toString())); - } - if ((jsonObj.get("federalIncomeTaxWithheld") != null && !jsonObj.get("federalIncomeTaxWithheld").isJsonNull()) && !jsonObj.get("federalIncomeTaxWithheld").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `federalIncomeTaxWithheld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("federalIncomeTaxWithheld").toString())); - } - if ((jsonObj.get("section199ADividends") != null && !jsonObj.get("section199ADividends").isJsonNull()) && !jsonObj.get("section199ADividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section199ADividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section199ADividends").toString())); - } - if ((jsonObj.get("investmentExpenses") != null && !jsonObj.get("investmentExpenses").isJsonNull()) && !jsonObj.get("investmentExpenses").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `investmentExpenses` to be a primitive type in the JSON string but got `%s`", jsonObj.get("investmentExpenses").toString())); - } - if ((jsonObj.get("foreignTaxPaid") != null && !jsonObj.get("foreignTaxPaid").isJsonNull()) && !jsonObj.get("foreignTaxPaid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTaxPaid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTaxPaid").toString())); - } if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); } - if ((jsonObj.get("cashLiquidationDistributions") != null && !jsonObj.get("cashLiquidationDistributions").isJsonNull()) && !jsonObj.get("cashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cashLiquidationDistributions").toString())); - } - if ((jsonObj.get("noncashLiquidationDistributions") != null && !jsonObj.get("noncashLiquidationDistributions").isJsonNull()) && !jsonObj.get("noncashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `noncashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("noncashLiquidationDistributions").toString())); - } - if ((jsonObj.get("exemptInterestDividends") != null && !jsonObj.get("exemptInterestDividends").isJsonNull()) && !jsonObj.get("exemptInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptInterestDividends").toString())); - } - if ((jsonObj.get("specifiedPrivateActivityBondInterestDividends") != null && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonNull()) && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `specifiedPrivateActivityBondInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specifiedPrivateActivityBondInterestDividends").toString())); - } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); } @@ -1468,13 +1415,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1495,7 +1442,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java index 21cd0db..cc58876 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java @@ -67,55 +67,55 @@ public class Form1099DivListItemResponse { public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private String totalOrdinaryDividends; + private Double totalOrdinaryDividends; public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private String qualifiedDividends; + private Double qualifiedDividends; public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private String totalCapitalGainDistributions; + private Double totalCapitalGainDistributions; public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private String unrecapturedSection1250Gain; + private Double unrecapturedSection1250Gain; public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private String section1202Gain; + private Double section1202Gain; public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private String collectiblesGain; + private Double collectiblesGain; public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private String section897OrdinaryDividends; + private Double section897OrdinaryDividends; public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private String section897CapitalGain; + private Double section897CapitalGain; public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private String nondividendDistributions; + private Double nondividendDistributions; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private String federalIncomeTaxWithheld; + private Double federalIncomeTaxWithheld; public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private String section199ADividends; + private Double section199ADividends; public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private String investmentExpenses; + private Double investmentExpenses; public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private String foreignTaxPaid; + private Double foreignTaxPaid; public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) @@ -123,19 +123,19 @@ public class Form1099DivListItemResponse { public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private String cashLiquidationDistributions; + private Double cashLiquidationDistributions; public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private String noncashLiquidationDistributions; + private Double noncashLiquidationDistributions; public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private String exemptInterestDividends; + private Double exemptInterestDividends; public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private String specifiedPrivateActivityBondInterestDividends; + private Double specifiedPrivateActivityBondInterestDividends; public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) @@ -321,7 +321,7 @@ public Form1099DivListItemResponse( this.updatedAt = updatedAt; } - public Form1099DivListItemResponse totalOrdinaryDividends(String totalOrdinaryDividends) { + public Form1099DivListItemResponse totalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; return this; } @@ -331,16 +331,16 @@ public Form1099DivListItemResponse totalOrdinaryDividends(String totalOrdinaryDi * @return totalOrdinaryDividends */ @javax.annotation.Nullable - public String getTotalOrdinaryDividends() { + public Double getTotalOrdinaryDividends() { return totalOrdinaryDividends; } - public void setTotalOrdinaryDividends(String totalOrdinaryDividends) { + public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; } - public Form1099DivListItemResponse qualifiedDividends(String qualifiedDividends) { + public Form1099DivListItemResponse qualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; return this; } @@ -350,16 +350,16 @@ public Form1099DivListItemResponse qualifiedDividends(String qualifiedDividends) * @return qualifiedDividends */ @javax.annotation.Nullable - public String getQualifiedDividends() { + public Double getQualifiedDividends() { return qualifiedDividends; } - public void setQualifiedDividends(String qualifiedDividends) { + public void setQualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; } - public Form1099DivListItemResponse totalCapitalGainDistributions(String totalCapitalGainDistributions) { + public Form1099DivListItemResponse totalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; return this; } @@ -369,16 +369,16 @@ public Form1099DivListItemResponse totalCapitalGainDistributions(String totalCap * @return totalCapitalGainDistributions */ @javax.annotation.Nullable - public String getTotalCapitalGainDistributions() { + public Double getTotalCapitalGainDistributions() { return totalCapitalGainDistributions; } - public void setTotalCapitalGainDistributions(String totalCapitalGainDistributions) { + public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; } - public Form1099DivListItemResponse unrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public Form1099DivListItemResponse unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; return this; } @@ -388,16 +388,16 @@ public Form1099DivListItemResponse unrecapturedSection1250Gain(String unrecaptur * @return unrecapturedSection1250Gain */ @javax.annotation.Nullable - public String getUnrecapturedSection1250Gain() { + public Double getUnrecapturedSection1250Gain() { return unrecapturedSection1250Gain; } - public void setUnrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; } - public Form1099DivListItemResponse section1202Gain(String section1202Gain) { + public Form1099DivListItemResponse section1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; return this; } @@ -407,16 +407,16 @@ public Form1099DivListItemResponse section1202Gain(String section1202Gain) { * @return section1202Gain */ @javax.annotation.Nullable - public String getSection1202Gain() { + public Double getSection1202Gain() { return section1202Gain; } - public void setSection1202Gain(String section1202Gain) { + public void setSection1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; } - public Form1099DivListItemResponse collectiblesGain(String collectiblesGain) { + public Form1099DivListItemResponse collectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; return this; } @@ -426,16 +426,16 @@ public Form1099DivListItemResponse collectiblesGain(String collectiblesGain) { * @return collectiblesGain */ @javax.annotation.Nullable - public String getCollectiblesGain() { + public Double getCollectiblesGain() { return collectiblesGain; } - public void setCollectiblesGain(String collectiblesGain) { + public void setCollectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; } - public Form1099DivListItemResponse section897OrdinaryDividends(String section897OrdinaryDividends) { + public Form1099DivListItemResponse section897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; return this; } @@ -445,16 +445,16 @@ public Form1099DivListItemResponse section897OrdinaryDividends(String section897 * @return section897OrdinaryDividends */ @javax.annotation.Nullable - public String getSection897OrdinaryDividends() { + public Double getSection897OrdinaryDividends() { return section897OrdinaryDividends; } - public void setSection897OrdinaryDividends(String section897OrdinaryDividends) { + public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; } - public Form1099DivListItemResponse section897CapitalGain(String section897CapitalGain) { + public Form1099DivListItemResponse section897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; return this; } @@ -464,16 +464,16 @@ public Form1099DivListItemResponse section897CapitalGain(String section897Capita * @return section897CapitalGain */ @javax.annotation.Nullable - public String getSection897CapitalGain() { + public Double getSection897CapitalGain() { return section897CapitalGain; } - public void setSection897CapitalGain(String section897CapitalGain) { + public void setSection897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; } - public Form1099DivListItemResponse nondividendDistributions(String nondividendDistributions) { + public Form1099DivListItemResponse nondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; return this; } @@ -483,16 +483,16 @@ public Form1099DivListItemResponse nondividendDistributions(String nondividendDi * @return nondividendDistributions */ @javax.annotation.Nullable - public String getNondividendDistributions() { + public Double getNondividendDistributions() { return nondividendDistributions; } - public void setNondividendDistributions(String nondividendDistributions) { + public void setNondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; } - public Form1099DivListItemResponse federalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public Form1099DivListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } @@ -502,16 +502,16 @@ public Form1099DivListItemResponse federalIncomeTaxWithheld(String federalIncome * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public String getFederalIncomeTaxWithheld() { + public Double getFederalIncomeTaxWithheld() { return federalIncomeTaxWithheld; } - public void setFederalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } - public Form1099DivListItemResponse section199ADividends(String section199ADividends) { + public Form1099DivListItemResponse section199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; return this; } @@ -521,16 +521,16 @@ public Form1099DivListItemResponse section199ADividends(String section199ADivide * @return section199ADividends */ @javax.annotation.Nullable - public String getSection199ADividends() { + public Double getSection199ADividends() { return section199ADividends; } - public void setSection199ADividends(String section199ADividends) { + public void setSection199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; } - public Form1099DivListItemResponse investmentExpenses(String investmentExpenses) { + public Form1099DivListItemResponse investmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; return this; } @@ -540,16 +540,16 @@ public Form1099DivListItemResponse investmentExpenses(String investmentExpenses) * @return investmentExpenses */ @javax.annotation.Nullable - public String getInvestmentExpenses() { + public Double getInvestmentExpenses() { return investmentExpenses; } - public void setInvestmentExpenses(String investmentExpenses) { + public void setInvestmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; } - public Form1099DivListItemResponse foreignTaxPaid(String foreignTaxPaid) { + public Form1099DivListItemResponse foreignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; return this; } @@ -559,11 +559,11 @@ public Form1099DivListItemResponse foreignTaxPaid(String foreignTaxPaid) { * @return foreignTaxPaid */ @javax.annotation.Nullable - public String getForeignTaxPaid() { + public Double getForeignTaxPaid() { return foreignTaxPaid; } - public void setForeignTaxPaid(String foreignTaxPaid) { + public void setForeignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; } @@ -587,7 +587,7 @@ public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) } - public Form1099DivListItemResponse cashLiquidationDistributions(String cashLiquidationDistributions) { + public Form1099DivListItemResponse cashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; return this; } @@ -597,16 +597,16 @@ public Form1099DivListItemResponse cashLiquidationDistributions(String cashLiqui * @return cashLiquidationDistributions */ @javax.annotation.Nullable - public String getCashLiquidationDistributions() { + public Double getCashLiquidationDistributions() { return cashLiquidationDistributions; } - public void setCashLiquidationDistributions(String cashLiquidationDistributions) { + public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; } - public Form1099DivListItemResponse noncashLiquidationDistributions(String noncashLiquidationDistributions) { + public Form1099DivListItemResponse noncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; return this; } @@ -616,16 +616,16 @@ public Form1099DivListItemResponse noncashLiquidationDistributions(String noncas * @return noncashLiquidationDistributions */ @javax.annotation.Nullable - public String getNoncashLiquidationDistributions() { + public Double getNoncashLiquidationDistributions() { return noncashLiquidationDistributions; } - public void setNoncashLiquidationDistributions(String noncashLiquidationDistributions) { + public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; } - public Form1099DivListItemResponse exemptInterestDividends(String exemptInterestDividends) { + public Form1099DivListItemResponse exemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; return this; } @@ -635,16 +635,16 @@ public Form1099DivListItemResponse exemptInterestDividends(String exemptInterest * @return exemptInterestDividends */ @javax.annotation.Nullable - public String getExemptInterestDividends() { + public Double getExemptInterestDividends() { return exemptInterestDividends; } - public void setExemptInterestDividends(String exemptInterestDividends) { + public void setExemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; } - public Form1099DivListItemResponse specifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public Form1099DivListItemResponse specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; return this; } @@ -654,11 +654,11 @@ public Form1099DivListItemResponse specifiedPrivateActivityBondInterestDividends * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable - public String getSpecifiedPrivateActivityBondInterestDividends() { + public Double getSpecifiedPrivateActivityBondInterestDividends() { return specifiedPrivateActivityBondInterestDividends; } - public void setSpecifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; } @@ -1572,60 +1572,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("totalOrdinaryDividends") != null && !jsonObj.get("totalOrdinaryDividends").isJsonNull()) && !jsonObj.get("totalOrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalOrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalOrdinaryDividends").toString())); - } - if ((jsonObj.get("qualifiedDividends") != null && !jsonObj.get("qualifiedDividends").isJsonNull()) && !jsonObj.get("qualifiedDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `qualifiedDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qualifiedDividends").toString())); - } - if ((jsonObj.get("totalCapitalGainDistributions") != null && !jsonObj.get("totalCapitalGainDistributions").isJsonNull()) && !jsonObj.get("totalCapitalGainDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalCapitalGainDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalCapitalGainDistributions").toString())); - } - if ((jsonObj.get("unrecapturedSection1250Gain") != null && !jsonObj.get("unrecapturedSection1250Gain").isJsonNull()) && !jsonObj.get("unrecapturedSection1250Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unrecapturedSection1250Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unrecapturedSection1250Gain").toString())); - } - if ((jsonObj.get("section1202Gain") != null && !jsonObj.get("section1202Gain").isJsonNull()) && !jsonObj.get("section1202Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section1202Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section1202Gain").toString())); - } - if ((jsonObj.get("collectiblesGain") != null && !jsonObj.get("collectiblesGain").isJsonNull()) && !jsonObj.get("collectiblesGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `collectiblesGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("collectiblesGain").toString())); - } - if ((jsonObj.get("section897OrdinaryDividends") != null && !jsonObj.get("section897OrdinaryDividends").isJsonNull()) && !jsonObj.get("section897OrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897OrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897OrdinaryDividends").toString())); - } - if ((jsonObj.get("section897CapitalGain") != null && !jsonObj.get("section897CapitalGain").isJsonNull()) && !jsonObj.get("section897CapitalGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897CapitalGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897CapitalGain").toString())); - } - if ((jsonObj.get("nondividendDistributions") != null && !jsonObj.get("nondividendDistributions").isJsonNull()) && !jsonObj.get("nondividendDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nondividendDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nondividendDistributions").toString())); - } - if ((jsonObj.get("federalIncomeTaxWithheld") != null && !jsonObj.get("federalIncomeTaxWithheld").isJsonNull()) && !jsonObj.get("federalIncomeTaxWithheld").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `federalIncomeTaxWithheld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("federalIncomeTaxWithheld").toString())); - } - if ((jsonObj.get("section199ADividends") != null && !jsonObj.get("section199ADividends").isJsonNull()) && !jsonObj.get("section199ADividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section199ADividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section199ADividends").toString())); - } - if ((jsonObj.get("investmentExpenses") != null && !jsonObj.get("investmentExpenses").isJsonNull()) && !jsonObj.get("investmentExpenses").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `investmentExpenses` to be a primitive type in the JSON string but got `%s`", jsonObj.get("investmentExpenses").toString())); - } - if ((jsonObj.get("foreignTaxPaid") != null && !jsonObj.get("foreignTaxPaid").isJsonNull()) && !jsonObj.get("foreignTaxPaid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTaxPaid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTaxPaid").toString())); - } if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); } - if ((jsonObj.get("cashLiquidationDistributions") != null && !jsonObj.get("cashLiquidationDistributions").isJsonNull()) && !jsonObj.get("cashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cashLiquidationDistributions").toString())); - } - if ((jsonObj.get("noncashLiquidationDistributions") != null && !jsonObj.get("noncashLiquidationDistributions").isJsonNull()) && !jsonObj.get("noncashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `noncashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("noncashLiquidationDistributions").toString())); - } - if ((jsonObj.get("exemptInterestDividends") != null && !jsonObj.get("exemptInterestDividends").isJsonNull()) && !jsonObj.get("exemptInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptInterestDividends").toString())); - } - if ((jsonObj.get("specifiedPrivateActivityBondInterestDividends") != null && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonNull()) && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `specifiedPrivateActivityBondInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specifiedPrivateActivityBondInterestDividends").toString())); - } if (!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())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java index 525dab7..97f1bed 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java @@ -61,55 +61,55 @@ public class Form1099DivRequest { public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private String totalOrdinaryDividends; + private Double totalOrdinaryDividends; public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private String qualifiedDividends; + private Double qualifiedDividends; public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private String totalCapitalGainDistributions; + private Double totalCapitalGainDistributions; public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private String unrecapturedSection1250Gain; + private Double unrecapturedSection1250Gain; public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private String section1202Gain; + private Double section1202Gain; public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private String collectiblesGain; + private Double collectiblesGain; public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private String section897OrdinaryDividends; + private Double section897OrdinaryDividends; public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private String section897CapitalGain; + private Double section897CapitalGain; public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private String nondividendDistributions; + private Double nondividendDistributions; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private String federalIncomeTaxWithheld; + private Double federalIncomeTaxWithheld; public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private String section199ADividends; + private Double section199ADividends; public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private String investmentExpenses; + private Double investmentExpenses; public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private String foreignTaxPaid; + private Double foreignTaxPaid; public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) @@ -117,19 +117,19 @@ public class Form1099DivRequest { public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private String cashLiquidationDistributions; + private Double cashLiquidationDistributions; public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private String noncashLiquidationDistributions; + private Double noncashLiquidationDistributions; public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private String exemptInterestDividends; + private Double exemptInterestDividends; public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private String specifiedPrivateActivityBondInterestDividends; + private Double specifiedPrivateActivityBondInterestDividends; public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) @@ -154,7 +154,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -358,7 +360,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099DivRequest() { } - public Form1099DivRequest totalOrdinaryDividends(String totalOrdinaryDividends) { + public Form1099DivRequest totalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; return this; } @@ -368,16 +370,16 @@ public Form1099DivRequest totalOrdinaryDividends(String totalOrdinaryDividends) * @return totalOrdinaryDividends */ @javax.annotation.Nullable - public String getTotalOrdinaryDividends() { + public Double getTotalOrdinaryDividends() { return totalOrdinaryDividends; } - public void setTotalOrdinaryDividends(String totalOrdinaryDividends) { + public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; } - public Form1099DivRequest qualifiedDividends(String qualifiedDividends) { + public Form1099DivRequest qualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; return this; } @@ -387,16 +389,16 @@ public Form1099DivRequest qualifiedDividends(String qualifiedDividends) { * @return qualifiedDividends */ @javax.annotation.Nullable - public String getQualifiedDividends() { + public Double getQualifiedDividends() { return qualifiedDividends; } - public void setQualifiedDividends(String qualifiedDividends) { + public void setQualifiedDividends(Double qualifiedDividends) { this.qualifiedDividends = qualifiedDividends; } - public Form1099DivRequest totalCapitalGainDistributions(String totalCapitalGainDistributions) { + public Form1099DivRequest totalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; return this; } @@ -406,16 +408,16 @@ public Form1099DivRequest totalCapitalGainDistributions(String totalCapitalGainD * @return totalCapitalGainDistributions */ @javax.annotation.Nullable - public String getTotalCapitalGainDistributions() { + public Double getTotalCapitalGainDistributions() { return totalCapitalGainDistributions; } - public void setTotalCapitalGainDistributions(String totalCapitalGainDistributions) { + public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { this.totalCapitalGainDistributions = totalCapitalGainDistributions; } - public Form1099DivRequest unrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public Form1099DivRequest unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; return this; } @@ -425,16 +427,16 @@ public Form1099DivRequest unrecapturedSection1250Gain(String unrecapturedSection * @return unrecapturedSection1250Gain */ @javax.annotation.Nullable - public String getUnrecapturedSection1250Gain() { + public Double getUnrecapturedSection1250Gain() { return unrecapturedSection1250Gain; } - public void setUnrecapturedSection1250Gain(String unrecapturedSection1250Gain) { + public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; } - public Form1099DivRequest section1202Gain(String section1202Gain) { + public Form1099DivRequest section1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; return this; } @@ -444,16 +446,16 @@ public Form1099DivRequest section1202Gain(String section1202Gain) { * @return section1202Gain */ @javax.annotation.Nullable - public String getSection1202Gain() { + public Double getSection1202Gain() { return section1202Gain; } - public void setSection1202Gain(String section1202Gain) { + public void setSection1202Gain(Double section1202Gain) { this.section1202Gain = section1202Gain; } - public Form1099DivRequest collectiblesGain(String collectiblesGain) { + public Form1099DivRequest collectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; return this; } @@ -463,16 +465,16 @@ public Form1099DivRequest collectiblesGain(String collectiblesGain) { * @return collectiblesGain */ @javax.annotation.Nullable - public String getCollectiblesGain() { + public Double getCollectiblesGain() { return collectiblesGain; } - public void setCollectiblesGain(String collectiblesGain) { + public void setCollectiblesGain(Double collectiblesGain) { this.collectiblesGain = collectiblesGain; } - public Form1099DivRequest section897OrdinaryDividends(String section897OrdinaryDividends) { + public Form1099DivRequest section897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; return this; } @@ -482,16 +484,16 @@ public Form1099DivRequest section897OrdinaryDividends(String section897OrdinaryD * @return section897OrdinaryDividends */ @javax.annotation.Nullable - public String getSection897OrdinaryDividends() { + public Double getSection897OrdinaryDividends() { return section897OrdinaryDividends; } - public void setSection897OrdinaryDividends(String section897OrdinaryDividends) { + public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { this.section897OrdinaryDividends = section897OrdinaryDividends; } - public Form1099DivRequest section897CapitalGain(String section897CapitalGain) { + public Form1099DivRequest section897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; return this; } @@ -501,16 +503,16 @@ public Form1099DivRequest section897CapitalGain(String section897CapitalGain) { * @return section897CapitalGain */ @javax.annotation.Nullable - public String getSection897CapitalGain() { + public Double getSection897CapitalGain() { return section897CapitalGain; } - public void setSection897CapitalGain(String section897CapitalGain) { + public void setSection897CapitalGain(Double section897CapitalGain) { this.section897CapitalGain = section897CapitalGain; } - public Form1099DivRequest nondividendDistributions(String nondividendDistributions) { + public Form1099DivRequest nondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; return this; } @@ -520,16 +522,16 @@ public Form1099DivRequest nondividendDistributions(String nondividendDistributio * @return nondividendDistributions */ @javax.annotation.Nullable - public String getNondividendDistributions() { + public Double getNondividendDistributions() { return nondividendDistributions; } - public void setNondividendDistributions(String nondividendDistributions) { + public void setNondividendDistributions(Double nondividendDistributions) { this.nondividendDistributions = nondividendDistributions; } - public Form1099DivRequest federalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public Form1099DivRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } @@ -539,16 +541,16 @@ public Form1099DivRequest federalIncomeTaxWithheld(String federalIncomeTaxWithhe * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public String getFederalIncomeTaxWithheld() { + public Double getFederalIncomeTaxWithheld() { return federalIncomeTaxWithheld; } - public void setFederalIncomeTaxWithheld(String federalIncomeTaxWithheld) { + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } - public Form1099DivRequest section199ADividends(String section199ADividends) { + public Form1099DivRequest section199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; return this; } @@ -558,16 +560,16 @@ public Form1099DivRequest section199ADividends(String section199ADividends) { * @return section199ADividends */ @javax.annotation.Nullable - public String getSection199ADividends() { + public Double getSection199ADividends() { return section199ADividends; } - public void setSection199ADividends(String section199ADividends) { + public void setSection199ADividends(Double section199ADividends) { this.section199ADividends = section199ADividends; } - public Form1099DivRequest investmentExpenses(String investmentExpenses) { + public Form1099DivRequest investmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; return this; } @@ -577,16 +579,16 @@ public Form1099DivRequest investmentExpenses(String investmentExpenses) { * @return investmentExpenses */ @javax.annotation.Nullable - public String getInvestmentExpenses() { + public Double getInvestmentExpenses() { return investmentExpenses; } - public void setInvestmentExpenses(String investmentExpenses) { + public void setInvestmentExpenses(Double investmentExpenses) { this.investmentExpenses = investmentExpenses; } - public Form1099DivRequest foreignTaxPaid(String foreignTaxPaid) { + public Form1099DivRequest foreignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; return this; } @@ -596,11 +598,11 @@ public Form1099DivRequest foreignTaxPaid(String foreignTaxPaid) { * @return foreignTaxPaid */ @javax.annotation.Nullable - public String getForeignTaxPaid() { + public Double getForeignTaxPaid() { return foreignTaxPaid; } - public void setForeignTaxPaid(String foreignTaxPaid) { + public void setForeignTaxPaid(Double foreignTaxPaid) { this.foreignTaxPaid = foreignTaxPaid; } @@ -624,7 +626,7 @@ public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) } - public Form1099DivRequest cashLiquidationDistributions(String cashLiquidationDistributions) { + public Form1099DivRequest cashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; return this; } @@ -634,16 +636,16 @@ public Form1099DivRequest cashLiquidationDistributions(String cashLiquidationDis * @return cashLiquidationDistributions */ @javax.annotation.Nullable - public String getCashLiquidationDistributions() { + public Double getCashLiquidationDistributions() { return cashLiquidationDistributions; } - public void setCashLiquidationDistributions(String cashLiquidationDistributions) { + public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { this.cashLiquidationDistributions = cashLiquidationDistributions; } - public Form1099DivRequest noncashLiquidationDistributions(String noncashLiquidationDistributions) { + public Form1099DivRequest noncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; return this; } @@ -653,16 +655,16 @@ public Form1099DivRequest noncashLiquidationDistributions(String noncashLiquidat * @return noncashLiquidationDistributions */ @javax.annotation.Nullable - public String getNoncashLiquidationDistributions() { + public Double getNoncashLiquidationDistributions() { return noncashLiquidationDistributions; } - public void setNoncashLiquidationDistributions(String noncashLiquidationDistributions) { + public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { this.noncashLiquidationDistributions = noncashLiquidationDistributions; } - public Form1099DivRequest exemptInterestDividends(String exemptInterestDividends) { + public Form1099DivRequest exemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; return this; } @@ -672,16 +674,16 @@ public Form1099DivRequest exemptInterestDividends(String exemptInterestDividends * @return exemptInterestDividends */ @javax.annotation.Nullable - public String getExemptInterestDividends() { + public Double getExemptInterestDividends() { return exemptInterestDividends; } - public void setExemptInterestDividends(String exemptInterestDividends) { + public void setExemptInterestDividends(Double exemptInterestDividends) { this.exemptInterestDividends = exemptInterestDividends; } - public Form1099DivRequest specifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public Form1099DivRequest specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; return this; } @@ -691,11 +693,11 @@ public Form1099DivRequest specifiedPrivateActivityBondInterestDividends(String s * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable - public String getSpecifiedPrivateActivityBondInterestDividends() { + public Double getSpecifiedPrivateActivityBondInterestDividends() { return specifiedPrivateActivityBondInterestDividends; } - public void setSpecifiedPrivateActivityBondInterestDividends(String specifiedPrivateActivityBondInterestDividends) { + public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; } @@ -861,7 +863,7 @@ public Form1099DivRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -899,7 +901,7 @@ public Form1099DivRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1032,7 +1034,7 @@ public Form1099DivRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1359,14 +1361,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1389,68 +1389,10 @@ 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 `Form1099DivRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099DivRequest.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("totalOrdinaryDividends") != null && !jsonObj.get("totalOrdinaryDividends").isJsonNull()) && !jsonObj.get("totalOrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalOrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalOrdinaryDividends").toString())); - } - if ((jsonObj.get("qualifiedDividends") != null && !jsonObj.get("qualifiedDividends").isJsonNull()) && !jsonObj.get("qualifiedDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `qualifiedDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qualifiedDividends").toString())); - } - if ((jsonObj.get("totalCapitalGainDistributions") != null && !jsonObj.get("totalCapitalGainDistributions").isJsonNull()) && !jsonObj.get("totalCapitalGainDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalCapitalGainDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalCapitalGainDistributions").toString())); - } - if ((jsonObj.get("unrecapturedSection1250Gain") != null && !jsonObj.get("unrecapturedSection1250Gain").isJsonNull()) && !jsonObj.get("unrecapturedSection1250Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unrecapturedSection1250Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unrecapturedSection1250Gain").toString())); - } - if ((jsonObj.get("section1202Gain") != null && !jsonObj.get("section1202Gain").isJsonNull()) && !jsonObj.get("section1202Gain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section1202Gain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section1202Gain").toString())); - } - if ((jsonObj.get("collectiblesGain") != null && !jsonObj.get("collectiblesGain").isJsonNull()) && !jsonObj.get("collectiblesGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `collectiblesGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("collectiblesGain").toString())); - } - if ((jsonObj.get("section897OrdinaryDividends") != null && !jsonObj.get("section897OrdinaryDividends").isJsonNull()) && !jsonObj.get("section897OrdinaryDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897OrdinaryDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897OrdinaryDividends").toString())); - } - if ((jsonObj.get("section897CapitalGain") != null && !jsonObj.get("section897CapitalGain").isJsonNull()) && !jsonObj.get("section897CapitalGain").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section897CapitalGain` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section897CapitalGain").toString())); - } - if ((jsonObj.get("nondividendDistributions") != null && !jsonObj.get("nondividendDistributions").isJsonNull()) && !jsonObj.get("nondividendDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nondividendDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nondividendDistributions").toString())); - } - if ((jsonObj.get("federalIncomeTaxWithheld") != null && !jsonObj.get("federalIncomeTaxWithheld").isJsonNull()) && !jsonObj.get("federalIncomeTaxWithheld").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `federalIncomeTaxWithheld` to be a primitive type in the JSON string but got `%s`", jsonObj.get("federalIncomeTaxWithheld").toString())); - } - if ((jsonObj.get("section199ADividends") != null && !jsonObj.get("section199ADividends").isJsonNull()) && !jsonObj.get("section199ADividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `section199ADividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("section199ADividends").toString())); - } - if ((jsonObj.get("investmentExpenses") != null && !jsonObj.get("investmentExpenses").isJsonNull()) && !jsonObj.get("investmentExpenses").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `investmentExpenses` to be a primitive type in the JSON string but got `%s`", jsonObj.get("investmentExpenses").toString())); - } - if ((jsonObj.get("foreignTaxPaid") != null && !jsonObj.get("foreignTaxPaid").isJsonNull()) && !jsonObj.get("foreignTaxPaid").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTaxPaid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTaxPaid").toString())); - } if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); } - if ((jsonObj.get("cashLiquidationDistributions") != null && !jsonObj.get("cashLiquidationDistributions").isJsonNull()) && !jsonObj.get("cashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cashLiquidationDistributions").toString())); - } - if ((jsonObj.get("noncashLiquidationDistributions") != null && !jsonObj.get("noncashLiquidationDistributions").isJsonNull()) && !jsonObj.get("noncashLiquidationDistributions").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `noncashLiquidationDistributions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("noncashLiquidationDistributions").toString())); - } - if ((jsonObj.get("exemptInterestDividends") != null && !jsonObj.get("exemptInterestDividends").isJsonNull()) && !jsonObj.get("exemptInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptInterestDividends").toString())); - } - if ((jsonObj.get("specifiedPrivateActivityBondInterestDividends") != null && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonNull()) && !jsonObj.get("specifiedPrivateActivityBondInterestDividends").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `specifiedPrivateActivityBondInterestDividends` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specifiedPrivateActivityBondInterestDividends").toString())); - } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -1480,13 +1422,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1507,7 +1449,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java index cd8e1b3..9486cf8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java @@ -65,6 +65,82 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099DivResponse { + public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; + @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) + private Double totalOrdinaryDividends; + + public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) + private Double qualifiedDividends; + + public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; + @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) + private Double totalCapitalGainDistributions; + + public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; + @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) + private Double unrecapturedSection1250Gain; + + public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; + @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) + private Double section1202Gain; + + public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; + @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) + private Double collectiblesGain; + + public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; + @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) + private Double section897OrdinaryDividends; + + public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; + @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) + private Double section897CapitalGain; + + public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; + @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) + private Double nondividendDistributions; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; + @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) + private Double section199ADividends; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) + private String foreignCountryOrUSPossession; + + public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; + @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) + private Double cashLiquidationDistributions; + + public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; + @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) + private Double noncashLiquidationDistributions; + + public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; + @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) + private Double exemptInterestDividends; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) + private Double specifiedPrivateActivityBondInterestDividends; + + public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; + @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) + private Boolean fatcaFilingRequirement; + /** * Gets or Sets type */ @@ -84,7 +160,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -347,6 +425,367 @@ public Form1099DivResponse( this.type = type; } + public Form1099DivResponse totalOrdinaryDividends(Double totalOrdinaryDividends) { + this.totalOrdinaryDividends = totalOrdinaryDividends; + return this; + } + + /** + * Get totalOrdinaryDividends + * @return totalOrdinaryDividends + */ + @javax.annotation.Nullable + public Double getTotalOrdinaryDividends() { + return totalOrdinaryDividends; + } + + public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { + this.totalOrdinaryDividends = totalOrdinaryDividends; + } + + + public Form1099DivResponse qualifiedDividends(Double qualifiedDividends) { + this.qualifiedDividends = qualifiedDividends; + return this; + } + + /** + * Get qualifiedDividends + * @return qualifiedDividends + */ + @javax.annotation.Nullable + public Double getQualifiedDividends() { + return qualifiedDividends; + } + + public void setQualifiedDividends(Double qualifiedDividends) { + this.qualifiedDividends = qualifiedDividends; + } + + + public Form1099DivResponse totalCapitalGainDistributions(Double totalCapitalGainDistributions) { + this.totalCapitalGainDistributions = totalCapitalGainDistributions; + return this; + } + + /** + * Get totalCapitalGainDistributions + * @return totalCapitalGainDistributions + */ + @javax.annotation.Nullable + public Double getTotalCapitalGainDistributions() { + return totalCapitalGainDistributions; + } + + public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { + this.totalCapitalGainDistributions = totalCapitalGainDistributions; + } + + + public Form1099DivResponse unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { + this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; + return this; + } + + /** + * Get unrecapturedSection1250Gain + * @return unrecapturedSection1250Gain + */ + @javax.annotation.Nullable + public Double getUnrecapturedSection1250Gain() { + return unrecapturedSection1250Gain; + } + + public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { + this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; + } + + + public Form1099DivResponse section1202Gain(Double section1202Gain) { + this.section1202Gain = section1202Gain; + return this; + } + + /** + * Get section1202Gain + * @return section1202Gain + */ + @javax.annotation.Nullable + public Double getSection1202Gain() { + return section1202Gain; + } + + public void setSection1202Gain(Double section1202Gain) { + this.section1202Gain = section1202Gain; + } + + + public Form1099DivResponse collectiblesGain(Double collectiblesGain) { + this.collectiblesGain = collectiblesGain; + return this; + } + + /** + * Get collectiblesGain + * @return collectiblesGain + */ + @javax.annotation.Nullable + public Double getCollectiblesGain() { + return collectiblesGain; + } + + public void setCollectiblesGain(Double collectiblesGain) { + this.collectiblesGain = collectiblesGain; + } + + + public Form1099DivResponse section897OrdinaryDividends(Double section897OrdinaryDividends) { + this.section897OrdinaryDividends = section897OrdinaryDividends; + return this; + } + + /** + * Get section897OrdinaryDividends + * @return section897OrdinaryDividends + */ + @javax.annotation.Nullable + public Double getSection897OrdinaryDividends() { + return section897OrdinaryDividends; + } + + public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { + this.section897OrdinaryDividends = section897OrdinaryDividends; + } + + + public Form1099DivResponse section897CapitalGain(Double section897CapitalGain) { + this.section897CapitalGain = section897CapitalGain; + return this; + } + + /** + * Get section897CapitalGain + * @return section897CapitalGain + */ + @javax.annotation.Nullable + public Double getSection897CapitalGain() { + return section897CapitalGain; + } + + public void setSection897CapitalGain(Double section897CapitalGain) { + this.section897CapitalGain = section897CapitalGain; + } + + + public Form1099DivResponse nondividendDistributions(Double nondividendDistributions) { + this.nondividendDistributions = nondividendDistributions; + return this; + } + + /** + * Get nondividendDistributions + * @return nondividendDistributions + */ + @javax.annotation.Nullable + public Double getNondividendDistributions() { + return nondividendDistributions; + } + + public void setNondividendDistributions(Double nondividendDistributions) { + this.nondividendDistributions = nondividendDistributions; + } + + + public Form1099DivResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Get federalIncomeTaxWithheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099DivResponse section199ADividends(Double section199ADividends) { + this.section199ADividends = section199ADividends; + return this; + } + + /** + * Get section199ADividends + * @return section199ADividends + */ + @javax.annotation.Nullable + public Double getSection199ADividends() { + return section199ADividends; + } + + public void setSection199ADividends(Double section199ADividends) { + this.section199ADividends = section199ADividends; + } + + + public Form1099DivResponse investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Get investmentExpenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099DivResponse foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Get foreignTaxPaid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099DivResponse foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { + this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; + return this; + } + + /** + * Get foreignCountryOrUSPossession + * @return foreignCountryOrUSPossession + */ + @javax.annotation.Nullable + public String getForeignCountryOrUSPossession() { + return foreignCountryOrUSPossession; + } + + public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { + this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; + } + + + public Form1099DivResponse cashLiquidationDistributions(Double cashLiquidationDistributions) { + this.cashLiquidationDistributions = cashLiquidationDistributions; + return this; + } + + /** + * Get cashLiquidationDistributions + * @return cashLiquidationDistributions + */ + @javax.annotation.Nullable + public Double getCashLiquidationDistributions() { + return cashLiquidationDistributions; + } + + public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { + this.cashLiquidationDistributions = cashLiquidationDistributions; + } + + + public Form1099DivResponse noncashLiquidationDistributions(Double noncashLiquidationDistributions) { + this.noncashLiquidationDistributions = noncashLiquidationDistributions; + return this; + } + + /** + * Get noncashLiquidationDistributions + * @return noncashLiquidationDistributions + */ + @javax.annotation.Nullable + public Double getNoncashLiquidationDistributions() { + return noncashLiquidationDistributions; + } + + public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { + this.noncashLiquidationDistributions = noncashLiquidationDistributions; + } + + + public Form1099DivResponse exemptInterestDividends(Double exemptInterestDividends) { + this.exemptInterestDividends = exemptInterestDividends; + return this; + } + + /** + * Get exemptInterestDividends + * @return exemptInterestDividends + */ + @javax.annotation.Nullable + public Double getExemptInterestDividends() { + return exemptInterestDividends; + } + + public void setExemptInterestDividends(Double exemptInterestDividends) { + this.exemptInterestDividends = exemptInterestDividends; + } + + + public Form1099DivResponse specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { + this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; + return this; + } + + /** + * Get specifiedPrivateActivityBondInterestDividends + * @return specifiedPrivateActivityBondInterestDividends + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterestDividends() { + return specifiedPrivateActivityBondInterestDividends; + } + + public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { + this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; + } + + + public Form1099DivResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + /** * Get type * @return type @@ -1087,7 +1526,26 @@ public boolean equals(Object o) { return false; } Form1099DivResponse form1099DivResponse = (Form1099DivResponse) o; - return Objects.equals(this.type, form1099DivResponse.type) && + return Objects.equals(this.totalOrdinaryDividends, form1099DivResponse.totalOrdinaryDividends) && + Objects.equals(this.qualifiedDividends, form1099DivResponse.qualifiedDividends) && + Objects.equals(this.totalCapitalGainDistributions, form1099DivResponse.totalCapitalGainDistributions) && + Objects.equals(this.unrecapturedSection1250Gain, form1099DivResponse.unrecapturedSection1250Gain) && + Objects.equals(this.section1202Gain, form1099DivResponse.section1202Gain) && + Objects.equals(this.collectiblesGain, form1099DivResponse.collectiblesGain) && + Objects.equals(this.section897OrdinaryDividends, form1099DivResponse.section897OrdinaryDividends) && + Objects.equals(this.section897CapitalGain, form1099DivResponse.section897CapitalGain) && + Objects.equals(this.nondividendDistributions, form1099DivResponse.nondividendDistributions) && + Objects.equals(this.federalIncomeTaxWithheld, form1099DivResponse.federalIncomeTaxWithheld) && + Objects.equals(this.section199ADividends, form1099DivResponse.section199ADividends) && + Objects.equals(this.investmentExpenses, form1099DivResponse.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099DivResponse.foreignTaxPaid) && + Objects.equals(this.foreignCountryOrUSPossession, form1099DivResponse.foreignCountryOrUSPossession) && + Objects.equals(this.cashLiquidationDistributions, form1099DivResponse.cashLiquidationDistributions) && + Objects.equals(this.noncashLiquidationDistributions, form1099DivResponse.noncashLiquidationDistributions) && + Objects.equals(this.exemptInterestDividends, form1099DivResponse.exemptInterestDividends) && + Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099DivResponse.specifiedPrivateActivityBondInterestDividends) && + Objects.equals(this.fatcaFilingRequirement, form1099DivResponse.fatcaFilingRequirement) && + Objects.equals(this.type, form1099DivResponse.type) && Objects.equals(this.createdAt, form1099DivResponse.createdAt) && Objects.equals(this.updatedAt, form1099DivResponse.updatedAt) && Objects.equals(this.stateAndLocalWithholding, form1099DivResponse.stateAndLocalWithholding) && @@ -1133,7 +1591,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); } private static int hashCodeNullable(JsonNullable a) { @@ -1147,6 +1605,25 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099DivResponse {\n"); + sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); + sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); + sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); + sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); + sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); + sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); + sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); + sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); + sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); + sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); + sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); + sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1271,6 +1748,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java new file mode 100644 index 0000000..c5ac517 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -0,0 +1,1697 @@ +/* + * 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.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1099Int + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099Int { + public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) + private Double interestIncome; + + public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; + @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) + private Double earlyWithdrawalPenalty; + + public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; + @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) + private Double usSavingsBondsInterest; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) + private String foreignCountry; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) + private Double taxExemptInterest; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) + private Double specifiedPrivateActivityBondInterest; + + public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; + @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) + private Double marketDiscount; + + public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) + private Double bondPremium; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) + private Double bondPremiumOnTreasuryObligations; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) + private Double bondPremiumOnTaxExemptBond; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) + private String taxExemptBondCusipNumber; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private Integer issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @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; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public Form1099Int() { + } + + public Form1099Int interestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + return this; + } + + /** + * Get interestIncome + * @return interestIncome + */ + @javax.annotation.Nullable + public Double getInterestIncome() { + return interestIncome; + } + + public void setInterestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + } + + + public Form1099Int earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + return this; + } + + /** + * Get earlyWithdrawalPenalty + * @return earlyWithdrawalPenalty + */ + @javax.annotation.Nullable + public Double getEarlyWithdrawalPenalty() { + return earlyWithdrawalPenalty; + } + + public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + } + + + public Form1099Int usSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + return this; + } + + /** + * Get usSavingsBondsInterest + * @return usSavingsBondsInterest + */ + @javax.annotation.Nullable + public Double getUsSavingsBondsInterest() { + return usSavingsBondsInterest; + } + + public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + } + + + public Form1099Int federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Get federalIncomeTaxWithheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099Int investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Get investmentExpenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099Int foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Get foreignTaxPaid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099Int foreignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + return this; + } + + /** + * Get foreignCountry + * @return foreignCountry + */ + @javax.annotation.Nullable + public String getForeignCountry() { + return foreignCountry; + } + + public void setForeignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + } + + + public Form1099Int taxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + return this; + } + + /** + * Get taxExemptInterest + * @return taxExemptInterest + */ + @javax.annotation.Nullable + public Double getTaxExemptInterest() { + return taxExemptInterest; + } + + public void setTaxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + } + + + public Form1099Int specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + return this; + } + + /** + * Get specifiedPrivateActivityBondInterest + * @return specifiedPrivateActivityBondInterest + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterest() { + return specifiedPrivateActivityBondInterest; + } + + public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + } + + + public Form1099Int marketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + return this; + } + + /** + * Get marketDiscount + * @return marketDiscount + */ + @javax.annotation.Nullable + public Double getMarketDiscount() { + return marketDiscount; + } + + public void setMarketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + } + + + public Form1099Int bondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + return this; + } + + /** + * Get bondPremium + * @return bondPremium + */ + @javax.annotation.Nullable + public Double getBondPremium() { + return bondPremium; + } + + public void setBondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + } + + + public Form1099Int bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + return this; + } + + /** + * Get bondPremiumOnTreasuryObligations + * @return bondPremiumOnTreasuryObligations + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTreasuryObligations() { + return bondPremiumOnTreasuryObligations; + } + + public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + } + + + public Form1099Int bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + return this; + } + + /** + * Get bondPremiumOnTaxExemptBond + * @return bondPremiumOnTaxExemptBond + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTaxExemptBond() { + return bondPremiumOnTaxExemptBond; + } + + public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + } + + + public Form1099Int taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + return this; + } + + /** + * Get taxExemptBondCusipNumber + * @return taxExemptBondCusipNumber + */ + @javax.annotation.Nullable + public String getTaxExemptBondCusipNumber() { + return taxExemptBondCusipNumber; + } + + public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + } + + + public Form1099Int id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1099Int type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Form1099Int issuerId(Integer issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public Integer getIssuerId() { + return issuerId; + } + + public void setIssuerId(Integer issuerId) { + this.issuerId = issuerId; + } + + + public Form1099Int issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099Int issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099Int taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1099Int addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { + if (this.stateEfileStatus == null) { + this.stateEfileStatus = new ArrayList<>(); + } + this.stateEfileStatus.add(stateEfileStatusItem); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1099Int postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099Int postalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1099Int tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099Int tinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1099Int addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099Int addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1099Int eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1099Int referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099Int email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099Int tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public Form1099Int fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099Int tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Get tin + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public Form1099Int noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099Int secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099Int recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099Int recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099Int address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099Int address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099Int city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099Int state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099Int zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099Int nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099Int countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099Int accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099Int officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099Int validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1099Int addValidationErrorsItem(ValidationError validationErrorsItem) { + if (this.validationErrors == null) { + this.validationErrors = new ArrayList<>(); + } + this.validationErrors.add(validationErrorsItem); + return this; + } + + /** + * Get validationErrors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + public void setValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + } + + + public Form1099Int 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 Form1099Int 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; + } + + + public Form1099Int 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099Int form1099Int = (Form1099Int) o; + return Objects.equals(this.interestIncome, form1099Int.interestIncome) && + Objects.equals(this.earlyWithdrawalPenalty, form1099Int.earlyWithdrawalPenalty) && + Objects.equals(this.usSavingsBondsInterest, form1099Int.usSavingsBondsInterest) && + Objects.equals(this.federalIncomeTaxWithheld, form1099Int.federalIncomeTaxWithheld) && + Objects.equals(this.investmentExpenses, form1099Int.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099Int.foreignTaxPaid) && + Objects.equals(this.foreignCountry, form1099Int.foreignCountry) && + Objects.equals(this.taxExemptInterest, form1099Int.taxExemptInterest) && + Objects.equals(this.specifiedPrivateActivityBondInterest, form1099Int.specifiedPrivateActivityBondInterest) && + Objects.equals(this.marketDiscount, form1099Int.marketDiscount) && + Objects.equals(this.bondPremium, form1099Int.bondPremium) && + Objects.equals(this.bondPremiumOnTreasuryObligations, form1099Int.bondPremiumOnTreasuryObligations) && + Objects.equals(this.bondPremiumOnTaxExemptBond, form1099Int.bondPremiumOnTaxExemptBond) && + Objects.equals(this.taxExemptBondCusipNumber, form1099Int.taxExemptBondCusipNumber) && + Objects.equals(this.id, form1099Int.id) && + Objects.equals(this.type, form1099Int.type) && + Objects.equals(this.issuerId, form1099Int.issuerId) && + Objects.equals(this.issuerReferenceId, form1099Int.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099Int.issuerTin) && + Objects.equals(this.taxYear, form1099Int.taxYear) && + Objects.equals(this.federalEfile, form1099Int.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099Int.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099Int.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099Int.stateEfileStatus) && + Objects.equals(this.postalMail, form1099Int.postalMail) && + Objects.equals(this.postalMailStatus, form1099Int.postalMailStatus) && + Objects.equals(this.tinMatch, form1099Int.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099Int.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099Int.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099Int.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Int.eDeliveryStatus) && + Objects.equals(this.referenceId, form1099Int.referenceId) && + Objects.equals(this.email, form1099Int.email) && + Objects.equals(this.tinType, form1099Int.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099Int.fatcaFilingRequirement) && + Objects.equals(this.tin, form1099Int.tin) && + Objects.equals(this.noTin, form1099Int.noTin) && + Objects.equals(this.secondTinNotice, form1099Int.secondTinNotice) && + Objects.equals(this.recipientName, form1099Int.recipientName) && + Objects.equals(this.recipientSecondName, form1099Int.recipientSecondName) && + Objects.equals(this.address, form1099Int.address) && + Objects.equals(this.address2, form1099Int.address2) && + Objects.equals(this.city, form1099Int.city) && + Objects.equals(this.state, form1099Int.state) && + Objects.equals(this.zip, form1099Int.zip) && + Objects.equals(this.nonUsProvince, form1099Int.nonUsProvince) && + Objects.equals(this.countryCode, form1099Int.countryCode) && + Objects.equals(this.accountNumber, form1099Int.accountNumber) && + Objects.equals(this.officeCode, form1099Int.officeCode) && + Objects.equals(this.validationErrors, form1099Int.validationErrors) && + Objects.equals(this.createdAt, form1099Int.createdAt) && + Objects.equals(this.updatedAt, form1099Int.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099Int.stateAndLocalWithholding); + } + + 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(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, 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); + } + + 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 Form1099Int {\n"); + sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); + sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); + sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); + sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); + sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); + sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); + sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); + sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); + sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("type"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("federalEfile"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfile"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMail"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatch"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerification"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099Int + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099Int.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099Int is not found in the empty JSON string", Form1099Int.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099Int.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Int` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); + } + if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + 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("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("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099Int.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099Int' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099Int value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099Int read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099Int given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099Int + * @throws IOException if the JSON string is invalid with respect to Form1099Int + */ + public static Form1099Int fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099Int.class); + } + + /** + * Convert an instance of Form1099Int 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/Form1099IntList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java new file mode 100644 index 0000000..f2cd9a5 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java @@ -0,0 +1,262 @@ +/* + * 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.Form1099IntListItem; +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.ArrayList; +import java.util.Arrays; +import java.util.List; + +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; + +/** + * Form1099IntList + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099IntList { + public static final String SERIALIZED_NAME_FORMS = "forms"; + @SerializedName(SERIALIZED_NAME_FORMS) + private List forms; + + public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; + @SerializedName(SERIALIZED_NAME_FORM_TYPE) + private String formType; + + public Form1099IntList() { + } + + public Form1099IntList forms(List forms) { + this.forms = forms; + return this; + } + + public Form1099IntList addFormsItem(Form1099IntListItem formsItem) { + if (this.forms == null) { + this.forms = new ArrayList<>(); + } + this.forms.add(formsItem); + return this; + } + + /** + * Get forms + * @return forms + */ + @javax.annotation.Nullable + public List getForms() { + return forms; + } + + public void setForms(List forms) { + this.forms = forms; + } + + + public Form1099IntList formType(String formType) { + this.formType = formType; + return this; + } + + /** + * Get formType + * @return formType + */ + @javax.annotation.Nullable + public String getFormType() { + return formType; + } + + public void setFormType(String formType) { + this.formType = formType; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099IntList form1099IntList = (Form1099IntList) o; + return Objects.equals(this.forms, form1099IntList.forms) && + Objects.equals(this.formType, form1099IntList.formType); + } + + @Override + public int hashCode() { + return Objects.hash(forms, formType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Form1099IntList {\n"); + sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); + sb.append(" formType: ").append(toIndentedString(formType)).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("formType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099IntList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099IntList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntList is not found in the empty JSON string", Form1099IntList.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099IntList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { + JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); + if (jsonArrayforms != null) { + // ensure the json data is an array + if (!jsonObj.get("forms").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); + } + + // validate the optional field `forms` (array) + for (int i = 0; i < jsonArrayforms.size(); i++) { + Form1099IntListItem.validateJsonElement(jsonArrayforms.get(i)); + }; + } + } + if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099IntList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099IntList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099IntList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099IntList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099IntList given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099IntList + * @throws IOException if the JSON string is invalid with respect to Form1099IntList + */ + public static Form1099IntList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099IntList.class); + } + + /** + * Convert an instance of Form1099IntList 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/Form1099IntListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java new file mode 100644 index 0000000..a409996 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java @@ -0,0 +1,1406 @@ +/* + * 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.StateAndLocalWithholdingRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Form1099IntListItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099IntListItem { + public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) + private Double interestIncome; + + public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; + @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) + private Double earlyWithdrawalPenalty; + + public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; + @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) + private Double usSavingsBondsInterest; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) + private String foreignCountry; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) + private Double taxExemptInterest; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) + private Double specifiedPrivateActivityBondInterest; + + public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; + @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) + private Double marketDiscount; + + public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) + private Double bondPremium; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) + private Double bondPremiumOnTreasuryObligations; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) + private Double bondPremiumOnTaxExemptBond; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) + private String taxExemptBondCusipNumber; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) + private String recipientTin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + /** + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_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; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; + @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) + private Boolean federalEFile; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; + @SerializedName(SERIALIZED_NAME_STATE_E_FILE) + private Boolean stateEFile; + + 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_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + 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_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 StateAndLocalWithholdingRequest stateAndLocalWithholding; + + public Form1099IntListItem() { + } + + public Form1099IntListItem interestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + return this; + } + + /** + * Interest Income + * @return interestIncome + */ + @javax.annotation.Nullable + public Double getInterestIncome() { + return interestIncome; + } + + public void setInterestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + } + + + public Form1099IntListItem earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + return this; + } + + /** + * Early Withdrawal Penalty + * @return earlyWithdrawalPenalty + */ + @javax.annotation.Nullable + public Double getEarlyWithdrawalPenalty() { + return earlyWithdrawalPenalty; + } + + public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + } + + + public Form1099IntListItem usSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + return this; + } + + /** + * Interest on U.S. Savings Bonds and Treasury obligations + * @return usSavingsBondsInterest + */ + @javax.annotation.Nullable + public Double getUsSavingsBondsInterest() { + return usSavingsBondsInterest; + } + + public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + } + + + public Form1099IntListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099IntListItem investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Investment Expenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099IntListItem foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Foreign tax paid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099IntListItem foreignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + return this; + } + + /** + * Foreign country or U.S. possession + * @return foreignCountry + */ + @javax.annotation.Nullable + public String getForeignCountry() { + return foreignCountry; + } + + public void setForeignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + } + + + public Form1099IntListItem taxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + return this; + } + + /** + * Tax-Exempt Interest + * @return taxExemptInterest + */ + @javax.annotation.Nullable + public Double getTaxExemptInterest() { + return taxExemptInterest; + } + + public void setTaxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + } + + + public Form1099IntListItem specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + return this; + } + + /** + * Specified Private activity + * @return specifiedPrivateActivityBondInterest + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterest() { + return specifiedPrivateActivityBondInterest; + } + + public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + } + + + public Form1099IntListItem marketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + return this; + } + + /** + * Market Discount + * @return marketDiscount + */ + @javax.annotation.Nullable + public Double getMarketDiscount() { + return marketDiscount; + } + + public void setMarketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + } + + + public Form1099IntListItem bondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + return this; + } + + /** + * Bond Premium + * @return bondPremium + */ + @javax.annotation.Nullable + public Double getBondPremium() { + return bondPremium; + } + + public void setBondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + } + + + public Form1099IntListItem bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + return this; + } + + /** + * Bond Premium on Treasury obligations + * @return bondPremiumOnTreasuryObligations + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTreasuryObligations() { + return bondPremiumOnTreasuryObligations; + } + + public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + } + + + public Form1099IntListItem bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + return this; + } + + /** + * Bond Premium on tax exempt bond + * @return bondPremiumOnTaxExemptBond + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTaxExemptBond() { + return bondPremiumOnTaxExemptBond; + } + + public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + } + + + public Form1099IntListItem taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + return this; + } + + /** + * Tax exempt bond CUSIP no. + * @return taxExemptBondCusipNumber + */ + @javax.annotation.Nullable + public String getTaxExemptBondCusipNumber() { + return taxExemptBondCusipNumber; + } + + public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + } + + + public Form1099IntListItem issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099IntListItem issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099IntListItem taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Tax year + * @return taxYear + */ + @javax.annotation.Nonnull + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099IntListItem issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Issuer ID + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1099IntListItem referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Reference ID + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099IntListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; + return this; + } + + /** + * Recipient Tax ID Number + * @return recipientTin + */ + @javax.annotation.Nullable + public String getRecipientTin() { + return recipientTin; + } + + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; + } + + + public Form1099IntListItem recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099IntListItem tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1099IntListItem recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Recipient second name + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099IntListItem address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099IntListItem address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Address line 2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099IntListItem city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099IntListItem state(String state) { + this.state = state; + return this; + } + + /** + * US state. Required if CountryCode is \"US\". + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099IntListItem zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Zip/postal code + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099IntListItem email(String email) { + this.email = email; + return this; + } + + /** + * Recipient email address + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099IntListItem accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Account number + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099IntListItem officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Office code + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099IntListItem nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Foreign province + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099IntListItem countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099IntListItem federalEFile(Boolean federalEFile) { + this.federalEFile = federalEFile; + return this; + } + + /** + * Boolean indicating that federal e-filing should be scheduled for this form + * @return federalEFile + */ + @javax.annotation.Nullable + public Boolean getFederalEFile() { + return federalEFile; + } + + public void setFederalEFile(Boolean federalEFile) { + this.federalEFile = federalEFile; + } + + + public Form1099IntListItem postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099IntListItem stateEFile(Boolean stateEFile) { + this.stateEFile = stateEFile; + return this; + } + + /** + * Boolean indicating that state e-filing should be scheduled for this form + * @return stateEFile + */ + @javax.annotation.Nullable + public Boolean getStateEFile() { + return stateEFile; + } + + public void setStateEFile(Boolean stateEFile) { + this.stateEFile = stateEFile; + } + + + public Form1099IntListItem tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099IntListItem noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Indicates whether the recipient has no TIN + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099IntListItem secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice in three years + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099IntListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099IntListItem addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099IntListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * State and local withholding information + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099IntListItem form1099IntListItem = (Form1099IntListItem) o; + return Objects.equals(this.interestIncome, form1099IntListItem.interestIncome) && + Objects.equals(this.earlyWithdrawalPenalty, form1099IntListItem.earlyWithdrawalPenalty) && + Objects.equals(this.usSavingsBondsInterest, form1099IntListItem.usSavingsBondsInterest) && + Objects.equals(this.federalIncomeTaxWithheld, form1099IntListItem.federalIncomeTaxWithheld) && + Objects.equals(this.investmentExpenses, form1099IntListItem.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099IntListItem.foreignTaxPaid) && + Objects.equals(this.foreignCountry, form1099IntListItem.foreignCountry) && + Objects.equals(this.taxExemptInterest, form1099IntListItem.taxExemptInterest) && + Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntListItem.specifiedPrivateActivityBondInterest) && + Objects.equals(this.marketDiscount, form1099IntListItem.marketDiscount) && + Objects.equals(this.bondPremium, form1099IntListItem.bondPremium) && + Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntListItem.bondPremiumOnTreasuryObligations) && + Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntListItem.bondPremiumOnTaxExemptBond) && + Objects.equals(this.taxExemptBondCusipNumber, form1099IntListItem.taxExemptBondCusipNumber) && + Objects.equals(this.issuerReferenceId, form1099IntListItem.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099IntListItem.issuerTin) && + Objects.equals(this.taxYear, form1099IntListItem.taxYear) && + Objects.equals(this.issuerId, form1099IntListItem.issuerId) && + Objects.equals(this.referenceId, form1099IntListItem.referenceId) && + Objects.equals(this.recipientTin, form1099IntListItem.recipientTin) && + Objects.equals(this.recipientName, form1099IntListItem.recipientName) && + Objects.equals(this.tinType, form1099IntListItem.tinType) && + Objects.equals(this.recipientSecondName, form1099IntListItem.recipientSecondName) && + Objects.equals(this.address, form1099IntListItem.address) && + Objects.equals(this.address2, form1099IntListItem.address2) && + Objects.equals(this.city, form1099IntListItem.city) && + Objects.equals(this.state, form1099IntListItem.state) && + Objects.equals(this.zip, form1099IntListItem.zip) && + Objects.equals(this.email, form1099IntListItem.email) && + Objects.equals(this.accountNumber, form1099IntListItem.accountNumber) && + Objects.equals(this.officeCode, form1099IntListItem.officeCode) && + Objects.equals(this.nonUsProvince, form1099IntListItem.nonUsProvince) && + Objects.equals(this.countryCode, form1099IntListItem.countryCode) && + Objects.equals(this.federalEFile, form1099IntListItem.federalEFile) && + Objects.equals(this.postalMail, form1099IntListItem.postalMail) && + Objects.equals(this.stateEFile, form1099IntListItem.stateEFile) && + Objects.equals(this.tinMatch, form1099IntListItem.tinMatch) && + Objects.equals(this.noTin, form1099IntListItem.noTin) && + Objects.equals(this.secondTinNotice, form1099IntListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099IntListItem.fatcaFilingRequirement) && + Objects.equals(this.addressVerification, form1099IntListItem.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099IntListItem.stateAndLocalWithholding); + } + + 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(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); + } + + 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 Form1099IntListItem {\n"); + sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); + sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); + sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); + sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); + sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); + sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); + sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); + sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); + sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("issuerId"); + openapiFields.add("referenceId"); + openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); + openapiFields.add("tinType"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + } + + /** + * 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 Form1099IntListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099IntListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntListItem is not found in the empty JSON string", Form1099IntListItem.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099IntListItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099IntListItem.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("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); + } + if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").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("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099IntListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099IntListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099IntListItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099IntListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099IntListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099IntListItem + * @throws IOException if the JSON string is invalid with respect to Form1099IntListItem + */ + public static Form1099IntListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099IntListItem.class); + } + + /** + * Convert an instance of Form1099IntListItem 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/Form1099IntListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java new file mode 100644 index 0000000..7d2661a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java @@ -0,0 +1,1641 @@ +/* + * 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.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1099IntListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099IntListItemResponse { + public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) + private Double interestIncome; + + public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; + @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) + private Double earlyWithdrawalPenalty; + + public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; + @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) + private Double usSavingsBondsInterest; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) + private String foreignCountry; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) + private Double taxExemptInterest; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) + private Double specifiedPrivateActivityBondInterest; + + public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; + @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) + private Double marketDiscount; + + public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) + private Double bondPremium; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) + private Double bondPremiumOnTreasuryObligations; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) + private Double bondPremiumOnTaxExemptBond; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) + private String taxExemptBondCusipNumber; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private Integer issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @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 StatusDetail 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 StatusDetail 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 StatusDetail 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 StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private StatusDetail 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_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; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + 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_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholdingResponse stateAndLocalWithholding; + + public Form1099IntListItemResponse() { + } + + public Form1099IntListItemResponse( + String id, + StatusDetail federalEfileStatus, + List stateEfileStatus, + StatusDetail postalMailStatus, + StatusDetail tinMatchStatus, + StatusDetail addressVerificationStatus, + StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + 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; + } + + public Form1099IntListItemResponse interestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + return this; + } + + /** + * Interest Income + * @return interestIncome + */ + @javax.annotation.Nullable + public Double getInterestIncome() { + return interestIncome; + } + + public void setInterestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + } + + + public Form1099IntListItemResponse earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + return this; + } + + /** + * Early withdrawal penalty + * @return earlyWithdrawalPenalty + */ + @javax.annotation.Nullable + public Double getEarlyWithdrawalPenalty() { + return earlyWithdrawalPenalty; + } + + public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + } + + + public Form1099IntListItemResponse usSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + return this; + } + + /** + * Interest on U.S. Savings Bonds and Treasury obligations + * @return usSavingsBondsInterest + */ + @javax.annotation.Nullable + public Double getUsSavingsBondsInterest() { + return usSavingsBondsInterest; + } + + public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + } + + + public Form1099IntListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099IntListItemResponse investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Investment expenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099IntListItemResponse foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Foreign tax paid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099IntListItemResponse foreignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + return this; + } + + /** + * Foreign country or U.S. possession + * @return foreignCountry + */ + @javax.annotation.Nullable + public String getForeignCountry() { + return foreignCountry; + } + + public void setForeignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + } + + + public Form1099IntListItemResponse taxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + return this; + } + + /** + * Tax-exempt interest + * @return taxExemptInterest + */ + @javax.annotation.Nullable + public Double getTaxExemptInterest() { + return taxExemptInterest; + } + + public void setTaxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + } + + + public Form1099IntListItemResponse specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + return this; + } + + /** + * Specified private activity bond interest + * @return specifiedPrivateActivityBondInterest + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterest() { + return specifiedPrivateActivityBondInterest; + } + + public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + } + + + public Form1099IntListItemResponse marketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + return this; + } + + /** + * Market discount + * @return marketDiscount + */ + @javax.annotation.Nullable + public Double getMarketDiscount() { + return marketDiscount; + } + + public void setMarketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + } + + + public Form1099IntListItemResponse bondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + return this; + } + + /** + * Bond premium + * @return bondPremium + */ + @javax.annotation.Nullable + public Double getBondPremium() { + return bondPremium; + } + + public void setBondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + } + + + public Form1099IntListItemResponse bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + return this; + } + + /** + * Bond premium on Treasury obligations + * @return bondPremiumOnTreasuryObligations + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTreasuryObligations() { + return bondPremiumOnTreasuryObligations; + } + + public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + } + + + public Form1099IntListItemResponse bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + return this; + } + + /** + * Bond premium on tax exempt bond + * @return bondPremiumOnTaxExemptBond + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTaxExemptBond() { + return bondPremiumOnTaxExemptBond; + } + + public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + } + + + public Form1099IntListItemResponse taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + return this; + } + + /** + * Tax exempt bond CUSIP number + * @return taxExemptBondCusipNumber + */ + @javax.annotation.Nullable + public String getTaxExemptBondCusipNumber() { + return taxExemptBondCusipNumber; + } + + public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099IntListItemResponse type(String type) { + this.type = type; + return this; + } + + /** + * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + + public Form1099IntListItemResponse issuerId(Integer issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Issuer ID + * @return issuerId + */ + @javax.annotation.Nonnull + public Integer getIssuerId() { + return issuerId; + } + + public void setIssuerId(Integer issuerId) { + this.issuerId = issuerId; + } + + + public Form1099IntListItemResponse issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Issuer Reference ID + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099IntListItemResponse issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Issuer TIN + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099IntListItemResponse taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Tax year + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099IntListItemResponse federalEfile(Boolean federalEfile) { + this.federalEfile = federalEfile; + return this; + } + + /** + * Boolean indicating that federal e-filing has been scheduled for this form + * @return federalEfile + */ + @javax.annotation.Nonnull + public Boolean getFederalEfile() { + return federalEfile; + } + + public void setFederalEfile(Boolean federalEfile) { + this.federalEfile = federalEfile; + } + + + /** + * Federal e-file status + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099IntListItemResponse stateEfile(Boolean stateEfile) { + this.stateEfile = stateEfile; + return this; + } + + /** + * Boolean indicating that state e-filing has been scheduled for this form + * @return stateEfile + */ + @javax.annotation.Nonnull + public Boolean getStateEfile() { + return stateEfile; + } + + public void setStateEfile(Boolean stateEfile) { + this.stateEfile = stateEfile; + } + + + /** + * State e-file status + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + + + public Form1099IntListItemResponse postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Boolean indicating that postal mailing to the recipient has been scheduled for this form + * @return postalMail + */ + @javax.annotation.Nonnull + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + /** + * Postal mail to recipient status + * @return postalMailStatus + */ + @javax.annotation.Nullable + public StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099IntListItemResponse tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Boolean indicating that TIN Matching has been scheduled for this form + * @return tinMatch + */ + @javax.annotation.Nonnull + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + /** + * TIN Match status + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099IntListItemResponse addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Boolean indicating that address verification has been scheduled for this form + * @return addressVerification + */ + @javax.annotation.Nonnull + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + + + public Form1099IntListItemResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Reference ID + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099IntListItemResponse email(String email) { + this.email = email; + return this; + } + + /** + * Recipient email address + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099IntListItemResponse tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public Form1099IntListItemResponse tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Recipient Tax ID Number + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public Form1099IntListItemResponse noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Indicates whether the recipient has no TIN + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099IntListItemResponse secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second Tin Notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099IntListItemResponse recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099IntListItemResponse recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Recipient second name + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099IntListItemResponse address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099IntListItemResponse address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Address line 2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099IntListItemResponse city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099IntListItemResponse state(String state) { + this.state = state; + return this; + } + + /** + * US state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099IntListItemResponse zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Zip/postal code + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099IntListItemResponse nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Foreign province + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099IntListItemResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099IntListItemResponse accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Account Number + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099IntListItemResponse officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Office Code + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099IntListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * FATCA filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + /** + * Validation errors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + + + /** + * Creation time + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + /** + * Update time + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + public Form1099IntListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * Get stateAndLocalWithholding + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099IntListItemResponse form1099IntListItemResponse = (Form1099IntListItemResponse) o; + return Objects.equals(this.interestIncome, form1099IntListItemResponse.interestIncome) && + Objects.equals(this.earlyWithdrawalPenalty, form1099IntListItemResponse.earlyWithdrawalPenalty) && + Objects.equals(this.usSavingsBondsInterest, form1099IntListItemResponse.usSavingsBondsInterest) && + Objects.equals(this.federalIncomeTaxWithheld, form1099IntListItemResponse.federalIncomeTaxWithheld) && + Objects.equals(this.investmentExpenses, form1099IntListItemResponse.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099IntListItemResponse.foreignTaxPaid) && + Objects.equals(this.foreignCountry, form1099IntListItemResponse.foreignCountry) && + Objects.equals(this.taxExemptInterest, form1099IntListItemResponse.taxExemptInterest) && + Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntListItemResponse.specifiedPrivateActivityBondInterest) && + Objects.equals(this.marketDiscount, form1099IntListItemResponse.marketDiscount) && + Objects.equals(this.bondPremium, form1099IntListItemResponse.bondPremium) && + Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntListItemResponse.bondPremiumOnTreasuryObligations) && + Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntListItemResponse.bondPremiumOnTaxExemptBond) && + Objects.equals(this.taxExemptBondCusipNumber, form1099IntListItemResponse.taxExemptBondCusipNumber) && + Objects.equals(this.id, form1099IntListItemResponse.id) && + Objects.equals(this.type, form1099IntListItemResponse.type) && + Objects.equals(this.issuerId, form1099IntListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099IntListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099IntListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1099IntListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1099IntListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099IntListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099IntListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099IntListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099IntListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099IntListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099IntListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099IntListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099IntListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099IntListItemResponse.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099IntListItemResponse.eDeliveryStatus) && + Objects.equals(this.referenceId, form1099IntListItemResponse.referenceId) && + Objects.equals(this.email, form1099IntListItemResponse.email) && + Objects.equals(this.tinType, form1099IntListItemResponse.tinType) && + Objects.equals(this.tin, form1099IntListItemResponse.tin) && + Objects.equals(this.noTin, form1099IntListItemResponse.noTin) && + Objects.equals(this.secondTinNotice, form1099IntListItemResponse.secondTinNotice) && + Objects.equals(this.recipientName, form1099IntListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099IntListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1099IntListItemResponse.address) && + Objects.equals(this.address2, form1099IntListItemResponse.address2) && + Objects.equals(this.city, form1099IntListItemResponse.city) && + Objects.equals(this.state, form1099IntListItemResponse.state) && + Objects.equals(this.zip, form1099IntListItemResponse.zip) && + Objects.equals(this.nonUsProvince, form1099IntListItemResponse.nonUsProvince) && + Objects.equals(this.countryCode, form1099IntListItemResponse.countryCode) && + Objects.equals(this.accountNumber, form1099IntListItemResponse.accountNumber) && + Objects.equals(this.officeCode, form1099IntListItemResponse.officeCode) && + Objects.equals(this.fatcaFilingRequirement, form1099IntListItemResponse.fatcaFilingRequirement) && + Objects.equals(this.validationErrors, form1099IntListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1099IntListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1099IntListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099IntListItemResponse.stateAndLocalWithholding); + } + + 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(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + } + + 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 Form1099IntListItemResponse {\n"); + sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); + sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); + sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); + sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); + sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); + sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); + sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); + sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); + sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("type"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("federalEfile"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfile"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMail"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatch"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerification"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("issuerId"); + openapiRequiredFields.add("federalEfile"); + openapiRequiredFields.add("stateEfile"); + openapiRequiredFields.add("postalMail"); + openapiRequiredFields.add("tinMatch"); + openapiRequiredFields.add("addressVerification"); + } + + /** + * 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 Form1099IntListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099IntListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntListItemResponse is not found in the empty JSON string", Form1099IntListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099IntListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099IntListItemResponse.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("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); + } + if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); + } + if (!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("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + 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("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("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099IntListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099IntListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099IntListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099IntListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099IntListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099IntListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1099IntListItemResponse + */ + public static Form1099IntListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099IntListItemResponse.class); + } + + /** + * Convert an instance of Form1099IntListItemResponse 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/Form1099IntRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java new file mode 100644 index 0000000..68e72b5 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java @@ -0,0 +1,1413 @@ +/* + * 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.StateAndLocalWithholdingRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Form1099IntRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099IntRequest { + public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) + private Double interestIncome; + + public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; + @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) + private Double earlyWithdrawalPenalty; + + public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; + @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) + private Double usSavingsBondsInterest; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) + private String foreignCountry; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) + private Double taxExemptInterest; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) + private Double specifiedPrivateActivityBondInterest; + + public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; + @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) + private Double marketDiscount; + + public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) + private Double bondPremium; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) + private Double bondPremiumOnTreasuryObligations; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) + private Double bondPremiumOnTaxExemptBond; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) + private String taxExemptBondCusipNumber; + + /** + * Gets or Sets 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 TypeEnum type; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) + private String recipientTin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + /** + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_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; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; + @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) + private Boolean federalEFile; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; + @SerializedName(SERIALIZED_NAME_STATE_E_FILE) + private Boolean stateEFile; + + 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_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + 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_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 StateAndLocalWithholdingRequest stateAndLocalWithholding; + + public Form1099IntRequest() { + } + + public Form1099IntRequest interestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + return this; + } + + /** + * Interest Income + * @return interestIncome + */ + @javax.annotation.Nullable + public Double getInterestIncome() { + return interestIncome; + } + + public void setInterestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + } + + + public Form1099IntRequest earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + return this; + } + + /** + * Early Withdrawl Penalty + * @return earlyWithdrawalPenalty + */ + @javax.annotation.Nullable + public Double getEarlyWithdrawalPenalty() { + return earlyWithdrawalPenalty; + } + + public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + } + + + public Form1099IntRequest usSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + return this; + } + + /** + * Interest on U.S. Savings Bonds and Treasury obligations + * @return usSavingsBondsInterest + */ + @javax.annotation.Nullable + public Double getUsSavingsBondsInterest() { + return usSavingsBondsInterest; + } + + public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + } + + + public Form1099IntRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099IntRequest investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Investment Expenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099IntRequest foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Foreign tax paid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099IntRequest foreignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + return this; + } + + /** + * Foreign country or U.S. possession + * @return foreignCountry + */ + @javax.annotation.Nullable + public String getForeignCountry() { + return foreignCountry; + } + + public void setForeignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + } + + + public Form1099IntRequest taxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + return this; + } + + /** + * Tax-Exempt Interest + * @return taxExemptInterest + */ + @javax.annotation.Nullable + public Double getTaxExemptInterest() { + return taxExemptInterest; + } + + public void setTaxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + } + + + public Form1099IntRequest specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + return this; + } + + /** + * Specified Private activity + * @return specifiedPrivateActivityBondInterest + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterest() { + return specifiedPrivateActivityBondInterest; + } + + public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + } + + + public Form1099IntRequest marketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + return this; + } + + /** + * Market Discount + * @return marketDiscount + */ + @javax.annotation.Nullable + public Double getMarketDiscount() { + return marketDiscount; + } + + public void setMarketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + } + + + public Form1099IntRequest bondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + return this; + } + + /** + * Bond Premium + * @return bondPremium + */ + @javax.annotation.Nullable + public Double getBondPremium() { + return bondPremium; + } + + public void setBondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + } + + + public Form1099IntRequest bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + return this; + } + + /** + * Bond Premium on Treasury obligations + * @return bondPremiumOnTreasuryObligations + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTreasuryObligations() { + return bondPremiumOnTreasuryObligations; + } + + public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + } + + + public Form1099IntRequest bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + return this; + } + + /** + * Bond Premium on tax exempt bond + * @return bondPremiumOnTaxExemptBond + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTaxExemptBond() { + return bondPremiumOnTaxExemptBond; + } + + public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + } + + + public Form1099IntRequest taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + return this; + } + + /** + * Tax exempt bond CUSIP no. + * @return taxExemptBondCusipNumber + */ + @javax.annotation.Nullable + public String getTaxExemptBondCusipNumber() { + return taxExemptBondCusipNumber; + } + + public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + } + + + public Form1099IntRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + public Form1099IntRequest issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Issuer ID + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1099IntRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Reference ID + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099IntRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; + return this; + } + + /** + * Recipient Tax ID Number + * @return recipientTin + */ + @javax.annotation.Nullable + public String getRecipientTin() { + return recipientTin; + } + + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; + } + + + public Form1099IntRequest recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099IntRequest tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1099IntRequest recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Recipient second name + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099IntRequest address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099IntRequest address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Address line 2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099IntRequest city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099IntRequest state(String state) { + this.state = state; + return this; + } + + /** + * US state. Required if CountryCode is \"US\". + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099IntRequest zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Zip/postal code + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099IntRequest email(String email) { + this.email = email; + return this; + } + + /** + * Recipient email address + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099IntRequest accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Account number + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099IntRequest officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Office code + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099IntRequest nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Foreign province + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099IntRequest countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099IntRequest federalEFile(Boolean federalEFile) { + this.federalEFile = federalEFile; + return this; + } + + /** + * Boolean indicating that federal e-filing should be scheduled for this form + * @return federalEFile + */ + @javax.annotation.Nullable + public Boolean getFederalEFile() { + return federalEFile; + } + + public void setFederalEFile(Boolean federalEFile) { + this.federalEFile = federalEFile; + } + + + public Form1099IntRequest postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099IntRequest stateEFile(Boolean stateEFile) { + this.stateEFile = stateEFile; + return this; + } + + /** + * Boolean indicating that state e-filing should be scheduled for this form + * @return stateEFile + */ + @javax.annotation.Nullable + public Boolean getStateEFile() { + return stateEFile; + } + + public void setStateEFile(Boolean stateEFile) { + this.stateEFile = stateEFile; + } + + + public Form1099IntRequest tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099IntRequest noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Indicates whether the recipient has no TIN + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099IntRequest secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice in three years + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099IntRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099IntRequest addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099IntRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * State and local withholding information + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099IntRequest form1099IntRequest = (Form1099IntRequest) o; + return Objects.equals(this.interestIncome, form1099IntRequest.interestIncome) && + Objects.equals(this.earlyWithdrawalPenalty, form1099IntRequest.earlyWithdrawalPenalty) && + Objects.equals(this.usSavingsBondsInterest, form1099IntRequest.usSavingsBondsInterest) && + Objects.equals(this.federalIncomeTaxWithheld, form1099IntRequest.federalIncomeTaxWithheld) && + Objects.equals(this.investmentExpenses, form1099IntRequest.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099IntRequest.foreignTaxPaid) && + Objects.equals(this.foreignCountry, form1099IntRequest.foreignCountry) && + Objects.equals(this.taxExemptInterest, form1099IntRequest.taxExemptInterest) && + Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntRequest.specifiedPrivateActivityBondInterest) && + Objects.equals(this.marketDiscount, form1099IntRequest.marketDiscount) && + Objects.equals(this.bondPremium, form1099IntRequest.bondPremium) && + Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntRequest.bondPremiumOnTreasuryObligations) && + Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntRequest.bondPremiumOnTaxExemptBond) && + Objects.equals(this.taxExemptBondCusipNumber, form1099IntRequest.taxExemptBondCusipNumber) && + Objects.equals(this.type, form1099IntRequest.type) && + Objects.equals(this.issuerId, form1099IntRequest.issuerId) && + Objects.equals(this.referenceId, form1099IntRequest.referenceId) && + Objects.equals(this.recipientTin, form1099IntRequest.recipientTin) && + Objects.equals(this.recipientName, form1099IntRequest.recipientName) && + Objects.equals(this.tinType, form1099IntRequest.tinType) && + Objects.equals(this.recipientSecondName, form1099IntRequest.recipientSecondName) && + Objects.equals(this.address, form1099IntRequest.address) && + Objects.equals(this.address2, form1099IntRequest.address2) && + Objects.equals(this.city, form1099IntRequest.city) && + Objects.equals(this.state, form1099IntRequest.state) && + Objects.equals(this.zip, form1099IntRequest.zip) && + Objects.equals(this.email, form1099IntRequest.email) && + Objects.equals(this.accountNumber, form1099IntRequest.accountNumber) && + Objects.equals(this.officeCode, form1099IntRequest.officeCode) && + Objects.equals(this.nonUsProvince, form1099IntRequest.nonUsProvince) && + Objects.equals(this.countryCode, form1099IntRequest.countryCode) && + Objects.equals(this.federalEFile, form1099IntRequest.federalEFile) && + Objects.equals(this.postalMail, form1099IntRequest.postalMail) && + Objects.equals(this.stateEFile, form1099IntRequest.stateEFile) && + Objects.equals(this.tinMatch, form1099IntRequest.tinMatch) && + Objects.equals(this.noTin, form1099IntRequest.noTin) && + Objects.equals(this.secondTinNotice, form1099IntRequest.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099IntRequest.fatcaFilingRequirement) && + Objects.equals(this.addressVerification, form1099IntRequest.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099IntRequest.stateAndLocalWithholding); + } + + 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(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); + } + + 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 Form1099IntRequest {\n"); + sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); + sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); + sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); + sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); + sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); + sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); + sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); + sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); + sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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("type"); + openapiFields.add("issuerId"); + openapiFields.add("referenceId"); + openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); + openapiFields.add("tinType"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099IntRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099IntRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntRequest is not found in the empty JSON string", Form1099IntRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099IntRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); + } + if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").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("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099IntRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099IntRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099IntRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099IntRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099IntRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099IntRequest + * @throws IOException if the JSON string is invalid with respect to Form1099IntRequest + */ + public static Form1099IntRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099IntRequest.class); + } + + /** + * Convert an instance of Form1099IntRequest 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/Form1099IntResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java new file mode 100644 index 0000000..50a4d9a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java @@ -0,0 +1,1803 @@ +/* + * 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.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1099IntResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099IntResponse { + public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) + private Double interestIncome; + + public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; + @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) + private Double earlyWithdrawalPenalty; + + public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; + @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) + private Double usSavingsBondsInterest; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) + private Double investmentExpenses; + + public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) + private Double foreignTaxPaid; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) + private String foreignCountry; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) + private Double taxExemptInterest; + + public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) + private Double specifiedPrivateActivityBondInterest; + + public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; + @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) + private Double marketDiscount; + + public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) + private Double bondPremium; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) + private Double bondPremiumOnTreasuryObligations; + + public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; + @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) + private Double bondPremiumOnTaxExemptBond; + + public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; + @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) + private String taxExemptBondCusipNumber; + + /** + * Gets or Sets 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 TypeEnum type; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholdingResponse stateAndLocalWithholding; + + /** + * Gets or Sets tinType + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) + private String recipientTin; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_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; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; + @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) + private Boolean federalEFile; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; + @SerializedName(SERIALIZED_NAME_STATE_E_FILE) + private Boolean stateEFile; + + 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_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private StatusDetail eDeliveryStatus; + + 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 StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public Form1099IntResponse() { + } + + public Form1099IntResponse( + TypeEnum type + ) { + this(); + this.type = type; + } + + public Form1099IntResponse interestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + return this; + } + + /** + * Interest Income + * @return interestIncome + */ + @javax.annotation.Nullable + public Double getInterestIncome() { + return interestIncome; + } + + public void setInterestIncome(Double interestIncome) { + this.interestIncome = interestIncome; + } + + + public Form1099IntResponse earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + return this; + } + + /** + * Early Withdrawal Penalty + * @return earlyWithdrawalPenalty + */ + @javax.annotation.Nullable + public Double getEarlyWithdrawalPenalty() { + return earlyWithdrawalPenalty; + } + + public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { + this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; + } + + + public Form1099IntResponse usSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + return this; + } + + /** + * Interest on U.S. Savings Bonds and Treasury obligations + * @return usSavingsBondsInterest + */ + @javax.annotation.Nullable + public Double getUsSavingsBondsInterest() { + return usSavingsBondsInterest; + } + + public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { + this.usSavingsBondsInterest = usSavingsBondsInterest; + } + + + public Form1099IntResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099IntResponse investmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + return this; + } + + /** + * Investment Expenses + * @return investmentExpenses + */ + @javax.annotation.Nullable + public Double getInvestmentExpenses() { + return investmentExpenses; + } + + public void setInvestmentExpenses(Double investmentExpenses) { + this.investmentExpenses = investmentExpenses; + } + + + public Form1099IntResponse foreignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + return this; + } + + /** + * Foreign tax paid + * @return foreignTaxPaid + */ + @javax.annotation.Nullable + public Double getForeignTaxPaid() { + return foreignTaxPaid; + } + + public void setForeignTaxPaid(Double foreignTaxPaid) { + this.foreignTaxPaid = foreignTaxPaid; + } + + + public Form1099IntResponse foreignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + return this; + } + + /** + * Foreign country or U.S. possession + * @return foreignCountry + */ + @javax.annotation.Nullable + public String getForeignCountry() { + return foreignCountry; + } + + public void setForeignCountry(String foreignCountry) { + this.foreignCountry = foreignCountry; + } + + + public Form1099IntResponse taxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + return this; + } + + /** + * Tax-Exempt Interest + * @return taxExemptInterest + */ + @javax.annotation.Nullable + public Double getTaxExemptInterest() { + return taxExemptInterest; + } + + public void setTaxExemptInterest(Double taxExemptInterest) { + this.taxExemptInterest = taxExemptInterest; + } + + + public Form1099IntResponse specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + return this; + } + + /** + * Specified Private activity + * @return specifiedPrivateActivityBondInterest + */ + @javax.annotation.Nullable + public Double getSpecifiedPrivateActivityBondInterest() { + return specifiedPrivateActivityBondInterest; + } + + public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { + this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; + } + + + public Form1099IntResponse marketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + return this; + } + + /** + * Market Discount + * @return marketDiscount + */ + @javax.annotation.Nullable + public Double getMarketDiscount() { + return marketDiscount; + } + + public void setMarketDiscount(Double marketDiscount) { + this.marketDiscount = marketDiscount; + } + + + public Form1099IntResponse bondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + return this; + } + + /** + * Bond Premium + * @return bondPremium + */ + @javax.annotation.Nullable + public Double getBondPremium() { + return bondPremium; + } + + public void setBondPremium(Double bondPremium) { + this.bondPremium = bondPremium; + } + + + public Form1099IntResponse bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + return this; + } + + /** + * Bond Premium on Treasury obligations + * @return bondPremiumOnTreasuryObligations + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTreasuryObligations() { + return bondPremiumOnTreasuryObligations; + } + + public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { + this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; + } + + + public Form1099IntResponse bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + return this; + } + + /** + * Bond Premium on tax exempt bond + * @return bondPremiumOnTaxExemptBond + */ + @javax.annotation.Nullable + public Double getBondPremiumOnTaxExemptBond() { + return bondPremiumOnTaxExemptBond; + } + + public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { + this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; + } + + + public Form1099IntResponse taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + return this; + } + + /** + * Tax exempt bond CUSIP no. + * @return taxExemptBondCusipNumber + */ + @javax.annotation.Nullable + public String getTaxExemptBondCusipNumber() { + return taxExemptBondCusipNumber; + } + + public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { + this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; + } + + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public Form1099IntResponse 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 Form1099IntResponse 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; + } + + + public Form1099IntResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * Get stateAndLocalWithholding + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + public Form1099IntResponse tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1099IntResponse id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1099IntResponse issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1099IntResponse issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099IntResponse issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099IntResponse taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099IntResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099IntResponse recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099IntResponse recipientTin(String recipientTin) { + this.recipientTin = recipientTin; + return this; + } + + /** + * Get recipientTin + * @return recipientTin + */ + @javax.annotation.Nullable + public String getRecipientTin() { + return recipientTin; + } + + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; + } + + + public Form1099IntResponse recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099IntResponse address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099IntResponse address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099IntResponse city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099IntResponse state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099IntResponse zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099IntResponse email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099IntResponse accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099IntResponse officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099IntResponse nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099IntResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099IntResponse 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 Form1099IntResponse postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099IntResponse 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 Form1099IntResponse tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099IntResponse noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099IntResponse secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099IntResponse addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099IntResponse federalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + return this; + } + + /** + * Get federalEfileStatus + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + public void setFederalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + } + + + public Form1099IntResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1099IntResponse stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1099IntResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { + if (this.stateEfileStatus == null) { + this.stateEfileStatus = new ArrayList<>(); + } + this.stateEfileStatus.add(stateEfileStatusItem); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1099IntResponse postalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1099IntResponse tinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1099IntResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1099IntResponse validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1099IntResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { + if (this.validationErrors == null) { + this.validationErrors = new ArrayList<>(); + } + this.validationErrors.add(validationErrorsItem); + return this; + } + + /** + * Get validationErrors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + public void setValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099IntResponse form1099IntResponse = (Form1099IntResponse) o; + return Objects.equals(this.interestIncome, form1099IntResponse.interestIncome) && + Objects.equals(this.earlyWithdrawalPenalty, form1099IntResponse.earlyWithdrawalPenalty) && + Objects.equals(this.usSavingsBondsInterest, form1099IntResponse.usSavingsBondsInterest) && + Objects.equals(this.federalIncomeTaxWithheld, form1099IntResponse.federalIncomeTaxWithheld) && + Objects.equals(this.investmentExpenses, form1099IntResponse.investmentExpenses) && + Objects.equals(this.foreignTaxPaid, form1099IntResponse.foreignTaxPaid) && + Objects.equals(this.foreignCountry, form1099IntResponse.foreignCountry) && + Objects.equals(this.taxExemptInterest, form1099IntResponse.taxExemptInterest) && + Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntResponse.specifiedPrivateActivityBondInterest) && + Objects.equals(this.marketDiscount, form1099IntResponse.marketDiscount) && + Objects.equals(this.bondPremium, form1099IntResponse.bondPremium) && + Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntResponse.bondPremiumOnTreasuryObligations) && + Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntResponse.bondPremiumOnTaxExemptBond) && + Objects.equals(this.taxExemptBondCusipNumber, form1099IntResponse.taxExemptBondCusipNumber) && + Objects.equals(this.type, form1099IntResponse.type) && + Objects.equals(this.createdAt, form1099IntResponse.createdAt) && + Objects.equals(this.updatedAt, form1099IntResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099IntResponse.stateAndLocalWithholding) && + Objects.equals(this.tinType, form1099IntResponse.tinType) && + Objects.equals(this.id, form1099IntResponse.id) && + Objects.equals(this.issuerId, form1099IntResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099IntResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099IntResponse.issuerTin) && + Objects.equals(this.taxYear, form1099IntResponse.taxYear) && + Objects.equals(this.referenceId, form1099IntResponse.referenceId) && + Objects.equals(this.recipientName, form1099IntResponse.recipientName) && + Objects.equals(this.recipientTin, form1099IntResponse.recipientTin) && + Objects.equals(this.recipientSecondName, form1099IntResponse.recipientSecondName) && + Objects.equals(this.address, form1099IntResponse.address) && + Objects.equals(this.address2, form1099IntResponse.address2) && + Objects.equals(this.city, form1099IntResponse.city) && + Objects.equals(this.state, form1099IntResponse.state) && + Objects.equals(this.zip, form1099IntResponse.zip) && + Objects.equals(this.email, form1099IntResponse.email) && + Objects.equals(this.accountNumber, form1099IntResponse.accountNumber) && + Objects.equals(this.officeCode, form1099IntResponse.officeCode) && + Objects.equals(this.nonUsProvince, form1099IntResponse.nonUsProvince) && + Objects.equals(this.countryCode, form1099IntResponse.countryCode) && + Objects.equals(this.federalEFile, form1099IntResponse.federalEFile) && + Objects.equals(this.postalMail, form1099IntResponse.postalMail) && + Objects.equals(this.stateEFile, form1099IntResponse.stateEFile) && + Objects.equals(this.tinMatch, form1099IntResponse.tinMatch) && + Objects.equals(this.noTin, form1099IntResponse.noTin) && + Objects.equals(this.secondTinNotice, form1099IntResponse.secondTinNotice) && + Objects.equals(this.addressVerification, form1099IntResponse.addressVerification) && + Objects.equals(this.federalEfileStatus, form1099IntResponse.federalEfileStatus) && + Objects.equals(this.eDeliveryStatus, form1099IntResponse.eDeliveryStatus) && + Objects.equals(this.stateEfileStatus, form1099IntResponse.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099IntResponse.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099IntResponse.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099IntResponse.addressVerificationStatus) && + Objects.equals(this.validationErrors, form1099IntResponse.validationErrors); + } + + 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(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + } + + 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 Form1099IntResponse {\n"); + sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); + sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); + sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); + sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); + sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); + sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); + sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); + sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); + sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); + sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); + sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); + sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).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("type"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("tinType"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("recipientName"); + openapiFields.add("recipientTin"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("addressVerification"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("validationErrors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099IntResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099IntResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntResponse is not found in the empty JSON string", Form1099IntResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099IntResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); + } + if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + 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("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").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("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099IntResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099IntResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099IntResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099IntResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099IntResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099IntResponse + * @throws IOException if the JSON string is invalid with respect to Form1099IntResponse + */ + public static Form1099IntResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099IntResponse.class); + } + + /** + * Convert an instance of Form1099IntResponse 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/Form1099K.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java index da0727b..954679f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.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 @@ -315,6 +315,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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; @@ -327,10 +331,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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; @@ -359,14 +375,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -1078,6 +1102,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1099K eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1099K referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -1135,6 +1178,25 @@ public void setTinType(String tinType) { } + public Form1099K fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099K tin(String tin) { this.tin = tin; return this; @@ -1154,6 +1216,44 @@ public void setTin(String tin) { } + public Form1099K noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099K secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1099K recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -1287,22 +1387,22 @@ public void setZip(String zip) { } - public Form1099K foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1099K nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -1325,6 +1425,44 @@ public void setCountryCode(String countryCode) { } + public Form1099K accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099K officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1099K validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -1455,10 +1593,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1099K.tinMatchStatus) && Objects.equals(this.addressVerification, form1099K.addressVerification) && Objects.equals(this.addressVerificationStatus, form1099K.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099K.eDeliveryStatus) && Objects.equals(this.referenceId, form1099K.referenceId) && Objects.equals(this.email, form1099K.email) && Objects.equals(this.tinType, form1099K.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099K.fatcaFilingRequirement) && Objects.equals(this.tin, form1099K.tin) && + Objects.equals(this.noTin, form1099K.noTin) && + Objects.equals(this.secondTinNotice, form1099K.secondTinNotice) && Objects.equals(this.recipientName, form1099K.recipientName) && Objects.equals(this.recipientSecondName, form1099K.recipientSecondName) && Objects.equals(this.address, form1099K.address) && @@ -1466,8 +1608,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1099K.city) && Objects.equals(this.state, form1099K.state) && Objects.equals(this.zip, form1099K.zip) && - Objects.equals(this.foreignProvince, form1099K.foreignProvince) && + Objects.equals(this.nonUsProvince, form1099K.nonUsProvince) && Objects.equals(this.countryCode, form1099K.countryCode) && + Objects.equals(this.accountNumber, form1099K.accountNumber) && + Objects.equals(this.officeCode, form1099K.officeCode) && Objects.equals(this.validationErrors, form1099K.validationErrors) && Objects.equals(this.createdAt, form1099K.createdAt) && Objects.equals(this.updatedAt, form1099K.updatedAt) && @@ -1480,7 +1624,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1530,10 +1674,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -1541,8 +1689,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1585,10 +1735,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1596,8 +1750,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1690,6 +1846,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1723,12 +1883,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java index 24bd089..c39406f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java @@ -401,6 +401,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -972,7 +976,7 @@ public Form1099KListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -1010,7 +1014,7 @@ public Form1099KListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1143,7 +1147,7 @@ public Form1099KListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1267,6 +1271,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1099KListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099KListItem addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1360,6 +1383,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1099KListItem.tinMatch) && Objects.equals(this.noTin, form1099KListItem.noTin) && Objects.equals(this.secondTinNotice, form1099KListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099KListItem.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1099KListItem.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099KListItem.stateAndLocalWithholding); } @@ -1370,7 +1394,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1429,6 +1453,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1478,15 +1503,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1565,13 +1588,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1592,7 +1615,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java index 5821e19..82b585e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java @@ -264,7 +264,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -457,6 +459,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -990,7 +996,7 @@ public Form1099KRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -1028,7 +1034,7 @@ public Form1099KRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1161,7 +1167,7 @@ public Form1099KRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1285,6 +1291,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1099KRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099KRequest addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1376,6 +1401,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1099KRequest.tinMatch) && Objects.equals(this.noTin, form1099KRequest.noTin) && Objects.equals(this.secondTinNotice, form1099KRequest.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099KRequest.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1099KRequest.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099KRequest.stateAndLocalWithholding); } @@ -1386,7 +1412,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1443,6 +1469,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -1490,14 +1517,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1520,13 +1545,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099KRequest.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("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); @@ -1577,13 +1595,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1604,7 +1622,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java index a2a6e06..933b185 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java @@ -270,7 +270,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java index c6f1026..7d3535c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java @@ -25,6 +25,7 @@ import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; @@ -98,6 +99,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); + final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); @@ -135,6 +137,12 @@ public void write(JsonWriter out, Form1099ListResponseValueInner value) throws I elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099IntListItemResponse` + if (value.getActualInstance() instanceof Form1099IntListItemResponse) { + JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099KListItemResponse` if (value.getActualInstance() instanceof Form1099KListItemResponse) { JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); @@ -159,7 +167,7 @@ public void write(JsonWriter out, Form1099ListResponseValueInner value) throws I elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } @Override @@ -219,6 +227,18 @@ public Form1099ListResponseValueInner read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); } + // deserialize Form1099IntListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099IntListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099IntListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); + } // deserialize Form1099KListItemResponse try { // validate the JSON object to see if any exception is thrown @@ -297,6 +317,7 @@ public Form1099ListResponseValueInner(Object o) { schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); + schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); @@ -311,7 +332,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * * It could be an instance of the 'oneOf' schemas. */ @@ -337,6 +358,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099IntListItemResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099KListItemResponse) { super.setActualInstance(instance); return; @@ -357,14 +383,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } /** * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) */ @SuppressWarnings("unchecked") @Override @@ -412,6 +438,16 @@ public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCast public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { return (Form1099DivListItemResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099IntListItemResponse` + * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` + */ + public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { + return (Form1099IntListItemResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, * the ClassCastException will be thrown. @@ -495,6 +531,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099IntListItemResponse + try { + Form1099IntListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099KListItemResponse try { Form1099KListItemResponse.validateJsonElement(jsonElement); @@ -528,7 +572,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java index 0706b37..4e541bb 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.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 @@ -85,13 +85,9 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) private Double fishingBoatProceeds; - public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE = "medicalAndHealthCare"; - @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE) - private Double medicalAndHealthCare; - - public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; - @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) - private Double nonemployeeCompensation; + public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS = "medicalAndHealthCarePayments"; + @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) + private Double medicalAndHealthCarePayments; public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) @@ -105,21 +101,25 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) private Double cropInsuranceProceeds; - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE = "excessGoldenParachute"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE) - private Double excessGoldenParachute; + public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; + @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) + private Double excessGoldenParachutePayments; + + public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; + @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) + private Double grossProceedsPaidToAttorney; - public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAID_ATTORNEY = "grossAmountPaidAttorney"; - @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAID_ATTORNEY) - private Double grossAmountPaidAttorney; + public static final String SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE = "fishPurchasedForResale"; + @SerializedName(SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE) + private Double fishPurchasedForResale; public static final String SERIALIZED_NAME_SECTION409_A_DEFERRALS = "section409ADeferrals"; @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) private Double section409ADeferrals; - public static final String SERIALIZED_NAME_SECTION409_A_INCOME = "section409AIncome"; - @SerializedName(SERIALIZED_NAME_SECTION409_A_INCOME) - private Double section409AIncome; + public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; + @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) + private Double nonqualifiedDeferredCompensation; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -185,6 +185,10 @@ public class Form1099Misc { @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; @@ -197,10 +201,22 @@ public class Form1099Misc { @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; @@ -229,14 +245,22 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -351,41 +375,22 @@ public void setFishingBoatProceeds(Double fishingBoatProceeds) { } - public Form1099Misc medicalAndHealthCare(Double medicalAndHealthCare) { - this.medicalAndHealthCare = medicalAndHealthCare; + public Form1099Misc medicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { + this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; return this; } /** - * Get medicalAndHealthCare - * @return medicalAndHealthCare + * Get medicalAndHealthCarePayments + * @return medicalAndHealthCarePayments */ @javax.annotation.Nullable - public Double getMedicalAndHealthCare() { - return medicalAndHealthCare; + public Double getMedicalAndHealthCarePayments() { + return medicalAndHealthCarePayments; } - public void setMedicalAndHealthCare(Double medicalAndHealthCare) { - this.medicalAndHealthCare = medicalAndHealthCare; - } - - - public Form1099Misc nonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - return this; - } - - /** - * Get nonemployeeCompensation - * @return nonemployeeCompensation - */ - @javax.annotation.Nullable - public Double getNonemployeeCompensation() { - return nonemployeeCompensation; - } - - public void setNonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; + public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { + this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; } @@ -446,41 +451,60 @@ public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { } - public Form1099Misc excessGoldenParachute(Double excessGoldenParachute) { - this.excessGoldenParachute = excessGoldenParachute; + public Form1099Misc excessGoldenParachutePayments(Double excessGoldenParachutePayments) { + this.excessGoldenParachutePayments = excessGoldenParachutePayments; + return this; + } + + /** + * Get excessGoldenParachutePayments + * @return excessGoldenParachutePayments + */ + @javax.annotation.Nullable + public Double getExcessGoldenParachutePayments() { + return excessGoldenParachutePayments; + } + + public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { + this.excessGoldenParachutePayments = excessGoldenParachutePayments; + } + + + public Form1099Misc grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { + this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; return this; } /** - * Get excessGoldenParachute - * @return excessGoldenParachute + * Get grossProceedsPaidToAttorney + * @return grossProceedsPaidToAttorney */ @javax.annotation.Nullable - public Double getExcessGoldenParachute() { - return excessGoldenParachute; + public Double getGrossProceedsPaidToAttorney() { + return grossProceedsPaidToAttorney; } - public void setExcessGoldenParachute(Double excessGoldenParachute) { - this.excessGoldenParachute = excessGoldenParachute; + public void setGrossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { + this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; } - public Form1099Misc grossAmountPaidAttorney(Double grossAmountPaidAttorney) { - this.grossAmountPaidAttorney = grossAmountPaidAttorney; + public Form1099Misc fishPurchasedForResale(Double fishPurchasedForResale) { + this.fishPurchasedForResale = fishPurchasedForResale; return this; } /** - * Get grossAmountPaidAttorney - * @return grossAmountPaidAttorney + * Get fishPurchasedForResale + * @return fishPurchasedForResale */ @javax.annotation.Nullable - public Double getGrossAmountPaidAttorney() { - return grossAmountPaidAttorney; + public Double getFishPurchasedForResale() { + return fishPurchasedForResale; } - public void setGrossAmountPaidAttorney(Double grossAmountPaidAttorney) { - this.grossAmountPaidAttorney = grossAmountPaidAttorney; + public void setFishPurchasedForResale(Double fishPurchasedForResale) { + this.fishPurchasedForResale = fishPurchasedForResale; } @@ -503,22 +527,22 @@ public void setSection409ADeferrals(Double section409ADeferrals) { } - public Form1099Misc section409AIncome(Double section409AIncome) { - this.section409AIncome = section409AIncome; + public Form1099Misc nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { + this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; return this; } /** - * Get section409AIncome - * @return section409AIncome + * Get nonqualifiedDeferredCompensation + * @return nonqualifiedDeferredCompensation */ @javax.annotation.Nullable - public Double getSection409AIncome() { - return section409AIncome; + public Double getNonqualifiedDeferredCompensation() { + return nonqualifiedDeferredCompensation; } - public void setSection409AIncome(Double section409AIncome) { - this.section409AIncome = section409AIncome; + public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { + this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; } @@ -834,6 +858,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1099Misc eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1099Misc referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -891,6 +934,25 @@ public void setTinType(String tinType) { } + public Form1099Misc fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099Misc tin(String tin) { this.tin = tin; return this; @@ -910,6 +972,44 @@ public void setTin(String tin) { } + public Form1099Misc noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099Misc secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1099Misc recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -1043,22 +1143,22 @@ public void setZip(String zip) { } - public Form1099Misc foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1099Misc nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -1081,6 +1181,44 @@ public void setCountryCode(String countryCode) { } + public Form1099Misc accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099Misc officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1099Misc validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -1180,15 +1318,15 @@ public boolean equals(Object o) { Objects.equals(this.otherIncome, form1099Misc.otherIncome) && Objects.equals(this.fedIncomeTaxWithheld, form1099Misc.fedIncomeTaxWithheld) && Objects.equals(this.fishingBoatProceeds, form1099Misc.fishingBoatProceeds) && - Objects.equals(this.medicalAndHealthCare, form1099Misc.medicalAndHealthCare) && - Objects.equals(this.nonemployeeCompensation, form1099Misc.nonemployeeCompensation) && + Objects.equals(this.medicalAndHealthCarePayments, form1099Misc.medicalAndHealthCarePayments) && Objects.equals(this.substitutePayments, form1099Misc.substitutePayments) && Objects.equals(this.directSalesIndicator, form1099Misc.directSalesIndicator) && Objects.equals(this.cropInsuranceProceeds, form1099Misc.cropInsuranceProceeds) && - Objects.equals(this.excessGoldenParachute, form1099Misc.excessGoldenParachute) && - Objects.equals(this.grossAmountPaidAttorney, form1099Misc.grossAmountPaidAttorney) && + Objects.equals(this.excessGoldenParachutePayments, form1099Misc.excessGoldenParachutePayments) && + Objects.equals(this.grossProceedsPaidToAttorney, form1099Misc.grossProceedsPaidToAttorney) && + Objects.equals(this.fishPurchasedForResale, form1099Misc.fishPurchasedForResale) && Objects.equals(this.section409ADeferrals, form1099Misc.section409ADeferrals) && - Objects.equals(this.section409AIncome, form1099Misc.section409AIncome) && + Objects.equals(this.nonqualifiedDeferredCompensation, form1099Misc.nonqualifiedDeferredCompensation) && Objects.equals(this.id, form1099Misc.id) && Objects.equals(this.type, form1099Misc.type) && Objects.equals(this.issuerId, form1099Misc.issuerId) && @@ -1205,10 +1343,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1099Misc.tinMatchStatus) && Objects.equals(this.addressVerification, form1099Misc.addressVerification) && Objects.equals(this.addressVerificationStatus, form1099Misc.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Misc.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Misc.referenceId) && Objects.equals(this.email, form1099Misc.email) && Objects.equals(this.tinType, form1099Misc.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099Misc.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Misc.tin) && + Objects.equals(this.noTin, form1099Misc.noTin) && + Objects.equals(this.secondTinNotice, form1099Misc.secondTinNotice) && Objects.equals(this.recipientName, form1099Misc.recipientName) && Objects.equals(this.recipientSecondName, form1099Misc.recipientSecondName) && Objects.equals(this.address, form1099Misc.address) && @@ -1216,8 +1358,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1099Misc.city) && Objects.equals(this.state, form1099Misc.state) && Objects.equals(this.zip, form1099Misc.zip) && - Objects.equals(this.foreignProvince, form1099Misc.foreignProvince) && + Objects.equals(this.nonUsProvince, form1099Misc.nonUsProvince) && Objects.equals(this.countryCode, form1099Misc.countryCode) && + Objects.equals(this.accountNumber, form1099Misc.accountNumber) && + Objects.equals(this.officeCode, form1099Misc.officeCode) && Objects.equals(this.validationErrors, form1099Misc.validationErrors) && Objects.equals(this.createdAt, form1099Misc.createdAt) && Objects.equals(this.updatedAt, form1099Misc.updatedAt) && @@ -1230,7 +1374,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCare, nonemployeeCompensation, substitutePayments, directSalesIndicator, cropInsuranceProceeds, excessGoldenParachute, grossAmountPaidAttorney, section409ADeferrals, section409AIncome, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, substitutePayments, directSalesIndicator, cropInsuranceProceeds, excessGoldenParachutePayments, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, nonqualifiedDeferredCompensation, 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1249,15 +1393,15 @@ public String toString() { sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); - sb.append(" medicalAndHealthCare: ").append(toIndentedString(medicalAndHealthCare)).append("\n"); - sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); + sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" excessGoldenParachute: ").append(toIndentedString(excessGoldenParachute)).append("\n"); - sb.append(" grossAmountPaidAttorney: ").append(toIndentedString(grossAmountPaidAttorney)).append("\n"); + sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); + sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); + sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); - sb.append(" section409AIncome: ").append(toIndentedString(section409AIncome)).append("\n"); + sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); @@ -1274,10 +1418,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -1285,8 +1433,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1329,10 +1479,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1340,8 +1494,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1414,6 +1570,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1447,12 +1607,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java index 1d14451..8aa519b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java @@ -751,7 +751,7 @@ public Form1099MiscListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -789,7 +789,7 @@ public Form1099MiscListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -922,7 +922,7 @@ public Form1099MiscListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1247,15 +1247,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1314,13 +1312,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1341,7 +1339,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java index 4075168..a5020ca 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java @@ -138,7 +138,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -769,7 +771,7 @@ public Form1099MiscRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -807,7 +809,7 @@ public Form1099MiscRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -940,7 +942,7 @@ public Form1099MiscRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1259,14 +1261,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1289,13 +1289,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099MiscRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -1326,13 +1319,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1353,7 +1346,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java index f2c8a7c..12c2960 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java @@ -144,7 +144,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java index 622a0cb..08f576d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.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 @@ -141,6 +141,10 @@ public class Form1099Nec { @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; @@ -153,10 +157,22 @@ public class Form1099Nec { @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; @@ -185,14 +201,22 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -581,6 +605,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1099Nec eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1099Nec referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -638,6 +681,25 @@ public void setTinType(String tinType) { } + public Form1099Nec fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099Nec tin(String tin) { this.tin = tin; return this; @@ -657,6 +719,44 @@ public void setTin(String tin) { } + public Form1099Nec noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099Nec secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1099Nec recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -790,22 +890,22 @@ public void setZip(String zip) { } - public Form1099Nec foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1099Nec nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -828,6 +928,44 @@ public void setCountryCode(String countryCode) { } + public Form1099Nec accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099Nec officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1099Nec validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -941,10 +1079,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1099Nec.tinMatchStatus) && Objects.equals(this.addressVerification, form1099Nec.addressVerification) && Objects.equals(this.addressVerificationStatus, form1099Nec.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Nec.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Nec.referenceId) && Objects.equals(this.email, form1099Nec.email) && Objects.equals(this.tinType, form1099Nec.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099Nec.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Nec.tin) && + Objects.equals(this.noTin, form1099Nec.noTin) && + Objects.equals(this.secondTinNotice, form1099Nec.secondTinNotice) && Objects.equals(this.recipientName, form1099Nec.recipientName) && Objects.equals(this.recipientSecondName, form1099Nec.recipientSecondName) && Objects.equals(this.address, form1099Nec.address) && @@ -952,8 +1094,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1099Nec.city) && Objects.equals(this.state, form1099Nec.state) && Objects.equals(this.zip, form1099Nec.zip) && - Objects.equals(this.foreignProvince, form1099Nec.foreignProvince) && + Objects.equals(this.nonUsProvince, form1099Nec.nonUsProvince) && Objects.equals(this.countryCode, form1099Nec.countryCode) && + Objects.equals(this.accountNumber, form1099Nec.accountNumber) && + Objects.equals(this.officeCode, form1099Nec.officeCode) && Objects.equals(this.validationErrors, form1099Nec.validationErrors) && Objects.equals(this.createdAt, form1099Nec.createdAt) && Objects.equals(this.updatedAt, form1099Nec.updatedAt) && @@ -966,7 +1110,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nonemployeeCompensation, federalIncomeTaxWithheld, directSalesIndicator, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(nonemployeeCompensation, federalIncomeTaxWithheld, directSalesIndicator, 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); } private static int hashCodeNullable(JsonNullable a) { @@ -999,10 +1143,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -1010,8 +1158,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1054,10 +1204,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1065,8 +1219,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1139,6 +1295,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1172,12 +1332,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java index d45a472..aa66566 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java @@ -227,6 +227,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -475,7 +479,7 @@ public Form1099NecListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -513,7 +517,7 @@ public Form1099NecListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -646,7 +650,7 @@ public Form1099NecListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -770,6 +774,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1099NecListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099NecListItem addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -846,6 +869,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1099NecListItem.tinMatch) && Objects.equals(this.noTin, form1099NecListItem.noTin) && Objects.equals(this.secondTinNotice, form1099NecListItem.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099NecListItem.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1099NecListItem.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099NecListItem.stateAndLocalWithholding); } @@ -856,7 +880,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -898,6 +922,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -947,6 +972,7 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); @@ -954,9 +980,6 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("nonemployeeCompensation"); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1015,13 +1038,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1042,7 +1065,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java index f482f94..11f994e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java @@ -90,7 +90,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -283,6 +285,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -493,7 +499,7 @@ public Form1099NecRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -531,7 +537,7 @@ public Form1099NecRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -664,7 +670,7 @@ public Form1099NecRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -788,6 +794,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public Form1099NecRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099NecRequest addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -862,6 +887,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, form1099NecRequest.tinMatch) && Objects.equals(this.noTin, form1099NecRequest.noTin) && Objects.equals(this.secondTinNotice, form1099NecRequest.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, form1099NecRequest.fatcaFilingRequirement) && Objects.equals(this.addressVerification, form1099NecRequest.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099NecRequest.stateAndLocalWithholding); } @@ -872,7 +898,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -912,6 +938,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -959,15 +986,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("nonemployeeCompensation"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1027,13 +1052,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1054,7 +1079,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java index 388cde1..51ef70b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java @@ -96,7 +96,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java index 7a1098e..6b54a19 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java @@ -21,13 +21,17 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.Data; +import Avalara.SDK.model.A1099.V2.Form1099ProccessResultProcessedFormsInner; 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.ArrayList; import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,6 +66,10 @@ public class Form1099ProccessResult { @SerializedName(SERIALIZED_NAME_JOB_DATA) private Data jobData; + public static final String SERIALIZED_NAME_PROCESSED_FORMS = "processedForms"; + @SerializedName(SERIALIZED_NAME_PROCESSED_FORMS) + private List processedForms; + public Form1099ProccessResult() { } @@ -84,6 +92,33 @@ public void setJobData(Data jobData) { } + public Form1099ProccessResult processedForms(List processedForms) { + this.processedForms = processedForms; + return this; + } + + public Form1099ProccessResult addProcessedFormsItem(Form1099ProccessResultProcessedFormsInner processedFormsItem) { + if (this.processedForms == null) { + this.processedForms = new ArrayList<>(); + } + this.processedForms.add(processedFormsItem); + return this; + } + + /** + * Get processedForms + * @return processedForms + */ + @javax.annotation.Nullable + public List getProcessedForms() { + return processedForms; + } + + public void setProcessedForms(List processedForms) { + this.processedForms = processedForms; + } + + @Override public boolean equals(Object o) { @@ -94,12 +129,24 @@ public boolean equals(Object o) { return false; } Form1099ProccessResult form1099ProccessResult = (Form1099ProccessResult) o; - return Objects.equals(this.jobData, form1099ProccessResult.jobData); + return Objects.equals(this.jobData, form1099ProccessResult.jobData) && + Objects.equals(this.processedForms, form1099ProccessResult.processedForms); + } + + 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(jobData); + return Objects.hash(jobData, processedForms); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -107,6 +154,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099ProccessResult {\n"); sb.append(" jobData: ").append(toIndentedString(jobData)).append("\n"); + sb.append(" processedForms: ").append(toIndentedString(processedForms)).append("\n"); sb.append("}"); return sb.toString(); } @@ -130,6 +178,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("jobData"); + openapiFields.add("processedForms"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -160,6 +209,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("jobData") != null && !jsonObj.get("jobData").isJsonNull()) { Data.validateJsonElement(jsonObj.get("jobData")); } + if (jsonObj.get("processedForms") != null && !jsonObj.get("processedForms").isJsonNull()) { + JsonArray jsonArrayprocessedForms = jsonObj.getAsJsonArray("processedForms"); + if (jsonArrayprocessedForms != null) { + // ensure the json data is an array + if (!jsonObj.get("processedForms").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `processedForms` to be an array in the JSON string but got `%s`", jsonObj.get("processedForms").toString())); + } + + // validate the optional field `processedForms` (array) + for (int i = 0; i < jsonArrayprocessedForms.size(); i++) { + Form1099ProccessResultProcessedFormsInner.validateJsonElement(jsonArrayprocessedForms.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java new file mode 100644 index 0000000..76d2865 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java @@ -0,0 +1,555 @@ +/* + * 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.CoveredIndividualReference; +import Avalara.SDK.model.A1099.V2.Form1042S; +import Avalara.SDK.model.A1099.V2.Form1095B; +import Avalara.SDK.model.A1099.V2.Form1099Div; +import Avalara.SDK.model.A1099.V2.Form1099Int; +import Avalara.SDK.model.A1099.V2.Form1099K; +import Avalara.SDK.model.A1099.V2.Form1099Misc; +import Avalara.SDK.model.A1099.V2.Form1099Nec; +import Avalara.SDK.model.A1099.V2.Form1099R; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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 Form1099ProccessResultProcessedFormsInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Form1099ProccessResultProcessedFormsInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099ProccessResultProcessedFormsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099ProccessResultProcessedFormsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterForm1042S = gson.getDelegateAdapter(this, TypeToken.get(Form1042S.class)); + final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.class)); + final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); + final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); + final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); + final TypeAdapter adapterForm1099Misc = gson.getDelegateAdapter(this, TypeToken.get(Form1099Misc.class)); + final TypeAdapter adapterForm1099Nec = gson.getDelegateAdapter(this, TypeToken.get(Form1099Nec.class)); + final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099ProccessResultProcessedFormsInner value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Form1042S` + if (value.getActualInstance() instanceof Form1042S) { + JsonElement element = adapterForm1042S.toJsonTree((Form1042S)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1095B` + if (value.getActualInstance() instanceof Form1095B) { + JsonElement element = adapterForm1095B.toJsonTree((Form1095B)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099Div` + if (value.getActualInstance() instanceof Form1099Div) { + JsonElement element = adapterForm1099Div.toJsonTree((Form1099Div)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099Int` + if (value.getActualInstance() instanceof Form1099Int) { + JsonElement element = adapterForm1099Int.toJsonTree((Form1099Int)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099K` + if (value.getActualInstance() instanceof Form1099K) { + JsonElement element = adapterForm1099K.toJsonTree((Form1099K)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099Misc` + if (value.getActualInstance() instanceof Form1099Misc) { + JsonElement element = adapterForm1099Misc.toJsonTree((Form1099Misc)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099Nec` + if (value.getActualInstance() instanceof Form1099Nec) { + JsonElement element = adapterForm1099Nec.toJsonTree((Form1099Nec)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099R` + if (value.getActualInstance() instanceof Form1099R) { + JsonElement element = adapterForm1099R.toJsonTree((Form1099R)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); + } + + @Override + public Form1099ProccessResultProcessedFormsInner read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Form1042S + try { + // validate the JSON object to see if any exception is thrown + Form1042S.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042S; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1042S'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042S'", e); + } + // deserialize Form1095B + try { + // validate the JSON object to see if any exception is thrown + Form1095B.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095B; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1095B'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095B'", e); + } + // deserialize Form1099Div + try { + // validate the JSON object to see if any exception is thrown + Form1099Div.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Div; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099Div'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Div'", e); + } + // deserialize Form1099Int + try { + // validate the JSON object to see if any exception is thrown + Form1099Int.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Int; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099Int'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Int'", e); + } + // deserialize Form1099K + try { + // validate the JSON object to see if any exception is thrown + Form1099K.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099K; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099K'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099K'", e); + } + // deserialize Form1099Misc + try { + // validate the JSON object to see if any exception is thrown + Form1099Misc.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Misc; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099Misc'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Misc'", e); + } + // deserialize Form1099Nec + try { + // validate the JSON object to see if any exception is thrown + Form1099Nec.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Nec; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099Nec'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Nec'", e); + } + // deserialize Form1099R + try { + // validate the JSON object to see if any exception is thrown + Form1099R.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099R; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099R'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099R'", e); + } + + if (match == 1) { + Form1099ProccessResultProcessedFormsInner ret = new Form1099ProccessResultProcessedFormsInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for Form1099ProccessResultProcessedFormsInner: %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 Form1099ProccessResultProcessedFormsInner() { + super("oneOf", Boolean.FALSE); + } + + public Form1099ProccessResultProcessedFormsInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Form1042S", Form1042S.class); + schemas.put("Form1095B", Form1095B.class); + schemas.put("Form1099Div", Form1099Div.class); + schemas.put("Form1099Int", Form1099Int.class); + schemas.put("Form1099K", Form1099K.class); + schemas.put("Form1099Misc", Form1099Misc.class); + schemas.put("Form1099Nec", Form1099Nec.class); + schemas.put("Form1099R", Form1099R.class); + } + + @Override + public Map> getSchemas() { + return Form1099ProccessResultProcessedFormsInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Form1042S) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1095B) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099Div) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099Int) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099K) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099Misc) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099Nec) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099R) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); + } + + /** + * Get the actual instance, which can be the following: + * Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R + * + * @return The actual instance (Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Form1042S`. If the actual instance is not `Form1042S`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1042S` + * @throws ClassCastException if the instance is not `Form1042S` + */ + public Form1042S getForm1042S() throws ClassCastException { + return (Form1042S)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1095B`. If the actual instance is not `Form1095B`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1095B` + * @throws ClassCastException if the instance is not `Form1095B` + */ + public Form1095B getForm1095B() throws ClassCastException { + return (Form1095B)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099Div`. If the actual instance is not `Form1099Div`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099Div` + * @throws ClassCastException if the instance is not `Form1099Div` + */ + public Form1099Div getForm1099Div() throws ClassCastException { + return (Form1099Div)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099Int`. If the actual instance is not `Form1099Int`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099Int` + * @throws ClassCastException if the instance is not `Form1099Int` + */ + public Form1099Int getForm1099Int() throws ClassCastException { + return (Form1099Int)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099K`. If the actual instance is not `Form1099K`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099K` + * @throws ClassCastException if the instance is not `Form1099K` + */ + public Form1099K getForm1099K() throws ClassCastException { + return (Form1099K)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099Misc`. If the actual instance is not `Form1099Misc`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099Misc` + * @throws ClassCastException if the instance is not `Form1099Misc` + */ + public Form1099Misc getForm1099Misc() throws ClassCastException { + return (Form1099Misc)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099Nec`. If the actual instance is not `Form1099Nec`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099Nec` + * @throws ClassCastException if the instance is not `Form1099Nec` + */ + public Form1099Nec getForm1099Nec() throws ClassCastException { + return (Form1099Nec)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099R`. If the actual instance is not `Form1099R`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099R` + * @throws ClassCastException if the instance is not `Form1099R` + */ + public Form1099R getForm1099R() throws ClassCastException { + return (Form1099R)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 Form1099ProccessResultProcessedFormsInner + */ + 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 Form1042S + try { + Form1042S.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1095B + try { + Form1095B.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099Div + try { + Form1099Div.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099Int + try { + Form1099Int.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099K + try { + Form1099K.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099Misc + try { + Form1099Misc.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099Nec + try { + Form1099Nec.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099R + try { + Form1099R.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for Form1099ProccessResultProcessedFormsInner with oneOf schemas: Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R. %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 Form1099ProccessResultProcessedFormsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099ProccessResultProcessedFormsInner + * @throws IOException if the JSON string is invalid with respect to Form1099ProccessResultProcessedFormsInner + */ + public static Form1099ProccessResultProcessedFormsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099ProccessResultProcessedFormsInner.class); + } + + /** + * Convert an instance of Form1099ProccessResultProcessedFormsInner 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/Form1099R.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java index efa13bd..8da8c18 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.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 @@ -137,10 +137,6 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB) private String firstYearDesignatedRothContrib; - public static final String SERIALIZED_NAME_FATCA_REQUIREMENT_INDICATOR = "fatcaRequirementIndicator"; - @SerializedName(SERIALIZED_NAME_FATCA_REQUIREMENT_INDICATOR) - private Boolean fatcaRequirementIndicator; - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) private String dateOfPayment; @@ -209,6 +205,10 @@ public class Form1099R { @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; @@ -221,10 +221,22 @@ public class Form1099R { @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; @@ -253,14 +265,22 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; @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_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -622,25 +642,6 @@ public void setFirstYearDesignatedRothContrib(String firstYearDesignatedRothCont } - public Form1099R fatcaRequirementIndicator(Boolean fatcaRequirementIndicator) { - this.fatcaRequirementIndicator = fatcaRequirementIndicator; - return this; - } - - /** - * Get fatcaRequirementIndicator - * @return fatcaRequirementIndicator - */ - @javax.annotation.Nullable - public Boolean getFatcaRequirementIndicator() { - return fatcaRequirementIndicator; - } - - public void setFatcaRequirementIndicator(Boolean fatcaRequirementIndicator) { - this.fatcaRequirementIndicator = fatcaRequirementIndicator; - } - - public Form1099R dateOfPayment(String dateOfPayment) { this.dateOfPayment = dateOfPayment; return this; @@ -972,6 +973,25 @@ public void setAddressVerificationStatus(Form1099StatusDetail addressVerificatio } + public Form1099R eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + public Form1099R referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -1029,6 +1049,25 @@ public void setTinType(String tinType) { } + public Form1099R fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Get fatcaFilingRequirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public Form1099R tin(String tin) { this.tin = tin; return this; @@ -1048,6 +1087,44 @@ public void setTin(String tin) { } + public Form1099R noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099R secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + public Form1099R recipientName(String recipientName) { this.recipientName = recipientName; return this; @@ -1181,22 +1258,22 @@ public void setZip(String zip) { } - public Form1099R foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public Form1099R nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get foreignProvince - * @return foreignProvince + * Get nonUsProvince + * @return nonUsProvince */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getNonUsProvince() { + return nonUsProvince; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } @@ -1219,6 +1296,44 @@ public void setCountryCode(String countryCode) { } + public Form1099R accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099R officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + public Form1099R validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; @@ -1331,7 +1446,6 @@ public boolean equals(Object o) { Objects.equals(this.totalEmployeeContributions, form1099R.totalEmployeeContributions) && Objects.equals(this.amountAllocableToIrr, form1099R.amountAllocableToIrr) && Objects.equals(this.firstYearDesignatedRothContrib, form1099R.firstYearDesignatedRothContrib) && - Objects.equals(this.fatcaRequirementIndicator, form1099R.fatcaRequirementIndicator) && Objects.equals(this.dateOfPayment, form1099R.dateOfPayment) && Objects.equals(this.id, form1099R.id) && Objects.equals(this.type, form1099R.type) && @@ -1349,10 +1463,14 @@ public boolean equals(Object o) { Objects.equals(this.tinMatchStatus, form1099R.tinMatchStatus) && Objects.equals(this.addressVerification, form1099R.addressVerification) && Objects.equals(this.addressVerificationStatus, form1099R.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099R.eDeliveryStatus) && Objects.equals(this.referenceId, form1099R.referenceId) && Objects.equals(this.email, form1099R.email) && Objects.equals(this.tinType, form1099R.tinType) && + Objects.equals(this.fatcaFilingRequirement, form1099R.fatcaFilingRequirement) && Objects.equals(this.tin, form1099R.tin) && + Objects.equals(this.noTin, form1099R.noTin) && + Objects.equals(this.secondTinNotice, form1099R.secondTinNotice) && Objects.equals(this.recipientName, form1099R.recipientName) && Objects.equals(this.recipientSecondName, form1099R.recipientSecondName) && Objects.equals(this.address, form1099R.address) && @@ -1360,8 +1478,10 @@ public boolean equals(Object o) { Objects.equals(this.city, form1099R.city) && Objects.equals(this.state, form1099R.state) && Objects.equals(this.zip, form1099R.zip) && - Objects.equals(this.foreignProvince, form1099R.foreignProvince) && + Objects.equals(this.nonUsProvince, form1099R.nonUsProvince) && Objects.equals(this.countryCode, form1099R.countryCode) && + Objects.equals(this.accountNumber, form1099R.accountNumber) && + Objects.equals(this.officeCode, form1099R.officeCode) && Objects.equals(this.validationErrors, form1099R.validationErrors) && Objects.equals(this.createdAt, form1099R.createdAt) && Objects.equals(this.updatedAt, form1099R.updatedAt) && @@ -1374,7 +1494,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, fatcaRequirementIndicator, dateOfPayment, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, dateOfPayment, 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1406,7 +1526,6 @@ public String toString() { sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); sb.append(" amountAllocableToIrr: ").append(toIndentedString(amountAllocableToIrr)).append("\n"); sb.append(" firstYearDesignatedRothContrib: ").append(toIndentedString(firstYearDesignatedRothContrib)).append("\n"); - sb.append(" fatcaRequirementIndicator: ").append(toIndentedString(fatcaRequirementIndicator)).append("\n"); sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); @@ -1424,10 +1543,14 @@ public String toString() { sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -1435,8 +1558,10 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); @@ -1479,10 +1604,14 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerification"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); openapiFields.add("email"); openapiFields.add("tinType"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1490,8 +1619,10 @@ private String toIndentedString(Object o) { openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("foreignProvince"); + openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); @@ -1582,6 +1713,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } 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())); } @@ -1615,12 +1750,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java index 2d45484..488da4e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java @@ -1079,7 +1079,7 @@ public Form1099RListItem address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -1117,7 +1117,7 @@ public Form1099RListItem city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1250,7 +1250,7 @@ public Form1099RListItem countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1585,15 +1585,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1672,13 +1670,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1699,7 +1697,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java index 8c0c12e..fa5db96 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java @@ -137,10 +137,6 @@ public class Form1099RListItemResponse { @SerializedName(SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB) private String firstYearDesignatedRothContrib; - public static final String SERIALIZED_NAME_FATCA_REQUIREMENT_INDICATOR = "fatcaRequirementIndicator"; - @SerializedName(SERIALIZED_NAME_FATCA_REQUIREMENT_INDICATOR) - private Boolean fatcaRequirementIndicator; - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) private String dateOfPayment; @@ -671,25 +667,6 @@ public void setFirstYearDesignatedRothContrib(String firstYearDesignatedRothCont } - public Form1099RListItemResponse fatcaRequirementIndicator(Boolean fatcaRequirementIndicator) { - this.fatcaRequirementIndicator = fatcaRequirementIndicator; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaRequirementIndicator - */ - @javax.annotation.Nullable - public Boolean getFatcaRequirementIndicator() { - return fatcaRequirementIndicator; - } - - public void setFatcaRequirementIndicator(Boolean fatcaRequirementIndicator) { - this.fatcaRequirementIndicator = fatcaRequirementIndicator; - } - - public Form1099RListItemResponse dateOfPayment(String dateOfPayment) { this.dateOfPayment = dateOfPayment; return this; @@ -1398,7 +1375,6 @@ public boolean equals(Object o) { Objects.equals(this.totalEmployeeContributions, form1099RListItemResponse.totalEmployeeContributions) && Objects.equals(this.amountAllocableToIrr, form1099RListItemResponse.amountAllocableToIrr) && Objects.equals(this.firstYearDesignatedRothContrib, form1099RListItemResponse.firstYearDesignatedRothContrib) && - Objects.equals(this.fatcaRequirementIndicator, form1099RListItemResponse.fatcaRequirementIndicator) && Objects.equals(this.dateOfPayment, form1099RListItemResponse.dateOfPayment) && Objects.equals(this.id, form1099RListItemResponse.id) && Objects.equals(this.type, form1099RListItemResponse.type) && @@ -1447,7 +1423,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, fatcaRequirementIndicator, dateOfPayment, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, dateOfPayment, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1479,7 +1455,6 @@ public String toString() { sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); sb.append(" amountAllocableToIrr: ").append(toIndentedString(amountAllocableToIrr)).append("\n"); sb.append(" firstYearDesignatedRothContrib: ").append(toIndentedString(firstYearDesignatedRothContrib)).append("\n"); - sb.append(" fatcaRequirementIndicator: ").append(toIndentedString(fatcaRequirementIndicator)).append("\n"); sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java index bc329bb..a15c702 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java @@ -159,7 +159,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -885,7 +887,7 @@ public Form1099RRequest address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -923,7 +925,7 @@ public Form1099RRequest city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -1056,7 +1058,7 @@ public Form1099RRequest countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -1385,14 +1387,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -1415,13 +1415,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099RRequest.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("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); @@ -1467,13 +1460,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -1494,7 +1487,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java new file mode 100644 index 0000000..5043153 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java @@ -0,0 +1,1962 @@ +/* + * 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.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Form1099RResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099RResponse { + public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; + @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) + private Double grossDistribution; + + public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; + @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) + private Double taxableAmount; + + public static final String SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED = "taxableAmountNotDetermined"; + @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) + private Boolean taxableAmountNotDetermined; + + public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED = "totalDistributionDetermined"; + @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED) + private Boolean totalDistributionDetermined; + + public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; + @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) + private Double capitalGain; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS = "employeeContributionsOrDesignatedRothOrInsurancePremiums"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS) + private Double employeeContributionsOrDesignatedRothOrInsurancePremiums; + + public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES = "netUnrealizedAppreciationInEmployerSecurities"; + @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES) + private Double netUnrealizedAppreciationInEmployerSecurities; + + public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) + private String distributionCode; + + public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode"; + @SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE) + private String secondDistributionCode; + + public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple"; + @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) + private Boolean iraSepSimple; + + public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; + @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) + private Double traditionalIraSepSimpleOrRothConversionAmount; + + public static final String SERIALIZED_NAME_OTHER_AMOUNT = "otherAmount"; + @SerializedName(SERIALIZED_NAME_OTHER_AMOUNT) + private Double otherAmount; + + public static final String SERIALIZED_NAME_OTHER_PERCENTAGE = "otherPercentage"; + @SerializedName(SERIALIZED_NAME_OTHER_PERCENTAGE) + private String otherPercentage; + + public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE = "totalDistributionPercentage"; + @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE) + private String totalDistributionPercentage; + + public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; + @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) + private Double totalEmployeeContributions; + + public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS = "amountAllocableToIrrWithin5Years"; + @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS) + private Double amountAllocableToIrrWithin5Years; + + public static final String SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION = "firstYearOfDesignatedRothContribution"; + @SerializedName(SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION) + private String firstYearOfDesignatedRothContribution; + + 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_DATE_OF_PAYMENT = "dateOfPayment"; + @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) + private OffsetDateTime dateOfPayment; + + /** + * Gets or Sets 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 TypeEnum type; + + 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 static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholdingResponse stateAndLocalWithholding; + + /** + * Gets or Sets tinType + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) + private String recipientTin; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_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; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; + @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) + private Boolean federalEFile; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; + @SerializedName(SERIALIZED_NAME_STATE_E_FILE) + private Boolean stateEFile; + + 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_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private StatusDetail eDeliveryStatus; + + 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 StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public Form1099RResponse() { + } + + public Form1099RResponse( + TypeEnum type + ) { + this(); + this.type = type; + } + + public Form1099RResponse grossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; + return this; + } + + /** + * Gross distribution + * @return grossDistribution + */ + @javax.annotation.Nullable + public Double getGrossDistribution() { + return grossDistribution; + } + + public void setGrossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; + } + + + public Form1099RResponse taxableAmount(Double taxableAmount) { + this.taxableAmount = taxableAmount; + return this; + } + + /** + * Taxable amount + * @return taxableAmount + */ + @javax.annotation.Nullable + public Double getTaxableAmount() { + return taxableAmount; + } + + public void setTaxableAmount(Double taxableAmount) { + this.taxableAmount = taxableAmount; + } + + + public Form1099RResponse taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { + this.taxableAmountNotDetermined = taxableAmountNotDetermined; + return this; + } + + /** + * Taxable amount not determined + * @return taxableAmountNotDetermined + */ + @javax.annotation.Nullable + public Boolean getTaxableAmountNotDetermined() { + return taxableAmountNotDetermined; + } + + public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { + this.taxableAmountNotDetermined = taxableAmountNotDetermined; + } + + + public Form1099RResponse totalDistributionDetermined(Boolean totalDistributionDetermined) { + this.totalDistributionDetermined = totalDistributionDetermined; + return this; + } + + /** + * Total distribution + * @return totalDistributionDetermined + */ + @javax.annotation.Nullable + public Boolean getTotalDistributionDetermined() { + return totalDistributionDetermined; + } + + public void setTotalDistributionDetermined(Boolean totalDistributionDetermined) { + this.totalDistributionDetermined = totalDistributionDetermined; + } + + + public Form1099RResponse capitalGain(Double capitalGain) { + this.capitalGain = capitalGain; + return this; + } + + /** + * Capital gain (included in Box 2a) + * @return capitalGain + */ + @javax.annotation.Nullable + public Double getCapitalGain() { + return capitalGain; + } + + public void setCapitalGain(Double capitalGain) { + this.capitalGain = capitalGain; + } + + + public Form1099RResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099RResponse employeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { + this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; + return this; + } + + /** + * Employee contributions/Designated Roth contributions or insurance premiums + * @return employeeContributionsOrDesignatedRothOrInsurancePremiums + */ + @javax.annotation.Nullable + public Double getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { + return employeeContributionsOrDesignatedRothOrInsurancePremiums; + } + + public void setEmployeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { + this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; + } + + + public Form1099RResponse netUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { + this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; + return this; + } + + /** + * Net unrealized appreciation in employer's securities + * @return netUnrealizedAppreciationInEmployerSecurities + */ + @javax.annotation.Nullable + public Double getNetUnrealizedAppreciationInEmployerSecurities() { + return netUnrealizedAppreciationInEmployerSecurities; + } + + public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { + this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; + } + + + public Form1099RResponse distributionCode(String distributionCode) { + this.distributionCode = distributionCode; + return this; + } + + /** + * Distribution code + * @return distributionCode + */ + @javax.annotation.Nullable + public String getDistributionCode() { + return distributionCode; + } + + public void setDistributionCode(String distributionCode) { + this.distributionCode = distributionCode; + } + + + public Form1099RResponse secondDistributionCode(String secondDistributionCode) { + this.secondDistributionCode = secondDistributionCode; + return this; + } + + /** + * Second distribution code + * @return secondDistributionCode + */ + @javax.annotation.Nullable + public String getSecondDistributionCode() { + return secondDistributionCode; + } + + public void setSecondDistributionCode(String secondDistributionCode) { + this.secondDistributionCode = secondDistributionCode; + } + + + public Form1099RResponse iraSepSimple(Boolean iraSepSimple) { + this.iraSepSimple = iraSepSimple; + return this; + } + + /** + * IRA/SEP/SIMPLE + * @return iraSepSimple + */ + @javax.annotation.Nullable + public Boolean getIraSepSimple() { + return iraSepSimple; + } + + public void setIraSepSimple(Boolean iraSepSimple) { + this.iraSepSimple = iraSepSimple; + } + + + public Form1099RResponse traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { + this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; + return this; + } + + /** + * Traditional IRA/SEP/SIMPLE or Roth conversion amount + * @return traditionalIraSepSimpleOrRothConversionAmount + */ + @javax.annotation.Nullable + public Double getTraditionalIraSepSimpleOrRothConversionAmount() { + return traditionalIraSepSimpleOrRothConversionAmount; + } + + public void setTraditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { + this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; + } + + + public Form1099RResponse otherAmount(Double otherAmount) { + this.otherAmount = otherAmount; + return this; + } + + /** + * Other amount + * @return otherAmount + */ + @javax.annotation.Nullable + public Double getOtherAmount() { + return otherAmount; + } + + public void setOtherAmount(Double otherAmount) { + this.otherAmount = otherAmount; + } + + + public Form1099RResponse otherPercentage(String otherPercentage) { + this.otherPercentage = otherPercentage; + return this; + } + + /** + * Other percentage + * @return otherPercentage + */ + @javax.annotation.Nullable + public String getOtherPercentage() { + return otherPercentage; + } + + public void setOtherPercentage(String otherPercentage) { + this.otherPercentage = otherPercentage; + } + + + public Form1099RResponse totalDistributionPercentage(String totalDistributionPercentage) { + this.totalDistributionPercentage = totalDistributionPercentage; + return this; + } + + /** + * Total distribution percentage + * @return totalDistributionPercentage + */ + @javax.annotation.Nullable + public String getTotalDistributionPercentage() { + return totalDistributionPercentage; + } + + public void setTotalDistributionPercentage(String totalDistributionPercentage) { + this.totalDistributionPercentage = totalDistributionPercentage; + } + + + public Form1099RResponse totalEmployeeContributions(Double totalEmployeeContributions) { + this.totalEmployeeContributions = totalEmployeeContributions; + return this; + } + + /** + * Total employee contributions + * @return totalEmployeeContributions + */ + @javax.annotation.Nullable + public Double getTotalEmployeeContributions() { + return totalEmployeeContributions; + } + + public void setTotalEmployeeContributions(Double totalEmployeeContributions) { + this.totalEmployeeContributions = totalEmployeeContributions; + } + + + public Form1099RResponse amountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { + this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; + return this; + } + + /** + * Amount allocable to IRR within 5 years + * @return amountAllocableToIrrWithin5Years + */ + @javax.annotation.Nullable + public Double getAmountAllocableToIrrWithin5Years() { + return amountAllocableToIrrWithin5Years; + } + + public void setAmountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { + this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; + } + + + public Form1099RResponse firstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { + this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; + return this; + } + + /** + * First year of designated Roth contribution + * @return firstYearOfDesignatedRothContribution + */ + @javax.annotation.Nullable + public String getFirstYearOfDesignatedRothContribution() { + return firstYearOfDesignatedRothContribution; + } + + public void setFirstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { + this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; + } + + + public Form1099RResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * FATCA filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099RResponse dateOfPayment(OffsetDateTime dateOfPayment) { + this.dateOfPayment = dateOfPayment; + return this; + } + + /** + * Date of payment + * @return dateOfPayment + */ + @javax.annotation.Nullable + public OffsetDateTime getDateOfPayment() { + return dateOfPayment; + } + + public void setDateOfPayment(OffsetDateTime dateOfPayment) { + this.dateOfPayment = dateOfPayment; + } + + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public Form1099RResponse 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 Form1099RResponse 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; + } + + + public Form1099RResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * Get stateAndLocalWithholding + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + public Form1099RResponse tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1099RResponse id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Form1099RResponse issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Get issuerId + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1099RResponse issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Get issuerReferenceId + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099RResponse issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Get issuerTin + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099RResponse taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Get taxYear + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099RResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099RResponse recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Get recipientName + * @return recipientName + */ + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099RResponse recipientTin(String recipientTin) { + this.recipientTin = recipientTin; + return this; + } + + /** + * Get recipientTin + * @return recipientTin + */ + @javax.annotation.Nullable + public String getRecipientTin() { + return recipientTin; + } + + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; + } + + + public Form1099RResponse recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * Get recipientSecondName + * @return recipientSecondName + */ + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099RResponse address(String address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1099RResponse address2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get address2 + * @return address2 + */ + @javax.annotation.Nullable + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + + public Form1099RResponse city(String city) { + this.city = city; + return this; + } + + /** + * Get city + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1099RResponse state(String state) { + this.state = state; + return this; + } + + /** + * Get state + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099RResponse zip(String zip) { + this.zip = zip; + return this; + } + + /** + * Get zip + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public Form1099RResponse email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099RResponse accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Get accountNumber + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public Form1099RResponse officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * Get officeCode + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public Form1099RResponse nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Get nonUsProvince + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099RResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099RResponse 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 Form1099RResponse postalMail(Boolean postalMail) { + this.postalMail = postalMail; + return this; + } + + /** + * Get postalMail + * @return postalMail + */ + @javax.annotation.Nullable + public Boolean getPostalMail() { + return postalMail; + } + + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; + } + + + public Form1099RResponse 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 Form1099RResponse tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + return this; + } + + /** + * Get tinMatch + * @return tinMatch + */ + @javax.annotation.Nullable + public Boolean getTinMatch() { + return tinMatch; + } + + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; + } + + + public Form1099RResponse noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * Get noTin + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1099RResponse secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Get secondTinNotice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + + public Form1099RResponse addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + return this; + } + + /** + * Get addressVerification + * @return addressVerification + */ + @javax.annotation.Nullable + public Boolean getAddressVerification() { + return addressVerification; + } + + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; + } + + + public Form1099RResponse federalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + return this; + } + + /** + * Get federalEfileStatus + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + public void setFederalEfileStatus(StatusDetail federalEfileStatus) { + this.federalEfileStatus = federalEfileStatus; + } + + + public Form1099RResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + return this; + } + + /** + * Get eDeliveryStatus + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { + this.eDeliveryStatus = eDeliveryStatus; + } + + + public Form1099RResponse stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1099RResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { + if (this.stateEfileStatus == null) { + this.stateEfileStatus = new ArrayList<>(); + } + this.stateEfileStatus.add(stateEfileStatusItem); + return this; + } + + /** + * Get stateEfileStatus + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + public void setStateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + } + + + public Form1099RResponse postalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + return this; + } + + /** + * Get postalMailStatus + * @return postalMailStatus + */ + @javax.annotation.Nullable + public StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + public void setPostalMailStatus(StatusDetail postalMailStatus) { + this.postalMailStatus = postalMailStatus; + } + + + public Form1099RResponse tinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + return this; + } + + /** + * Get tinMatchStatus + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + public void setTinMatchStatus(StatusDetail tinMatchStatus) { + this.tinMatchStatus = tinMatchStatus; + } + + + public Form1099RResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + return this; + } + + /** + * Get addressVerificationStatus + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { + this.addressVerificationStatus = addressVerificationStatus; + } + + + public Form1099RResponse validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1099RResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { + if (this.validationErrors == null) { + this.validationErrors = new ArrayList<>(); + } + this.validationErrors.add(validationErrorsItem); + return this; + } + + /** + * Get validationErrors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + public void setValidationErrors(List validationErrors) { + this.validationErrors = validationErrors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099RResponse form1099RResponse = (Form1099RResponse) o; + return Objects.equals(this.grossDistribution, form1099RResponse.grossDistribution) && + Objects.equals(this.taxableAmount, form1099RResponse.taxableAmount) && + Objects.equals(this.taxableAmountNotDetermined, form1099RResponse.taxableAmountNotDetermined) && + Objects.equals(this.totalDistributionDetermined, form1099RResponse.totalDistributionDetermined) && + Objects.equals(this.capitalGain, form1099RResponse.capitalGain) && + Objects.equals(this.federalIncomeTaxWithheld, form1099RResponse.federalIncomeTaxWithheld) && + Objects.equals(this.employeeContributionsOrDesignatedRothOrInsurancePremiums, form1099RResponse.employeeContributionsOrDesignatedRothOrInsurancePremiums) && + Objects.equals(this.netUnrealizedAppreciationInEmployerSecurities, form1099RResponse.netUnrealizedAppreciationInEmployerSecurities) && + Objects.equals(this.distributionCode, form1099RResponse.distributionCode) && + Objects.equals(this.secondDistributionCode, form1099RResponse.secondDistributionCode) && + Objects.equals(this.iraSepSimple, form1099RResponse.iraSepSimple) && + Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099RResponse.traditionalIraSepSimpleOrRothConversionAmount) && + Objects.equals(this.otherAmount, form1099RResponse.otherAmount) && + Objects.equals(this.otherPercentage, form1099RResponse.otherPercentage) && + Objects.equals(this.totalDistributionPercentage, form1099RResponse.totalDistributionPercentage) && + Objects.equals(this.totalEmployeeContributions, form1099RResponse.totalEmployeeContributions) && + Objects.equals(this.amountAllocableToIrrWithin5Years, form1099RResponse.amountAllocableToIrrWithin5Years) && + Objects.equals(this.firstYearOfDesignatedRothContribution, form1099RResponse.firstYearOfDesignatedRothContribution) && + Objects.equals(this.fatcaFilingRequirement, form1099RResponse.fatcaFilingRequirement) && + Objects.equals(this.dateOfPayment, form1099RResponse.dateOfPayment) && + Objects.equals(this.type, form1099RResponse.type) && + Objects.equals(this.createdAt, form1099RResponse.createdAt) && + Objects.equals(this.updatedAt, form1099RResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099RResponse.stateAndLocalWithholding) && + Objects.equals(this.tinType, form1099RResponse.tinType) && + Objects.equals(this.id, form1099RResponse.id) && + Objects.equals(this.issuerId, form1099RResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099RResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099RResponse.issuerTin) && + Objects.equals(this.taxYear, form1099RResponse.taxYear) && + Objects.equals(this.referenceId, form1099RResponse.referenceId) && + Objects.equals(this.recipientName, form1099RResponse.recipientName) && + Objects.equals(this.recipientTin, form1099RResponse.recipientTin) && + Objects.equals(this.recipientSecondName, form1099RResponse.recipientSecondName) && + Objects.equals(this.address, form1099RResponse.address) && + Objects.equals(this.address2, form1099RResponse.address2) && + Objects.equals(this.city, form1099RResponse.city) && + Objects.equals(this.state, form1099RResponse.state) && + Objects.equals(this.zip, form1099RResponse.zip) && + Objects.equals(this.email, form1099RResponse.email) && + Objects.equals(this.accountNumber, form1099RResponse.accountNumber) && + Objects.equals(this.officeCode, form1099RResponse.officeCode) && + Objects.equals(this.nonUsProvince, form1099RResponse.nonUsProvince) && + Objects.equals(this.countryCode, form1099RResponse.countryCode) && + Objects.equals(this.federalEFile, form1099RResponse.federalEFile) && + Objects.equals(this.postalMail, form1099RResponse.postalMail) && + Objects.equals(this.stateEFile, form1099RResponse.stateEFile) && + Objects.equals(this.tinMatch, form1099RResponse.tinMatch) && + Objects.equals(this.noTin, form1099RResponse.noTin) && + Objects.equals(this.secondTinNotice, form1099RResponse.secondTinNotice) && + Objects.equals(this.addressVerification, form1099RResponse.addressVerification) && + Objects.equals(this.federalEfileStatus, form1099RResponse.federalEfileStatus) && + Objects.equals(this.eDeliveryStatus, form1099RResponse.eDeliveryStatus) && + Objects.equals(this.stateEfileStatus, form1099RResponse.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099RResponse.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099RResponse.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099RResponse.addressVerificationStatus) && + Objects.equals(this.validationErrors, form1099RResponse.validationErrors); + } + + 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(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + } + + 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 Form1099RResponse {\n"); + sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); + sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); + sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); + sb.append(" totalDistributionDetermined: ").append(toIndentedString(totalDistributionDetermined)).append("\n"); + sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" employeeContributionsOrDesignatedRothOrInsurancePremiums: ").append(toIndentedString(employeeContributionsOrDesignatedRothOrInsurancePremiums)).append("\n"); + sb.append(" netUnrealizedAppreciationInEmployerSecurities: ").append(toIndentedString(netUnrealizedAppreciationInEmployerSecurities)).append("\n"); + sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); + sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); + sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); + sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); + sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); + sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); + sb.append(" totalDistributionPercentage: ").append(toIndentedString(totalDistributionPercentage)).append("\n"); + sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); + sb.append(" amountAllocableToIrrWithin5Years: ").append(toIndentedString(amountAllocableToIrrWithin5Years)).append("\n"); + sb.append(" firstYearOfDesignatedRothContribution: ").append(toIndentedString(firstYearOfDesignatedRothContribution)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); + sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).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("type"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("tinType"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("recipientName"); + openapiFields.add("recipientTin"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + openapiFields.add("addressVerification"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("validationErrors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 Form1099RResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099RResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RResponse is not found in the empty JSON string", Form1099RResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099RResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); + } + if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString())); + } + if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString())); + } + if ((jsonObj.get("totalDistributionPercentage") != null && !jsonObj.get("totalDistributionPercentage").isJsonNull()) && !jsonObj.get("totalDistributionPercentage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalDistributionPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalDistributionPercentage").toString())); + } + if ((jsonObj.get("firstYearOfDesignatedRothContribution") != null && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonNull()) && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstYearOfDesignatedRothContribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearOfDesignatedRothContribution").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + 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("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").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("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("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("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").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())); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099RResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099RResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099RResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099RResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099RResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099RResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099RResponse + * @throws IOException if the JSON string is invalid with respect to Form1099RResponse + */ + public static Form1099RResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099RResponse.class); + } + + /** + * Convert an instance of Form1099RResponse 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/Form1099StatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java index 5c8d332..00d5be1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java index 5cae436..4d436dd 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java @@ -203,6 +203,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -337,7 +341,7 @@ public FormRequestBase address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -375,7 +379,7 @@ public FormRequestBase city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -508,7 +512,7 @@ public FormRequestBase countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -632,6 +636,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public FormRequestBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public FormRequestBase addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -702,6 +725,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, formRequestBase.tinMatch) && Objects.equals(this.noTin, formRequestBase.noTin) && Objects.equals(this.secondTinNotice, formRequestBase.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, formRequestBase.fatcaFilingRequirement) && Objects.equals(this.addressVerification, formRequestBase.addressVerification) && Objects.equals(this.stateAndLocalWithholding, formRequestBase.stateAndLocalWithholding); } @@ -712,7 +736,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -748,6 +772,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -794,14 +819,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -824,13 +847,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FormRequestBase.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("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); @@ -854,13 +870,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -881,7 +897,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java index 8977351..ea75dea 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java @@ -215,6 +215,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -406,7 +410,7 @@ public FormRequestListItemBase address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -444,7 +448,7 @@ public FormRequestListItemBase city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -577,7 +581,7 @@ public FormRequestListItemBase countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -701,6 +705,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public FormRequestListItemBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public FormRequestListItemBase addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -774,6 +797,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, formRequestListItemBase.tinMatch) && Objects.equals(this.noTin, formRequestListItemBase.noTin) && Objects.equals(this.secondTinNotice, formRequestListItemBase.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, formRequestListItemBase.fatcaFilingRequirement) && Objects.equals(this.addressVerification, formRequestListItemBase.addressVerification) && Objects.equals(this.stateAndLocalWithholding, formRequestListItemBase.stateAndLocalWithholding); } @@ -784,7 +808,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -823,6 +847,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -869,15 +894,13 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("taxYear"); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -936,13 +959,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -963,7 +986,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java index 242c7c2..be993fa 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java @@ -84,7 +84,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java index db3c68c..9aaf7fc 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java @@ -78,7 +78,9 @@ public enum TypeEnum { _1042_S("1042-S"), - _1095_C("1095-C"); + _1095_C("1095-C"), + + _1099_INT("1099-INT"); private String value; @@ -271,6 +273,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) private Boolean secondTinNotice; + 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_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -424,7 +430,7 @@ public FormSingleRequestBase address(String address) { * Address * @return address */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getAddress() { return address; } @@ -462,7 +468,7 @@ public FormSingleRequestBase city(String city) { * City * @return city */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCity() { return city; } @@ -595,7 +601,7 @@ public FormSingleRequestBase countryCode(String countryCode) { * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getCountryCode() { return countryCode; } @@ -719,6 +725,25 @@ public void setSecondTinNotice(Boolean secondTinNotice) { } + public FormSingleRequestBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * Fatca filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + public FormSingleRequestBase addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -790,6 +815,7 @@ public boolean equals(Object o) { Objects.equals(this.tinMatch, formSingleRequestBase.tinMatch) && Objects.equals(this.noTin, formSingleRequestBase.noTin) && Objects.equals(this.secondTinNotice, formSingleRequestBase.secondTinNotice) && + Objects.equals(this.fatcaFilingRequirement, formSingleRequestBase.fatcaFilingRequirement) && Objects.equals(this.addressVerification, formSingleRequestBase.addressVerification) && Objects.equals(this.stateAndLocalWithholding, formSingleRequestBase.stateAndLocalWithholding); } @@ -800,7 +826,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); + return Objects.hash(type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -837,6 +863,7 @@ public String toString() { sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); @@ -883,14 +910,12 @@ private String toIndentedString(Object o) { openapiFields.add("tinMatch"); openapiFields.add("noTin"); openapiFields.add("secondTinNotice"); + openapiFields.add("fatcaFilingRequirement"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("address"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("countryCode"); } /** @@ -913,13 +938,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormSingleRequestBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FormSingleRequestBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -950,13 +968,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } - if (!jsonObj.get("address").isJsonPrimitive()) { + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); } - if (!jsonObj.get("city").isJsonPrimitive()) { + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { @@ -977,7 +995,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { + 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())); } // validate the optional field `stateAndLocalWithholding` diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java index 800d9bc..fd74235 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -25,6 +25,7 @@ import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; @@ -98,6 +99,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); + final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); @@ -135,6 +137,12 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099IntListItemResponse` + if (value.getActualInstance() instanceof Form1099IntListItemResponse) { + JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099KListItemResponse` if (value.getActualInstance() instanceof Form1099KListItemResponse) { JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); @@ -159,7 +167,7 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } @Override @@ -219,6 +227,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); } + // deserialize Form1099IntListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099IntListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099IntListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); + } // deserialize Form1099KListItemResponse try { // validate the JSON object to see if any exception is thrown @@ -297,6 +317,7 @@ public Get1099Form200Response(Object o) { schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); + schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); @@ -311,7 +332,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * * It could be an instance of the 'oneOf' schemas. */ @@ -337,6 +358,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099IntListItemResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099KListItemResponse) { super.setActualInstance(instance); return; @@ -357,14 +383,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } /** * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) */ @SuppressWarnings("unchecked") @Override @@ -412,6 +438,16 @@ public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCast public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { return (Form1099DivListItemResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099IntListItemResponse` + * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` + */ + public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { + return (Form1099IntListItemResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, * the ClassCastException will be thrown. @@ -495,6 +531,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099IntListItemResponse + try { + Form1099IntListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099KListItemResponse try { Form1099KListItemResponse.validateJsonElement(jsonElement); @@ -528,7 +572,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java index b74ff86..dce0fd3 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java new file mode 100644 index 0000000..942f982 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java @@ -0,0 +1,301 @@ +/* + * 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.CreateW9Form201Response; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +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; + +/** + * Generic paginated model to wrap query response data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class PaginatedQueryResultModelW9FormBaseResponse { + public static final String SERIALIZED_NAME_AT_RECORDSET_COUNT = "@recordsetCount"; + @SerializedName(SERIALIZED_NAME_AT_RECORDSET_COUNT) + private Integer atRecordsetCount; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; + @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) + private String atNextLink; + + public PaginatedQueryResultModelW9FormBaseResponse() { + } + + public PaginatedQueryResultModelW9FormBaseResponse atRecordsetCount(Integer atRecordsetCount) { + this.atRecordsetCount = atRecordsetCount; + return this; + } + + /** + * Get atRecordsetCount + * @return atRecordsetCount + */ + @javax.annotation.Nullable + public Integer getAtRecordsetCount() { + return atRecordsetCount; + } + + public void setAtRecordsetCount(Integer atRecordsetCount) { + this.atRecordsetCount = atRecordsetCount; + } + + + public PaginatedQueryResultModelW9FormBaseResponse value(List value) { + this.value = value; + return this; + } + + public PaginatedQueryResultModelW9FormBaseResponse addValueItem(CreateW9Form201Response valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + + public PaginatedQueryResultModelW9FormBaseResponse atNextLink(String atNextLink) { + this.atNextLink = atNextLink; + return this; + } + + /** + * Get atNextLink + * @return atNextLink + */ + @javax.annotation.Nullable + public String getAtNextLink() { + return atNextLink; + } + + public void setAtNextLink(String atNextLink) { + this.atNextLink = atNextLink; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginatedQueryResultModelW9FormBaseResponse paginatedQueryResultModelW9FormBaseResponse = (PaginatedQueryResultModelW9FormBaseResponse) o; + return Objects.equals(this.atRecordsetCount, paginatedQueryResultModelW9FormBaseResponse.atRecordsetCount) && + Objects.equals(this.value, paginatedQueryResultModelW9FormBaseResponse.value) && + Objects.equals(this.atNextLink, paginatedQueryResultModelW9FormBaseResponse.atNextLink); + } + + 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(atRecordsetCount, value, atNextLink); + } + + 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 PaginatedQueryResultModelW9FormBaseResponse {\n"); + sb.append(" atRecordsetCount: ").append(toIndentedString(atRecordsetCount)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).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("@recordsetCount"); + openapiFields.add("value"); + openapiFields.add("@nextLink"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 PaginatedQueryResultModelW9FormBaseResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginatedQueryResultModelW9FormBaseResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedQueryResultModelW9FormBaseResponse is not found in the empty JSON string", PaginatedQueryResultModelW9FormBaseResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginatedQueryResultModelW9FormBaseResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedQueryResultModelW9FormBaseResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { + JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); + if (jsonArrayvalue != null) { + // ensure the json data is an array + if (!jsonObj.get("value").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + + // validate the optional field `value` (array) + for (int i = 0; i < jsonArrayvalue.size(); i++) { + CreateW9Form201Response.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + if ((jsonObj.get("@nextLink") != null && !jsonObj.get("@nextLink").isJsonNull()) && !jsonObj.get("@nextLink").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `@nextLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("@nextLink").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginatedQueryResultModelW9FormBaseResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedQueryResultModelW9FormBaseResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedQueryResultModelW9FormBaseResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginatedQueryResultModelW9FormBaseResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginatedQueryResultModelW9FormBaseResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PaginatedQueryResultModelW9FormBaseResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginatedQueryResultModelW9FormBaseResponse + * @throws IOException if the JSON string is invalid with respect to PaginatedQueryResultModelW9FormBaseResponse + */ + public static PaginatedQueryResultModelW9FormBaseResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PaginatedQueryResultModelW9FormBaseResponse.class); + } + + /** + * Convert an instance of PaginatedQueryResultModelW9FormBaseResponse 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/StateAndLocalWithholding.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java index dd0f3be..cd468aa 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java index 9bf7e78..041be85 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java index 4de3d1b..8f255c4 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java @@ -20,11 +20,15 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; import Avalara.SDK.model.A1099.V2.Form1042SResponse; +import Avalara.SDK.model.A1099.V2.Form1095BResponse; import Avalara.SDK.model.A1099.V2.Form1099DivResponse; +import Avalara.SDK.model.A1099.V2.Form1099IntResponse; import Avalara.SDK.model.A1099.V2.Form1099KResponse; import Avalara.SDK.model.A1099.V2.Form1099MiscResponse; import Avalara.SDK.model.A1099.V2.Form1099NecResponse; +import Avalara.SDK.model.A1099.V2.Form1099RResponse; import Avalara.SDK.model.A1099.V2.FormResponseBase; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; @@ -91,10 +95,13 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterFormResponseBase = gson.getDelegateAdapter(this, TypeToken.get(FormResponseBase.class)); final TypeAdapter adapterForm1042SResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SResponse.class)); + final TypeAdapter adapterForm1095BResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BResponse.class)); final TypeAdapter adapterForm1099DivResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivResponse.class)); + final TypeAdapter adapterForm1099IntResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntResponse.class)); final TypeAdapter adapterForm1099KResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KResponse.class)); final TypeAdapter adapterForm1099MiscResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscResponse.class)); final TypeAdapter adapterForm1099NecResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecResponse.class)); + final TypeAdapter adapterForm1099RResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RResponse.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -116,12 +123,24 @@ public void write(JsonWriter out, Update1099Form200Response value) throws IOExce elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1095BResponse` + if (value.getActualInstance() instanceof Form1095BResponse) { + JsonElement element = adapterForm1095BResponse.toJsonTree((Form1095BResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099DivResponse` if (value.getActualInstance() instanceof Form1099DivResponse) { JsonElement element = adapterForm1099DivResponse.toJsonTree((Form1099DivResponse)value.getActualInstance()); elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099IntResponse` + if (value.getActualInstance() instanceof Form1099IntResponse) { + JsonElement element = adapterForm1099IntResponse.toJsonTree((Form1099IntResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099KResponse` if (value.getActualInstance() instanceof Form1099KResponse) { JsonElement element = adapterForm1099KResponse.toJsonTree((Form1099KResponse)value.getActualInstance()); @@ -140,7 +159,13 @@ public void write(JsonWriter out, Update1099Form200Response value) throws IOExce elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); + // check if the actual instance is of the type `Form1099RResponse` + if (value.getActualInstance() instanceof Form1099RResponse) { + JsonElement element = adapterForm1099RResponse.toJsonTree((Form1099RResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase"); } @Override @@ -176,6 +201,18 @@ public Update1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1042SResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1042SResponse'", e); } + // deserialize Form1095BResponse + try { + // validate the JSON object to see if any exception is thrown + Form1095BResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095BResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1095BResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1095BResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095BResponse'", e); + } // deserialize Form1099DivResponse try { // validate the JSON object to see if any exception is thrown @@ -188,6 +225,18 @@ public Update1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099DivResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099DivResponse'", e); } + // deserialize Form1099IntResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099IntResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099IntResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099IntResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099IntResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099IntResponse'", e); + } // deserialize Form1099KResponse try { // validate the JSON object to see if any exception is thrown @@ -224,6 +273,18 @@ public Update1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099NecResponse failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099NecResponse'", e); } + // deserialize Form1099RResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099RResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099RResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099RResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099RResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099RResponse'", e); + } if (match == 1) { Update1099Form200Response ret = new Update1099Form200Response(); @@ -252,10 +313,13 @@ public Update1099Form200Response(Object o) { static { schemas.put("FormResponseBase", FormResponseBase.class); schemas.put("Form1042SResponse", Form1042SResponse.class); + schemas.put("Form1095BResponse", Form1095BResponse.class); schemas.put("Form1099DivResponse", Form1099DivResponse.class); + schemas.put("Form1099IntResponse", Form1099IntResponse.class); schemas.put("Form1099KResponse", Form1099KResponse.class); schemas.put("Form1099MiscResponse", Form1099MiscResponse.class); schemas.put("Form1099NecResponse", Form1099NecResponse.class); + schemas.put("Form1099RResponse", Form1099RResponse.class); } @Override @@ -266,7 +330,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase + * Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase * * It could be an instance of the 'oneOf' schemas. */ @@ -282,11 +346,21 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1095BResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099DivResponse) { super.setActualInstance(instance); return; } + if (instance instanceof Form1099IntResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099KResponse) { super.setActualInstance(instance); return; @@ -302,14 +376,19 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); + if (instance instanceof Form1099RResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase"); } /** * Get the actual instance, which can be the following: - * Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase + * Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase * - * @return The actual instance (Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase) + * @return The actual instance (Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase) */ @SuppressWarnings("unchecked") @Override @@ -337,6 +416,16 @@ public FormResponseBase getFormResponseBase() throws ClassCastException { public Form1042SResponse getForm1042SResponse() throws ClassCastException { return (Form1042SResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1095BResponse`. If the actual instance is not `Form1095BResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1095BResponse` + * @throws ClassCastException if the instance is not `Form1095BResponse` + */ + public Form1095BResponse getForm1095BResponse() throws ClassCastException { + return (Form1095BResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099DivResponse`. If the actual instance is not `Form1099DivResponse`, * the ClassCastException will be thrown. @@ -347,6 +436,16 @@ public Form1042SResponse getForm1042SResponse() throws ClassCastException { public Form1099DivResponse getForm1099DivResponse() throws ClassCastException { return (Form1099DivResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099IntResponse`. If the actual instance is not `Form1099IntResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099IntResponse` + * @throws ClassCastException if the instance is not `Form1099IntResponse` + */ + public Form1099IntResponse getForm1099IntResponse() throws ClassCastException { + return (Form1099IntResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099KResponse`. If the actual instance is not `Form1099KResponse`, * the ClassCastException will be thrown. @@ -377,6 +476,16 @@ public Form1099MiscResponse getForm1099MiscResponse() throws ClassCastException public Form1099NecResponse getForm1099NecResponse() throws ClassCastException { return (Form1099NecResponse)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099RResponse`. If the actual instance is not `Form1099RResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099RResponse` + * @throws ClassCastException if the instance is not `Form1099RResponse` + */ + public Form1099RResponse getForm1099RResponse() throws ClassCastException { + return (Form1099RResponse)super.getActualInstance(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -404,6 +513,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1042SResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1095BResponse + try { + Form1095BResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1095BResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099DivResponse try { Form1099DivResponse.validateJsonElement(jsonElement); @@ -412,6 +529,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099DivResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099IntResponse + try { + Form1099IntResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099IntResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099KResponse try { Form1099KResponse.validateJsonElement(jsonElement); @@ -436,8 +561,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099NecResponse failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099RResponse + try { + Form1099RResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099RResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java index 090d5cc..8686c0d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java index 95ad15c..17809db 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -58,7 +59,7 @@ * W4FormResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class W4FormResponse { +public class W4FormResponse extends W9FormBaseResponse { public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) private String employeeFirstName; @@ -135,63 +136,8 @@ public class W4FormResponse { @SerializedName(SERIALIZED_NAME_OFFICE_CODE) private String officeCode; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private String companyId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - - public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate"; - @SerializedName(SERIALIZED_NAME_SIGNED_DATE) - private OffsetDateTime signedDate; - - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public W4FormResponse() { + this.type = this.getClass().getSimpleName(); } public W4FormResponse employeeFirstName(String employeeFirstName) { @@ -555,272 +501,6 @@ public void setOfficeCode(String officeCode) { } - public W4FormResponse id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier for the form. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public W4FormResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public W4FormResponse entryStatus(String entryStatus) { - this.entryStatus = entryStatus; - return this; - } - - /** - * The form status. - * @return entryStatus - */ - @javax.annotation.Nullable - public String getEntryStatus() { - return entryStatus; - } - - public void setEntryStatus(String entryStatus) { - this.entryStatus = entryStatus; - } - - - public W4FormResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - - public W4FormResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * A reference identifier for the form. - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public W4FormResponse companyId(String companyId) { - this.companyId = companyId; - return this; - } - - /** - * The ID of the associated company. - * @return companyId - */ - @javax.annotation.Nullable - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - - public W4FormResponse displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * The display name associated with the form. - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public W4FormResponse email(String email) { - this.email = email; - return this; - } - - /** - * The email address of the individual associated with the form. - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public W4FormResponse archived(Boolean archived) { - this.archived = archived; - return this; - } - - /** - * Indicates whether the form is archived. - * @return archived - */ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public W4FormResponse signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - - public W4FormResponse signedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - return this; - } - - /** - * The date the form was signed. - * @return signedDate - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedDate() { - return signedDate; - } - - public void setSignedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - } - - - public W4FormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W4FormResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation date of the form. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public W4FormResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last updated date of the form. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -850,20 +530,7 @@ public boolean equals(Object o) { Objects.equals(this.additionalWithheld, w4FormResponse.additionalWithheld) && Objects.equals(this.exemptFromWithholding, w4FormResponse.exemptFromWithholding) && Objects.equals(this.officeCode, w4FormResponse.officeCode) && - Objects.equals(this.id, w4FormResponse.id) && - Objects.equals(this.type, w4FormResponse.type) && - Objects.equals(this.entryStatus, w4FormResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w4FormResponse.entryStatusDate) && - Objects.equals(this.referenceId, w4FormResponse.referenceId) && - Objects.equals(this.companyId, w4FormResponse.companyId) && - Objects.equals(this.displayName, w4FormResponse.displayName) && - Objects.equals(this.email, w4FormResponse.email) && - Objects.equals(this.archived, w4FormResponse.archived) && - Objects.equals(this.signature, w4FormResponse.signature) && - Objects.equals(this.signedDate, w4FormResponse.signedDate) && - Objects.equals(this.eDeliveryConsentedAt, w4FormResponse.eDeliveryConsentedAt) && - Objects.equals(this.createdAt, w4FormResponse.createdAt) && - Objects.equals(this.updatedAt, w4FormResponse.updatedAt); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -872,7 +539,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -886,6 +553,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W4FormResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); @@ -905,20 +573,6 @@ public String toString() { sb.append(" additionalWithheld: ").append(toIndentedString(additionalWithheld)).append("\n"); sb.append(" exemptFromWithholding: ").append(toIndentedString(exemptFromWithholding)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -942,7 +596,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); - openapiFields.add("type"); openapiFields.add("entryStatus"); openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); @@ -955,6 +608,7 @@ private String toIndentedString(Object o) { openapiFields.add("eDeliveryConsentedAt"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -980,67 +634,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W4FormResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); - } - if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); - } - if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); - } - if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("maritalStatus") != null && !jsonObj.get("maritalStatus").isJsonNull()) && !jsonObj.get("maritalStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `maritalStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maritalStatus").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java index 95e6413..c83177b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java @@ -21,6 +21,7 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse; +import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -62,7 +63,7 @@ * W8BenEFormResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class W8BenEFormResponse { +public class W8BenEFormResponse extends W9FormBaseResponse { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -447,63 +448,8 @@ public class W8BenEFormResponse { @SerializedName(SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION) private Boolean capacityToSignCertification; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private String companyId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - - public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate"; - @SerializedName(SERIALIZED_NAME_SIGNED_DATE) - private OffsetDateTime signedDate; - - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public W8BenEFormResponse() { + this.type = this.getClass().getSimpleName(); } public W8BenEFormResponse name(String name) { @@ -2338,272 +2284,6 @@ public void setCapacityToSignCertification(Boolean capacityToSignCertification) } - public W8BenEFormResponse id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier for the form. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public W8BenEFormResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public W8BenEFormResponse entryStatus(String entryStatus) { - this.entryStatus = entryStatus; - return this; - } - - /** - * The form status. - * @return entryStatus - */ - @javax.annotation.Nullable - public String getEntryStatus() { - return entryStatus; - } - - public void setEntryStatus(String entryStatus) { - this.entryStatus = entryStatus; - } - - - public W8BenEFormResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - - public W8BenEFormResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * A reference identifier for the form. - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public W8BenEFormResponse companyId(String companyId) { - this.companyId = companyId; - return this; - } - - /** - * The ID of the associated company. - * @return companyId - */ - @javax.annotation.Nullable - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - - public W8BenEFormResponse displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * The display name associated with the form. - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public W8BenEFormResponse email(String email) { - this.email = email; - return this; - } - - /** - * The email address of the individual associated with the form. - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public W8BenEFormResponse archived(Boolean archived) { - this.archived = archived; - return this; - } - - /** - * Indicates whether the form is archived. - * @return archived - */ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public W8BenEFormResponse signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - - public W8BenEFormResponse signedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - return this; - } - - /** - * The date the form was signed. - * @return signedDate - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedDate() { - return signedDate; - } - - public void setSignedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - } - - - public W8BenEFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenEFormResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation date of the form. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public W8BenEFormResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last updated date of the form. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -2710,20 +2390,7 @@ public boolean equals(Object o) { Objects.equals(this.substantialUsOwners, w8BenEFormResponse.substantialUsOwners) && Objects.equals(this.signerName, w8BenEFormResponse.signerName) && Objects.equals(this.capacityToSignCertification, w8BenEFormResponse.capacityToSignCertification) && - Objects.equals(this.id, w8BenEFormResponse.id) && - Objects.equals(this.type, w8BenEFormResponse.type) && - Objects.equals(this.entryStatus, w8BenEFormResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w8BenEFormResponse.entryStatusDate) && - Objects.equals(this.referenceId, w8BenEFormResponse.referenceId) && - Objects.equals(this.companyId, w8BenEFormResponse.companyId) && - Objects.equals(this.displayName, w8BenEFormResponse.displayName) && - Objects.equals(this.email, w8BenEFormResponse.email) && - Objects.equals(this.archived, w8BenEFormResponse.archived) && - Objects.equals(this.signature, w8BenEFormResponse.signature) && - Objects.equals(this.signedDate, w8BenEFormResponse.signedDate) && - Objects.equals(this.eDeliveryConsentedAt, w8BenEFormResponse.eDeliveryConsentedAt) && - Objects.equals(this.createdAt, w8BenEFormResponse.createdAt) && - Objects.equals(this.updatedAt, w8BenEFormResponse.updatedAt); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -2732,7 +2399,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -2746,6 +2413,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W8BenEFormResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n"); @@ -2842,20 +2510,6 @@ public String toString() { sb.append(" substantialUsOwners: ").append(toIndentedString(substantialUsOwners)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); sb.append(" capacityToSignCertification: ").append(toIndentedString(capacityToSignCertification)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -2879,7 +2533,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); - openapiFields.add("type"); openapiFields.add("entryStatus"); openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); @@ -2892,6 +2545,7 @@ private String toIndentedString(Object o) { openapiFields.add("eDeliveryConsentedAt"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -2917,177 +2571,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenEFormResponse` properties. JSON: %s", entry.getKey(), 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("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); - } - if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString())); - } - if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entityType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entityType").toString())); - } - if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fatcaStatus").toString())); - } - if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); - } - if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); - } - if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); - } - if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); - } - if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); - } - if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); - } - if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); - } - if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); - } - if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); - } - if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString())); - } - if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); - } - if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); - } - if ((jsonObj.get("disregardedEntityFatcaStatus") != null && !jsonObj.get("disregardedEntityFatcaStatus").isJsonNull()) && !jsonObj.get("disregardedEntityFatcaStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityFatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityFatcaStatus").toString())); - } - if ((jsonObj.get("disregardedAddress") != null && !jsonObj.get("disregardedAddress").isJsonNull()) && !jsonObj.get("disregardedAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedAddress").toString())); - } - if ((jsonObj.get("disregardedCity") != null && !jsonObj.get("disregardedCity").isJsonNull()) && !jsonObj.get("disregardedCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCity").toString())); - } - if ((jsonObj.get("disregardedState") != null && !jsonObj.get("disregardedState").isJsonNull()) && !jsonObj.get("disregardedState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedState").toString())); - } - if ((jsonObj.get("disregardedZip") != null && !jsonObj.get("disregardedZip").isJsonNull()) && !jsonObj.get("disregardedZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedZip").toString())); - } - if ((jsonObj.get("disregardedCountry") != null && !jsonObj.get("disregardedCountry").isJsonNull()) && !jsonObj.get("disregardedCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCountry").toString())); - } - if ((jsonObj.get("disregardedEntityGiin") != null && !jsonObj.get("disregardedEntityGiin").isJsonNull()) && !jsonObj.get("disregardedEntityGiin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityGiin").toString())); - } - if ((jsonObj.get("treatyCountry") != null && !jsonObj.get("treatyCountry").isJsonNull()) && !jsonObj.get("treatyCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyCountry").toString())); - } - if ((jsonObj.get("benefitLimitation") != null && !jsonObj.get("benefitLimitation").isJsonNull()) && !jsonObj.get("benefitLimitation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `benefitLimitation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("benefitLimitation").toString())); - } - if ((jsonObj.get("treatyArticle") != null && !jsonObj.get("treatyArticle").isJsonNull()) && !jsonObj.get("treatyArticle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyArticle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyArticle").toString())); - } - if ((jsonObj.get("withholdingRate") != null && !jsonObj.get("withholdingRate").isJsonNull()) && !jsonObj.get("withholdingRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `withholdingRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingRate").toString())); - } - if ((jsonObj.get("incomeType") != null && !jsonObj.get("incomeType").isJsonNull()) && !jsonObj.get("incomeType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `incomeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeType").toString())); - } - if ((jsonObj.get("treatyReasons") != null && !jsonObj.get("treatyReasons").isJsonNull()) && !jsonObj.get("treatyReasons").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyReasons` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyReasons").toString())); - } - if ((jsonObj.get("ffiSponsoringEntity") != null && !jsonObj.get("ffiSponsoringEntity").isJsonNull()) && !jsonObj.get("ffiSponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ffiSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ffiSponsoringEntity").toString())); - } - if ((jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity") != null && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonNull()) && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sponsoredCloselyHeldEntitySponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").toString())); - } - if ((jsonObj.get("igaCountry") != null && !jsonObj.get("igaCountry").isJsonNull()) && !jsonObj.get("igaCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaCountry").toString())); - } - if ((jsonObj.get("igaModel") != null && !jsonObj.get("igaModel").isJsonNull()) && !jsonObj.get("igaModel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaModel").toString())); - } - if ((jsonObj.get("igaLegalStatusTreatment") != null && !jsonObj.get("igaLegalStatusTreatment").isJsonNull()) && !jsonObj.get("igaLegalStatusTreatment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaLegalStatusTreatment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaLegalStatusTreatment").toString())); - } - if ((jsonObj.get("igaFfiTrusteeOrSponsor") != null && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonNull()) && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaFfiTrusteeOrSponsor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaFfiTrusteeOrSponsor").toString())); - } - if ((jsonObj.get("publiclyTradedNffeSecuritiesMarket") != null && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonNull()) && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedNffeSecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedNffeSecuritiesMarket").toString())); - } - if ((jsonObj.get("publiclyTradedEntity") != null && !jsonObj.get("publiclyTradedEntity").isJsonNull()) && !jsonObj.get("publiclyTradedEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedEntity").toString())); - } - if ((jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") != null && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonNull()) && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").toString())); - } - if ((jsonObj.get("directReportingNffeSponsoringEntity") != null && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonNull()) && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `directReportingNffeSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directReportingNffeSponsoringEntity").toString())); - } - if (jsonObj.get("substantialUsOwners") != null && !jsonObj.get("substantialUsOwners").isJsonNull()) { - JsonArray jsonArraysubstantialUsOwners = jsonObj.getAsJsonArray("substantialUsOwners"); - if (jsonArraysubstantialUsOwners != null) { - // ensure the json data is an array - if (!jsonObj.get("substantialUsOwners").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `substantialUsOwners` to be an array in the JSON string but got `%s`", jsonObj.get("substantialUsOwners").toString())); - } - - // validate the optional field `substantialUsOwners` (array) - for (int i = 0; i < jsonArraysubstantialUsOwners.size(); i++) { - SubstantialUsOwnerResponse.validateJsonElement(jsonArraysubstantialUsOwners.get(i)); - }; - } - } - if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java index daec59e..c54688d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -59,7 +60,7 @@ * W8BenFormResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class W8BenFormResponse { +public class W8BenFormResponse extends W9FormBaseResponse { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -164,63 +165,8 @@ public class W8BenFormResponse { @SerializedName(SERIALIZED_NAME_SIGNER_CAPACITY) private String signerCapacity; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private String companyId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - - public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate"; - @SerializedName(SERIALIZED_NAME_SIGNED_DATE) - private OffsetDateTime signedDate; - - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public W8BenFormResponse() { + this.type = this.getClass().getSimpleName(); } public W8BenFormResponse name(String name) { @@ -717,272 +663,6 @@ public void setSignerCapacity(String signerCapacity) { } - public W8BenFormResponse id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier for the form. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public W8BenFormResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public W8BenFormResponse entryStatus(String entryStatus) { - this.entryStatus = entryStatus; - return this; - } - - /** - * The form status. - * @return entryStatus - */ - @javax.annotation.Nullable - public String getEntryStatus() { - return entryStatus; - } - - public void setEntryStatus(String entryStatus) { - this.entryStatus = entryStatus; - } - - - public W8BenFormResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - - public W8BenFormResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * A reference identifier for the form. - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public W8BenFormResponse companyId(String companyId) { - this.companyId = companyId; - return this; - } - - /** - * The ID of the associated company. - * @return companyId - */ - @javax.annotation.Nullable - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - - public W8BenFormResponse displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * The display name associated with the form. - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public W8BenFormResponse email(String email) { - this.email = email; - return this; - } - - /** - * The email address of the individual associated with the form. - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public W8BenFormResponse archived(Boolean archived) { - this.archived = archived; - return this; - } - - /** - * Indicates whether the form is archived. - * @return archived - */ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public W8BenFormResponse signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - - public W8BenFormResponse signedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - return this; - } - - /** - * The date the form was signed. - * @return signedDate - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedDate() { - return signedDate; - } - - public void setSignedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - } - - - public W8BenFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenFormResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation date of the form. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public W8BenFormResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last updated date of the form. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -1019,20 +699,7 @@ public boolean equals(Object o) { Objects.equals(this.incomeType, w8BenFormResponse.incomeType) && Objects.equals(this.signerName, w8BenFormResponse.signerName) && Objects.equals(this.signerCapacity, w8BenFormResponse.signerCapacity) && - Objects.equals(this.id, w8BenFormResponse.id) && - Objects.equals(this.type, w8BenFormResponse.type) && - Objects.equals(this.entryStatus, w8BenFormResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w8BenFormResponse.entryStatusDate) && - Objects.equals(this.referenceId, w8BenFormResponse.referenceId) && - Objects.equals(this.companyId, w8BenFormResponse.companyId) && - Objects.equals(this.displayName, w8BenFormResponse.displayName) && - Objects.equals(this.email, w8BenFormResponse.email) && - Objects.equals(this.archived, w8BenFormResponse.archived) && - Objects.equals(this.signature, w8BenFormResponse.signature) && - Objects.equals(this.signedDate, w8BenFormResponse.signedDate) && - Objects.equals(this.eDeliveryConsentedAt, w8BenFormResponse.eDeliveryConsentedAt) && - Objects.equals(this.createdAt, w8BenFormResponse.createdAt) && - Objects.equals(this.updatedAt, w8BenFormResponse.updatedAt); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1041,7 +708,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, signerCapacity, id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, signerCapacity, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -1055,6 +722,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W8BenFormResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); sb.append(" residenceAddress: ").append(toIndentedString(residenceAddress)).append("\n"); @@ -1081,20 +749,6 @@ public String toString() { sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); sb.append(" signerCapacity: ").append(toIndentedString(signerCapacity)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1118,7 +772,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); - openapiFields.add("type"); openapiFields.add("entryStatus"); openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); @@ -1131,6 +784,7 @@ private String toIndentedString(Object o) { openapiFields.add("eDeliveryConsentedAt"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -1156,100 +810,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenFormResponse` properties. JSON: %s", entry.getKey(), 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("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); - } - if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); - } - if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); - } - if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); - } - if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); - } - if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); - } - if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); - } - if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); - } - if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); - } - if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); - } - if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); - } - if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); - } - if ((jsonObj.get("treatyCountry") != null && !jsonObj.get("treatyCountry").isJsonNull()) && !jsonObj.get("treatyCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyCountry").toString())); - } - if ((jsonObj.get("treatyArticle") != null && !jsonObj.get("treatyArticle").isJsonNull()) && !jsonObj.get("treatyArticle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyArticle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyArticle").toString())); - } - if ((jsonObj.get("treatyReasons") != null && !jsonObj.get("treatyReasons").isJsonNull()) && !jsonObj.get("treatyReasons").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `treatyReasons` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treatyReasons").toString())); - } - if ((jsonObj.get("withholdingRate") != null && !jsonObj.get("withholdingRate").isJsonNull()) && !jsonObj.get("withholdingRate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `withholdingRate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingRate").toString())); - } - if ((jsonObj.get("incomeType") != null && !jsonObj.get("incomeType").isJsonNull()) && !jsonObj.get("incomeType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `incomeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeType").toString())); - } - if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); - } - if ((jsonObj.get("signerCapacity") != null && !jsonObj.get("signerCapacity").isJsonNull()) && !jsonObj.get("signerCapacity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signerCapacity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerCapacity").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java index 727e5f6..efa45c5 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -59,7 +60,7 @@ * W8ImyFormResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class W8ImyFormResponse { +public class W8ImyFormResponse extends W9FormBaseResponse { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -504,63 +505,8 @@ public class W8ImyFormResponse { @SerializedName(SERIALIZED_NAME_SIGNER_NAME) private String signerName; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private String companyId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - - public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate"; - @SerializedName(SERIALIZED_NAME_SIGNED_DATE) - private OffsetDateTime signedDate; - - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public W8ImyFormResponse() { + this.type = this.getClass().getSimpleName(); } public W8ImyFormResponse name(String name) { @@ -2672,272 +2618,6 @@ public void setSignerName(String signerName) { } - public W8ImyFormResponse id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier for the form. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public W8ImyFormResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public W8ImyFormResponse entryStatus(String entryStatus) { - this.entryStatus = entryStatus; - return this; - } - - /** - * The form status. - * @return entryStatus - */ - @javax.annotation.Nullable - public String getEntryStatus() { - return entryStatus; - } - - public void setEntryStatus(String entryStatus) { - this.entryStatus = entryStatus; - } - - - public W8ImyFormResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - - public W8ImyFormResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * A reference identifier for the form. - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public W8ImyFormResponse companyId(String companyId) { - this.companyId = companyId; - return this; - } - - /** - * The ID of the associated company. - * @return companyId - */ - @javax.annotation.Nullable - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - - public W8ImyFormResponse displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * The display name associated with the form. - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public W8ImyFormResponse email(String email) { - this.email = email; - return this; - } - - /** - * The email address of the individual associated with the form. - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public W8ImyFormResponse archived(Boolean archived) { - this.archived = archived; - return this; - } - - /** - * Indicates whether the form is archived. - * @return archived - */ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public W8ImyFormResponse signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - - public W8ImyFormResponse signedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - return this; - } - - /** - * The date the form was signed. - * @return signedDate - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedDate() { - return signedDate; - } - - public void setSignedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - } - - - public W8ImyFormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8ImyFormResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation date of the form. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public W8ImyFormResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last updated date of the form. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -3059,20 +2739,7 @@ public boolean equals(Object o) { Objects.equals(this.sponsoredDirectReportingNffeCertification, w8ImyFormResponse.sponsoredDirectReportingNffeCertification) && Objects.equals(this.directReportingNffeSponsoringEntity, w8ImyFormResponse.directReportingNffeSponsoringEntity) && Objects.equals(this.signerName, w8ImyFormResponse.signerName) && - Objects.equals(this.id, w8ImyFormResponse.id) && - Objects.equals(this.type, w8ImyFormResponse.type) && - Objects.equals(this.entryStatus, w8ImyFormResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w8ImyFormResponse.entryStatusDate) && - Objects.equals(this.referenceId, w8ImyFormResponse.referenceId) && - Objects.equals(this.companyId, w8ImyFormResponse.companyId) && - Objects.equals(this.displayName, w8ImyFormResponse.displayName) && - Objects.equals(this.email, w8ImyFormResponse.email) && - Objects.equals(this.archived, w8ImyFormResponse.archived) && - Objects.equals(this.signature, w8ImyFormResponse.signature) && - Objects.equals(this.signedDate, w8ImyFormResponse.signedDate) && - Objects.equals(this.eDeliveryConsentedAt, w8ImyFormResponse.eDeliveryConsentedAt) && - Objects.equals(this.createdAt, w8ImyFormResponse.createdAt) && - Objects.equals(this.updatedAt, w8ImyFormResponse.updatedAt); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -3081,7 +2748,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -3095,6 +2762,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W8ImyFormResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n"); @@ -3206,20 +2874,6 @@ public String toString() { sb.append(" sponsoredDirectReportingNffeCertification: ").append(toIndentedString(sponsoredDirectReportingNffeCertification)).append("\n"); sb.append(" directReportingNffeSponsoringEntity: ").append(toIndentedString(directReportingNffeSponsoringEntity)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -3243,7 +2897,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); - openapiFields.add("type"); openapiFields.add("entryStatus"); openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); @@ -3256,6 +2909,7 @@ private String toIndentedString(Object o) { openapiFields.add("eDeliveryConsentedAt"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -3281,145 +2935,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8ImyFormResponse` properties. JSON: %s", entry.getKey(), 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("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); - } - if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString())); - } - if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entityType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entityType").toString())); - } - if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fatcaStatus").toString())); - } - if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); - } - if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); - } - if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); - } - if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); - } - if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); - } - if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); - } - if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); - } - if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); - } - if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); - } - if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString())); - } - if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); - } - if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); - } - if ((jsonObj.get("disregardedEntityFatcaStatus") != null && !jsonObj.get("disregardedEntityFatcaStatus").isJsonNull()) && !jsonObj.get("disregardedEntityFatcaStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityFatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityFatcaStatus").toString())); - } - if ((jsonObj.get("disregardedAddress") != null && !jsonObj.get("disregardedAddress").isJsonNull()) && !jsonObj.get("disregardedAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedAddress").toString())); - } - if ((jsonObj.get("disregardedCity") != null && !jsonObj.get("disregardedCity").isJsonNull()) && !jsonObj.get("disregardedCity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCity").toString())); - } - if ((jsonObj.get("disregardedState") != null && !jsonObj.get("disregardedState").isJsonNull()) && !jsonObj.get("disregardedState").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedState").toString())); - } - if ((jsonObj.get("disregardedZip") != null && !jsonObj.get("disregardedZip").isJsonNull()) && !jsonObj.get("disregardedZip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedZip").toString())); - } - if ((jsonObj.get("disregardedCountry") != null && !jsonObj.get("disregardedCountry").isJsonNull()) && !jsonObj.get("disregardedCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCountry").toString())); - } - if ((jsonObj.get("disregardedEntityGiin") != null && !jsonObj.get("disregardedEntityGiin").isJsonNull()) && !jsonObj.get("disregardedEntityGiin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityGiin").toString())); - } - if ((jsonObj.get("ffiSponsoringEntity") != null && !jsonObj.get("ffiSponsoringEntity").isJsonNull()) && !jsonObj.get("ffiSponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ffiSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ffiSponsoringEntity").toString())); - } - if ((jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity") != null && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonNull()) && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sponsoredCloselyHeldEntitySponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").toString())); - } - if ((jsonObj.get("igaCountry") != null && !jsonObj.get("igaCountry").isJsonNull()) && !jsonObj.get("igaCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaCountry").toString())); - } - if ((jsonObj.get("igaModel") != null && !jsonObj.get("igaModel").isJsonNull()) && !jsonObj.get("igaModel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaModel").toString())); - } - if ((jsonObj.get("igaLegalStatusTreatment") != null && !jsonObj.get("igaLegalStatusTreatment").isJsonNull()) && !jsonObj.get("igaLegalStatusTreatment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaLegalStatusTreatment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaLegalStatusTreatment").toString())); - } - if ((jsonObj.get("igaFfiTrusteeOrSponsor") != null && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonNull()) && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `igaFfiTrusteeOrSponsor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaFfiTrusteeOrSponsor").toString())); - } - if ((jsonObj.get("publiclyTradedNffeSecuritiesMarket") != null && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonNull()) && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedNffeSecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedNffeSecuritiesMarket").toString())); - } - if ((jsonObj.get("publiclyTradedEntity") != null && !jsonObj.get("publiclyTradedEntity").isJsonNull()) && !jsonObj.get("publiclyTradedEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedEntity").toString())); - } - if ((jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") != null && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonNull()) && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").toString())); - } - if ((jsonObj.get("directReportingNffeSponsoringEntity") != null && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonNull()) && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `directReportingNffeSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directReportingNffeSponsoringEntity").toString())); - } - if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java index 22f32f2..fecf3ed 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java @@ -63,10 +63,6 @@ public class W9FormBaseResponse { @SerializedName(SERIALIZED_NAME_ID) private String id; - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) private String entryStatus; @@ -115,7 +111,12 @@ public class W9FormBaseResponse { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + protected String type; + public W9FormBaseResponse() { + this.type = this.getClass().getSimpleName(); } public W9FormBaseResponse id(String id) { @@ -137,25 +138,6 @@ public void setId(String id) { } - public W9FormBaseResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public W9FormBaseResponse entryStatus(String entryStatus) { this.entryStatus = entryStatus; return this; @@ -384,6 +366,25 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { } + public W9FormBaseResponse type(String type) { + this.type = type; + return this; + } + + /** + * The type of the response object. + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + @Override public boolean equals(Object o) { @@ -395,7 +396,6 @@ public boolean equals(Object o) { } W9FormBaseResponse w9FormBaseResponse = (W9FormBaseResponse) o; return Objects.equals(this.id, w9FormBaseResponse.id) && - Objects.equals(this.type, w9FormBaseResponse.type) && Objects.equals(this.entryStatus, w9FormBaseResponse.entryStatus) && Objects.equals(this.entryStatusDate, w9FormBaseResponse.entryStatusDate) && Objects.equals(this.referenceId, w9FormBaseResponse.referenceId) && @@ -407,7 +407,8 @@ public boolean equals(Object o) { Objects.equals(this.signedDate, w9FormBaseResponse.signedDate) && Objects.equals(this.eDeliveryConsentedAt, w9FormBaseResponse.eDeliveryConsentedAt) && Objects.equals(this.createdAt, w9FormBaseResponse.createdAt) && - Objects.equals(this.updatedAt, w9FormBaseResponse.updatedAt); + Objects.equals(this.updatedAt, w9FormBaseResponse.updatedAt) && + Objects.equals(this.type, w9FormBaseResponse.type); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -416,7 +417,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(id, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt, type); } private static int hashCodeNullable(JsonNullable a) { @@ -431,7 +432,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W9FormBaseResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); @@ -444,6 +444,7 @@ public String toString() { sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } @@ -484,68 +485,28 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!W9FormBaseResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("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("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("type").getAsString(); + switch (discriminatorValue) { + case "W4FormResponse": + W4FormResponse.validateJsonElement(jsonElement); + break; + case "W8BenEFormResponse": + W8BenEFormResponse.validateJsonElement(jsonElement); + break; + case "W8BenFormResponse": + W8BenFormResponse.validateJsonElement(jsonElement); + break; + case "W8ImyFormResponse": + W8ImyFormResponse.validateJsonElement(jsonElement); + break; + case "W9FormResponse": + W9FormResponse.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `type` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!W9FormBaseResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'W9FormBaseResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(W9FormBaseResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, W9FormBaseResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public W9FormBaseResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of W9FormBaseResponse given an JSON string diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java index 0e9afed..5f090fa 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java @@ -21,6 +21,7 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.TinMatchStatusResponse; +import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -59,7 +60,7 @@ * W9FormResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class W9FormResponse { +public class W9FormResponse extends W9FormBaseResponse { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -136,63 +137,8 @@ public class W9FormResponse { @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) private TinMatchStatusResponse tinMatchStatus; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private String companyId; - - public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; - @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) - private String displayName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ARCHIVED = "archived"; - @SerializedName(SERIALIZED_NAME_ARCHIVED) - private Boolean archived; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - - public static final String SERIALIZED_NAME_SIGNED_DATE = "signedDate"; - @SerializedName(SERIALIZED_NAME_SIGNED_DATE) - private OffsetDateTime signedDate; - - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public W9FormResponse() { + this.type = this.getClass().getSimpleName(); } public W9FormResponse name(String name) { @@ -556,272 +502,6 @@ public void setTinMatchStatus(TinMatchStatusResponse tinMatchStatus) { } - public W9FormResponse id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier for the form. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public W9FormResponse type(String type) { - this.type = type; - return this; - } - - /** - * The form type. - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public W9FormResponse entryStatus(String entryStatus) { - this.entryStatus = entryStatus; - return this; - } - - /** - * The form status. - * @return entryStatus - */ - @javax.annotation.Nullable - public String getEntryStatus() { - return entryStatus; - } - - public void setEntryStatus(String entryStatus) { - this.entryStatus = entryStatus; - } - - - public W9FormResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - - public W9FormResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * A reference identifier for the form. - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public W9FormResponse companyId(String companyId) { - this.companyId = companyId; - return this; - } - - /** - * The ID of the associated company. - * @return companyId - */ - @javax.annotation.Nullable - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - - public W9FormResponse displayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * The display name associated with the form. - * @return displayName - */ - @javax.annotation.Nullable - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - - public W9FormResponse email(String email) { - this.email = email; - return this; - } - - /** - * The email address of the individual associated with the form. - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public W9FormResponse archived(Boolean archived) { - this.archived = archived; - return this; - } - - /** - * Indicates whether the form is archived. - * @return archived - */ - @javax.annotation.Nullable - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - - public W9FormResponse signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - - public W9FormResponse signedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - return this; - } - - /** - * The date the form was signed. - * @return signedDate - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedDate() { - return signedDate; - } - - public void setSignedDate(OffsetDateTime signedDate) { - this.signedDate = signedDate; - } - - - public W9FormResponse eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W9FormResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation date of the form. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public W9FormResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last updated date of the form. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -851,20 +531,7 @@ public boolean equals(Object o) { Objects.equals(this.backupWithholding, w9FormResponse.backupWithholding) && Objects.equals(this.is1099able, w9FormResponse.is1099able) && Objects.equals(this.tinMatchStatus, w9FormResponse.tinMatchStatus) && - Objects.equals(this.id, w9FormResponse.id) && - Objects.equals(this.type, w9FormResponse.type) && - Objects.equals(this.entryStatus, w9FormResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w9FormResponse.entryStatusDate) && - Objects.equals(this.referenceId, w9FormResponse.referenceId) && - Objects.equals(this.companyId, w9FormResponse.companyId) && - Objects.equals(this.displayName, w9FormResponse.displayName) && - Objects.equals(this.email, w9FormResponse.email) && - Objects.equals(this.archived, w9FormResponse.archived) && - Objects.equals(this.signature, w9FormResponse.signature) && - Objects.equals(this.signedDate, w9FormResponse.signedDate) && - Objects.equals(this.eDeliveryConsentedAt, w9FormResponse.eDeliveryConsentedAt) && - Objects.equals(this.createdAt, w9FormResponse.createdAt) && - Objects.equals(this.updatedAt, w9FormResponse.updatedAt); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -873,7 +540,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, id, type, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -887,6 +554,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W9FormResponse {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); sb.append(" businessClassification: ").append(toIndentedString(businessClassification)).append("\n"); @@ -906,20 +574,6 @@ public String toString() { sb.append(" backupWithholding: ").append(toIndentedString(backupWithholding)).append("\n"); sb.append(" is1099able: ").append(toIndentedString(is1099able)).append("\n"); sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); - sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -943,7 +597,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("id"); - openapiFields.add("type"); openapiFields.add("entryStatus"); openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); @@ -956,6 +609,7 @@ private String toIndentedString(Object o) { openapiFields.add("eDeliveryConsentedAt"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("type"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -981,77 +635,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormResponse` properties. JSON: %s", entry.getKey(), 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("businessName") != null && !jsonObj.get("businessName").isJsonNull()) && !jsonObj.get("businessName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName").toString())); - } - if ((jsonObj.get("businessClassification") != null && !jsonObj.get("businessClassification").isJsonNull()) && !jsonObj.get("businessClassification").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessClassification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessClassification").toString())); - } - if ((jsonObj.get("businessOther") != null && !jsonObj.get("businessOther").isJsonNull()) && !jsonObj.get("businessOther").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessOther` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessOther").toString())); - } - if ((jsonObj.get("exemptPayeeCode") != null && !jsonObj.get("exemptPayeeCode").isJsonNull()) && !jsonObj.get("exemptPayeeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptPayeeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptPayeeCode").toString())); - } - if ((jsonObj.get("exemptFatcaCode") != null && !jsonObj.get("exemptFatcaCode").isJsonNull()) && !jsonObj.get("exemptFatcaCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptFatcaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptFatcaCode").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("foreignAddress") != null && !jsonObj.get("foreignAddress").isJsonNull()) && !jsonObj.get("foreignAddress").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignAddress").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - TinMatchStatusResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("entryStatus") != null && !jsonObj.get("entryStatus").isJsonNull()) && !jsonObj.get("entryStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `entryStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entryStatus").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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); - } - if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory {